teknoraver / rpms / systemd

Forked from rpms/systemd 2 months ago
Clone

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

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