From: Yu Watanabe Date: Mon, 1 Dec 2025 00:24:57 +0000 (+0900) Subject: test-seccomp: do not fail when already MemoryDenyWriteExecute= is enabled X-Git-Tag: v259-rc3~29^2~12 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3672e24e75c6c26ae93da535e516f15d1267bde3;p=thirdparty%2Fsystemd.git test-seccomp: do not fail when already MemoryDenyWriteExecute= is enabled --- diff --git a/src/test/test-seccomp.c b/src/test/test-seccomp.c index 0a34584cff2..e81355abdd3 100644 --- a/src/test/test-seccomp.c +++ b/src/test/test-seccomp.c @@ -611,7 +611,10 @@ TEST(memory_deny_write_execute_shmat) { void *p; p = shmat(shmid, NULL, 0); - assert_se(p != MAP_FAILED); + if (p == MAP_FAILED) { + log_tests_skipped_errno(errno, "shmat() is already disabled"); + _exit(EXIT_SUCCESS); + } assert_se(shmdt(p) == 0); p = shmat(shmid, NULL, SHM_EXEC);