selftests/futex: skip tests if shmget unsupported
PATCH RESEND 1/1 selftests/futex: skip tests if shmget unsupported
On systems where the shmget() syscall is not supported, tests like anon_page and shared_waitv will fail. Skip these tests in such cases to allow the rest of the test suite to run.
Signed-off-by Carlos Llamas <[email protected]>
--- tools/testing/selftests/futex/functional/futex_wait.c | 2 ++ tools/testing/selftests/futex/functional/futex_waitv.c | 2 ++ 2 files changed, 4 insertions(+)
tools/testing/selftests/futex/functional/futex_wait.c +2 -0
@@ -71,6 +71,8 @@ TEST(anon_page)/* Testing an anon page shared memory */ shm_id =shmget (IPC_PRIVATE ,4096 ,IPC_CREAT |0666 );if (shm_id <0 ) { +if (errno ==ENOSYS ) +ksft_exit_skip ("shmget syscall not supported\n" );perror ("shmget" );exit (1 ); }
tools/testing/selftests/futex/functional/futex_waitv.c +2 -0
@@ -86,6 +86,8 @@ TEST(shared_waitv)int shm_id =shmget (IPC_PRIVATE ,4096 ,IPC_CREAT |0666 );if (shm_id <0 ) { +if (errno ==ENOSYS ) +ksft_exit_skip ("shmget syscall not supported\n" );perror ("shmget" );exit (1 ); }
Signature · 1 line
2.52.0.rc1.455.g30608eb744-goog
Em 13/11/2025 17:40, Carlos Llamas escreveu:
Quoted 5 lines
On systems where the
shmget()syscall is not supported, tests likeanon_pageandshared_waitvwill fail. Skip these tests in such cases to allow the rest of the test suite to run.Signed-off-by Carlos Llamas <[email protected]>
Reviewed-by André Almeida <[email protected]>