ryantimwilson / rpms / systemd

Forked from rpms/systemd a month ago
Clone
be0c12
From c0c7a5d73bd53375f90fbe70287512269bc8de16 Mon Sep 17 00:00:00 2001
be0c12
From: Frantisek Sumsal <frantisek@sumsal.cz>
be0c12
Date: Tue, 12 Jan 2021 22:14:59 +0100
be0c12
Subject: [PATCH] ci: skip test-execute on GH Actions under ASan
be0c12
be0c12
It seems to suffer from the same issue as on Travis CI, where the test
be0c12
randomly fails due to timeouts in its subtests.
be0c12
be0c12
See: https://github.com/systemd/systemd/issues/10696#issuecomment-758501797
be0c12
(cherry picked from commit f1a8fed286e3b9527b1837e9d5c6cb8d88bd2041)
be0c12
be0c12
Related: #2017033
be0c12
---
be0c12
 src/test/test-execute.c | 7 +++++++
be0c12
 1 file changed, 7 insertions(+)
be0c12
be0c12
diff --git a/src/test/test-execute.c b/src/test/test-execute.c
be0c12
index 294f8fe7dd..5303652b93 100644
be0c12
--- a/src/test/test-execute.c
be0c12
+++ b/src/test/test-execute.c
be0c12
@@ -798,6 +798,13 @@ int main(int argc, char *argv[]) {
be0c12
         log_parse_environment();
be0c12
         log_open();
be0c12
 
be0c12
+#if HAS_FEATURE_ADDRESS_SANITIZER
be0c12
+        if (strstr_ptr(ci_environment(), "travis") || strstr_ptr(ci_environment(), "github-actions")) {
be0c12
+                log_notice("Running on Travis CI/GH Actions under ASan, skipping, see https://github.com/systemd/systemd/issues/10696");
be0c12
+                return EXIT_TEST_SKIP;
be0c12
+        }
be0c12
+#endif
be0c12
+
be0c12
         (void) unsetenv("USER");
be0c12
         (void) unsetenv("LOGNAME");
be0c12
         (void) unsetenv("SHELL");