Commit 275498b8 authored by Carlos Llamas's avatar Carlos Llamas Committed by Thomas Gleixner
Browse files

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: default avatarCarlos Llamas <cmllamas@google.com>
Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
Link: https://patch.msgid.link/20251016162009.3270784-1-cmllamas@google.com
parent 9407d138
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -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);
	}
+2 −0
Original line number Diff line number Diff line
@@ -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);
		}