]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
test-execute: skip test_exec_systemcallfilter_system under ASan
authorFrantisek Sumsal <frantisek@sumsal.cz>
Tue, 30 Jul 2019 19:22:10 +0000 (21:22 +0200)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 31 Jul 2019 00:45:26 +0000 (09:45 +0900)
This particular test case keeps intermittently failing due to crashing
LSan  when running under clang+ASan. Generally, sanitizers don't
like seccomp filters, so the best option here is to just switch this
test off for this scenario.

src/test/test-execute.c

index e308d75a56d9ad044c47806ec93271e1c6f4ab36..435ab39cd250bcd264a22fadf03259b50b19abd6 100644 (file)
@@ -471,7 +471,12 @@ static void test_exec_restrictnamespaces(Manager *m) {
 }
 
 static void test_exec_systemcallfilter_system(Manager *m) {
-#if HAVE_SECCOMP
+/* Skip this particular test case when running under ASan, as
+ * LSan intermittently segfaults when accessing memory right
+ * after the test finishes. Generally, ASan & LSan don't like
+ * the seccomp stuff.
+ */
+#if HAVE_SECCOMP && !HAS_FEATURE_ADDRESS_SANITIZER
         if (!is_seccomp_available()) {
                 log_notice("Seccomp not available, skipping %s", __func__);
                 return;