| 4bf15b1c | 31-May-2024 |
John Hubbard <[email protected]> |
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 <[email protected]> Signed-off-by: John Hubbard <[email protected]> Signed-off-by: Shuah Khan <[email protected]>
show more ...
|
| 32c75ad4 | 31-May-2024 |
John Hubbard <[email protected]> |
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 <[email protected]> Signed-off-by: John Hubbard <[email protected]> Signed-off-by: Shuah Khan <[email protected]>
show more ...
|
| 02e56ccb | 23-Sep-2021 |
André Almeida <[email protected]> |
selftests: futex: Test sys_futex_waitv() timeout
Test if the futex_waitv timeout is working as expected, using the supported clockid options.
Signed-off-by: André Almeida <[email protected]
selftests: futex: Test sys_futex_waitv() timeout
Test if the futex_waitv timeout is working as expected, using the supported clockid options.
Signed-off-by: André Almeida <[email protected]> Signed-off-by: Peter Zijlstra (Intel) <[email protected]> Link: https://lore.kernel.org/r/[email protected]
show more ...
|
| 7cb5dd8e | 31-May-2021 |
André Almeida <[email protected]> |
selftests: futex: Add futex compare requeue test
Add testing for futex_cmp_requeue(). The first test just requeues from one waiter to another one, and wakes it. The second performs both wake and req
selftests: futex: Add futex compare requeue test
Add testing for futex_cmp_requeue(). The first test just requeues from one waiter to another one, and wakes it. The second performs both wake and requeue, and checks the return values to see if the operation woke/requeued the expected number of waiters.
Signed-off-by: André Almeida <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]> Acked-by: Davidlohr Bueso <[email protected]> Link: https://lore.kernel.org/r/[email protected]
show more ...
|