diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2020-11-24 21:07:42 +0900 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2020-11-25 13:08:19 +0100 |
commit | a0dfd10a3d8091007c94cef2d341a84d46095787 (patch) | |
tree | a15d539800c0dd25e246f368c3db6485bc536067 /src/test/test-seccomp.c | |
parent | 866f698b66351e4c441769de42044776958a9fb5 (diff) | |
download | systemd-a0dfd10a3d8091007c94cef2d341a84d46095787.tar.gz |
test: skip several tests in test-seccomp when running on asan
Diffstat (limited to 'src/test/test-seccomp.c')
-rw-r--r-- | src/test/test-seccomp.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/test/test-seccomp.c b/src/test/test-seccomp.c index 856c466376..2b5e4cf23a 100644 --- a/src/test/test-seccomp.c +++ b/src/test/test-seccomp.c @@ -125,6 +125,13 @@ static void test_filter_sets(void) { continue; } #endif +#if HAS_FEATURE_ADDRESS_SANITIZER + if (IN_SET(i, SYSCALL_FILTER_SET_DEFAULT, SYSCALL_FILTER_SET_BASIC_IO, SYSCALL_FILTER_SET_SIGNAL)) { + /* ASAN at least requires sigaltstack(), read(), write(). */ + log_info("Running on address sanitizer, skipping %s", syscall_filter_sets[i].name); + continue; + } +#endif log_info("Testing %s", syscall_filter_sets[i].name); @@ -549,6 +556,10 @@ static void test_memory_deny_write_execute_mmap(void) { return; } #endif +#if HAS_FEATURE_ADDRESS_SANITIZER + log_notice("Running on address sanitizer, skipping %s", __func__); + return; +#endif pid = fork(); assert_se(pid >= 0); @@ -615,6 +626,10 @@ static void test_memory_deny_write_execute_shmat(void) { return; } #endif +#if HAS_FEATURE_ADDRESS_SANITIZER + log_notice("Running on address sanitizer, skipping %s", __func__); + return; +#endif shmid = shmget(IPC_PRIVATE, page_size(), 0); assert_se(shmid >= 0); |