[compiler-rt] 2a408f2 - [TSAN] Disable clone_setns test case on PPC64 RHEL 7.9 Targets
Kamau Bridgeman via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 19 11:25:25 PDT 2022
Author: Kamau Bridgeman
Date: 2022-07-19T13:25:21-05:00
New Revision: 2a408f200cb590c003a8d015e365f759c7a5e4a1
URL: https://github.com/llvm/llvm-project/commit/2a408f200cb590c003a8d015e365f759c7a5e4a1
DIFF: https://github.com/llvm/llvm-project/commit/2a408f200cb590c003a8d015e365f759c7a5e4a1.diff
LOG: [TSAN] Disable clone_setns test case on PPC64 RHEL 7.9 Targets
The compler-rt test case tsan/Linux/clone_setns.cpp fails on
PowerPC64 RHEL 7.9 targets.
Unshare fails with errno code EINVAL.
It is unclear why this happens specifically on RHEL 7.9 and no other
operating system like Ubuntu 18 or RHEL 8.4 for example.
This patch uses marcos to disable the test case for ppc64 rhel7.9
because there are no XFAIL directives to target rhel 7.9 specifically.
Reviewed By: dvyukov
Differential Revision: https://reviews.llvm.org/D130086
Added:
Modified:
compiler-rt/test/tsan/Linux/clone_setns.cpp
Removed:
################################################################################
diff --git a/compiler-rt/test/tsan/Linux/clone_setns.cpp b/compiler-rt/test/tsan/Linux/clone_setns.cpp
index 88acb6917d45b..1bd812ff6b6a7 100644
--- a/compiler-rt/test/tsan/Linux/clone_setns.cpp
+++ b/compiler-rt/test/tsan/Linux/clone_setns.cpp
@@ -9,7 +9,15 @@
#include <sched.h>
#include <sys/types.h>
#include <sys/wait.h>
+#ifdef __linux__
+# include <linux/version.h>
+#endif
+#if __PPC64__ && RHEL_MAJOR == 7 && RHEL_MINOR == 9
+# define PPC64_RHEL7_9 1
+#endif
+
+#ifndef PPC64_RHEL7_9
static int cloned(void *arg) {
// Unshare can fail for other reasons, e.g. no permissions,
// so check only the error we are interested in:
@@ -21,8 +29,10 @@ static int cloned(void *arg) {
exit(0);
return 0;
}
+#endif
int main() {
+#ifndef PPC64_RHEL7_9
char stack[64 << 10] __attribute__((aligned(64)));
int pid = clone(cloned, stack + sizeof(stack), SIGCHLD, 0);
if (pid == -1) {
@@ -36,6 +46,7 @@ int main() {
fprintf(stderr, "child failed: %d\n", status);
exit(1);
}
+#endif
fprintf(stderr, "DONE\n");
}
More information about the llvm-commits
mailing list