From 3672e24e75c6c26ae93da535e516f15d1267bde3 Mon Sep 17 00:00:00 2001 From: Yu Watanabe Date: Mon, 1 Dec 2025 09:24:57 +0900 Subject: [PATCH] test-seccomp: do not fail when already MemoryDenyWriteExecute= is enabled --- src/test/test-seccomp.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/test/test-seccomp.c b/src/test/test-seccomp.c index 0a34584cff..e81355abdd 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);