teknoraver / rpms / systemd

Forked from rpms/systemd 2 months ago
Clone

Blame SOURCES/0657-ci-skip-test-execute-on-GH-Actions-under-ASan.patch

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