e4089221 | 15-Jul-2025 |
Colin Ian King <colin.i.king@gmail.com> |
selftests/futex: Fix spelling mistake "Succeffuly" -> "Successfully"
There is a spelling mistake in a ksft_exit_fail_msg() message. Fix it.
Signed-off-by: Colin Ian King <colin.i.king@gmail.com> Si
selftests/futex: Fix spelling mistake "Succeffuly" -> "Successfully"
There is a spelling mistake in a ksft_exit_fail_msg() message. Fix it.
Signed-off-by: Colin Ian King <colin.i.king@gmail.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Link: https://lore.kernel.org/all/20250715130627.1907017-1-colin.i.king@gmail.com
show more ...
|
04850819 | 10-Jul-2025 |
Cynthia Huang <cynthia@andestech.com> |
selftests/futex: Define SYS_futex on 32-bit architectures with 64-bit time_t
The kernel does not provide sys_futex() on 32-bit architectures that do not support 32-bit time representations, such as
selftests/futex: Define SYS_futex on 32-bit architectures with 64-bit time_t
The kernel does not provide sys_futex() on 32-bit architectures that do not support 32-bit time representations, such as riscv32.
As a result, glibc cannot define SYS_futex, causing compilation failures in tests that rely on this syscall. Define SYS_futex as SYS_futex_time64 in such cases to ensure successful compilation and compatibility.
Signed-off-by: Cynthia Huang <cynthia@andestech.com> Signed-off-by: Ben Zong-You Xie <ben717@andestech.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Muhammad Usama Anjum <usama.anjum@collabora.com> Link: https://lore.kernel.org/all/20250710103630.3156130-1-ben717@andestech.com
show more ...
|
d0a48dc4 | 04-Jul-2025 |
Terry Tritton <terry.tritton@linaro.org> |
selftests/futex: Convert 32-bit timespec to 64-bit version for 32-bit compatibility mode
sys_futex_wait() expects a struct __kernel_timespec pointer for the timeout, but the provided struct timespec
selftests/futex: Convert 32-bit timespec to 64-bit version for 32-bit compatibility mode
sys_futex_wait() expects a struct __kernel_timespec pointer for the timeout, but the provided struct timespec pointer is of type struct old_timespec32 when compiled for 32-bit architectures, unless they use 64-bit timespecs already.
Make it work for all variants by converting the provided timespec value into a local struct __kernel_timespec and provide a pointer to it to the syscall. This is a pointless operation for 64-bit, but this is not a hotpath operation, so keep it simple.
This fix is based off [1]
Originally-by: Wei Gao <wegao@suse.com> Signed-off-by: Terry Tritton <terry.tritton@linaro.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Link: https://lore.kernel.org/all/20250704190234.14230-1-terry.tritton@linaro.org Link: https://lore.kernel.org/all/20231203235117.29677-1-wegao@suse.com/ [1]
show more ...
|
0ecb4232 | 28-May-2025 |
Sebastian Andrzej Siewior <bigeasy@linutronix.de> |
selftests/futex: Set the home_node in futex_numa_mpol
The test fails at the MPOL step if multiple nodes are available. The reason is that mbind() sets the policy but the home_node, which is retrieve
selftests/futex: Set the home_node in futex_numa_mpol
The test fails at the MPOL step if multiple nodes are available. The reason is that mbind() sets the policy but the home_node, which is retrieved by the futex code, is not set. This causes to retrieve the current node and with multiple nodes it fails on one of the iterations.
Use numa_set_mempolicy_home_node() to set the expected node. Use ksft_exit_fail_msg() to fail and exit in order not to confuse ktap.
Fixes: 3163369407baf ("selftests/futex: Add futex_numa_mpol") Suggested-by: Vlastimil Babka <vbabka@suse.cz> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Link: https://lkml.kernel.org/r/20250528085521.1938355-3-bigeasy@linutronix.de
show more ...
|
78272d44 | 20-May-2025 |
Colin Ian King <colin.i.king@gmail.com> |
selftests/futex: Fix spelling mistake "unitiliazed" -> "uninitialized"
There is a spelling mistake in a fail error message. Fix it.
Signed-off-by: Colin Ian King <colin.i.king@gmail.com> Signed-off
selftests/futex: Fix spelling mistake "unitiliazed" -> "uninitialized"
There is a spelling mistake in a fail error message. Fix it.
Signed-off-by: Colin Ian King <colin.i.king@gmail.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Reviewed-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Link: https://lore.kernel.org/r/20250520080657.30726-1-colin.i.king@gmail.com
show more ...
|
4140e2b3 | 17-May-2025 |
Sebastian Andrzej Siewior <bigeasy@linutronix.de> |
tools headers: Synchronize prctl.h ABI header
The prctl.h ABI header was slightly updated during the development of the interface. In particular the "immutable" parameter became a bit in the option
tools headers: Synchronize prctl.h ABI header
The prctl.h ABI header was slightly updated during the development of the interface. In particular the "immutable" parameter became a bit in the option argument.
Synchronize prctl.h ABI header again and make use of the definition in the testsuite and "perf bench futex".
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Reviewed-by: André Almeida <andrealmeid@igalia.com> Link: https://lore.kernel.org/r/20250517151455.1065363-5-bigeasy@linutronix.de
show more ...
|
7d4f4947 | 17-May-2025 |
Sebastian Andrzej Siewior <bigeasy@linutronix.de> |
selftests/futex: Use TAP output in futex_numa_mpol
Use TAP output for easier automated testing.
Suggested-by: André Almeida <andrealmeid@igalia.com> Signed-off-by: Sebastian Andrzej Siewior <bigeas
selftests/futex: Use TAP output in futex_numa_mpol
Use TAP output for easier automated testing.
Suggested-by: André Almeida <andrealmeid@igalia.com> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Reviewed-by: André Almeida <andrealmeid@igalia.com> Link: https://lore.kernel.org/r/20250517151455.1065363-3-bigeasy@linutronix.de
show more ...
|
31633694 | 16-Apr-2025 |
Sebastian Andrzej Siewior <bigeasy@linutronix.de> |
selftests/futex: Add futex_numa_mpol
Test the basic functionality for the NUMA and MPOL flags: - FUTEX2_NUMA should take the NUMA node which is after the uaddr and use it. - Only update the node i
selftests/futex: Add futex_numa_mpol
Test the basic functionality for the NUMA and MPOL flags: - FUTEX2_NUMA should take the NUMA node which is after the uaddr and use it. - Only update the node if FUTEX_NO_NODE was set by the user - FUTEX2_MPOL should use the memory based on the policy. I attempted to set the node with mbind() and then use this with MPOL but this fails and futex falls back to the default node for the current CPU.
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Link: https://lore.kernel.org/r/20250416162921.513656-22-bigeasy@linutronix.de
show more ...
|
cda95fae | 16-Apr-2025 |
Sebastian Andrzej Siewior <bigeasy@linutronix.de> |
selftests/futex: Add futex_priv_hash
Test the basic functionality of the private hash: - Upon start, with no threads there is no private hash. - The first thread initializes the private hash. - More
selftests/futex: Add futex_priv_hash
Test the basic functionality of the private hash: - Upon start, with no threads there is no private hash. - The first thread initializes the private hash. - More than four threads will increase the size of the private hash if the system has more than 16 CPUs online. - Once the user sets the size of private hash, auto scaling is disabled. - The user is only allowed to use numbers to the power of two. - The user may request the global or make the hash immutable. - Once the global hash has been set or the hash has been made immutable, further changes are not allowed. - Futex operations should work the whole time. It must be possible to hold a lock, such a PI initialised mutex, during the resize operation.
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Link: https://lore.kernel.org/r/20250416162921.513656-21-bigeasy@linutronix.de
show more ...
|
4bf15b1c | 31-May-2024 |
John Hubbard <jhubbard@nvidia.com> |
selftests/futex: don't pass a const char* to asprintf(3)
When building with clang, via:
make LLVM=1 -C tools/testing/selftests
...clang issues this warning:
futex_requeue_pi.c:403:17: warning
selftests/futex: don't pass a const char* to asprintf(3)
When building with clang, via:
make LLVM=1 -C tools/testing/selftests
...clang issues this warning:
futex_requeue_pi.c:403:17: warning: passing 'const char **' to parameter of type 'char **' discards qualifiers in nested pointer types [-Wincompatible-pointer-types-discards-qualifiers]
This warning fires because test_name is passed into asprintf(3), which then changes it.
Fix this by simply removing the const qualifier. This is a local automatic variable in a very short function, so there is not much need to use the compiler to enforce const-ness at this scope.
[1] https://lore.kernel.org/all/20240329-selftests-libmk-llvm-rfc-v1-1-2f9ed7d1c49f@valentinobst.de/
Fixes: f17d8a87ecb5 ("selftests: fuxex: Report a unique test name per run of futex_requeue_pi") Reviewed-by: Davidlohr Bueso <dave@stgolabs.net> Signed-off-by: John Hubbard <jhubbard@nvidia.com> Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
show more ...
|
32c75ad4 | 31-May-2024 |
John Hubbard <jhubbard@nvidia.com> |
selftests/futex: don't redefine .PHONY targets (all, clean)
The .PHONY targets "all" and "clean" are both already defined in the file that is included in the very next line:
../lib.mk.
Remove
selftests/futex: don't redefine .PHONY targets (all, clean)
The .PHONY targets "all" and "clean" are both already defined in the file that is included in the very next line:
../lib.mk.
Remove this duplicate code.
Reviewed-by: Davidlohr Bueso <dave@stgolabs.net> Signed-off-by: John Hubbard <jhubbard@nvidia.com> Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
show more ...
|