[compiler-rt] 79debe8 - [dfsan] Turn off all dfsan test cases on non x86_64 OSs

Jianzhou Zhao via llvm-commits llvm-commits at lists.llvm.org
Tue May 4 22:32:59 PDT 2021


Author: Jianzhou Zhao
Date: 2021-05-05T05:30:53Z
New Revision: 79debe8d7b5897d6c8efaa8cd9846a3b4533d57f

URL: https://github.com/llvm/llvm-project/commit/79debe8d7b5897d6c8efaa8cd9846a3b4533d57f
DIFF: https://github.com/llvm/llvm-project/commit/79debe8d7b5897d6c8efaa8cd9846a3b4533d57f.diff

LOG: [dfsan] Turn off all dfsan test cases on non x86_64 OSs

https://reviews.llvm.org/D101666 enables sanitizer allocator.
This broke all test cases on non x86-64.

Added: 
    

Modified: 
    compiler-rt/test/dfsan/basic.c
    compiler-rt/test/dfsan/dump_labels.c
    compiler-rt/test/dfsan/event_callbacks.c
    compiler-rt/test/dfsan/fast16labels.c
    compiler-rt/test/dfsan/flags.c
    compiler-rt/test/dfsan/flush.c
    compiler-rt/test/dfsan/fncall.c
    compiler-rt/test/dfsan/interceptors.c
    compiler-rt/test/dfsan/label_count.c
    compiler-rt/test/dfsan/pair.cpp
    compiler-rt/test/dfsan/propagate.c
    compiler-rt/test/dfsan/release_shadow_space.c
    compiler-rt/test/dfsan/sigaction.c
    compiler-rt/test/dfsan/struct.c
    compiler-rt/test/dfsan/threaded_flush.c
    compiler-rt/test/dfsan/trace-cmp.c
    compiler-rt/test/dfsan/vararg.c
    compiler-rt/test/dfsan/write_callback.c

Removed: 
    


################################################################################
diff  --git a/compiler-rt/test/dfsan/basic.c b/compiler-rt/test/dfsan/basic.c
index 990fd1161069..edd4aca83c0f 100644
--- a/compiler-rt/test/dfsan/basic.c
+++ b/compiler-rt/test/dfsan/basic.c
@@ -1,5 +1,7 @@
 // RUN: %clang_dfsan %s -o %t && %run %t
 // RUN: %clang_dfsan -mllvm -dfsan-args-abi %s -o %t && %run %t
+//
+// REQUIRES: x86_64-target-arch
 
 // Tests that labels are propagated through loads and stores.
 

diff  --git a/compiler-rt/test/dfsan/dump_labels.c b/compiler-rt/test/dfsan/dump_labels.c
index 3bbc1e2c0b90..28464d1d7b5d 100644
--- a/compiler-rt/test/dfsan/dump_labels.c
+++ b/compiler-rt/test/dfsan/dump_labels.c
@@ -2,6 +2,8 @@
 // RUN: DFSAN_OPTIONS=dump_labels_at_exit=/dev/stdout %run %t 2>&1 | FileCheck %s
 // RUN: DFSAN_OPTIONS=dump_labels_at_exit=/dev/stdout not %run %t c 2>&1 | FileCheck %s --check-prefix=CHECK-OOL
 // RUN: DFSAN_OPTIONS=dump_labels_at_exit=/dev/stdout not %run %t u 2>&1 | FileCheck %s --check-prefix=CHECK-OOL
+//
+// REQUIRES: x86_64-target-arch
 
 // Tests that labels are properly dumped at program termination.
 

diff  --git a/compiler-rt/test/dfsan/event_callbacks.c b/compiler-rt/test/dfsan/event_callbacks.c
index b154c9679d45..6a920f7f3dc4 100644
--- a/compiler-rt/test/dfsan/event_callbacks.c
+++ b/compiler-rt/test/dfsan/event_callbacks.c
@@ -1,6 +1,8 @@
 // RUN: %clang_dfsan -fno-sanitize=dataflow -O2 -fPIE -DCALLBACKS -c %s -o %t-callbacks.o
 // RUN: %clang_dfsan -O2 -mllvm -dfsan-event-callbacks %s %t-callbacks.o -o %t
 // RUN: %run %t FooBarBaz 2>&1 | FileCheck %s
+//
+// REQUIRES: x86_64-target-arch
 
 // Tests that callbacks are inserted for store events when
 // -dfsan-event-callbacks is specified.

diff  --git a/compiler-rt/test/dfsan/fast16labels.c b/compiler-rt/test/dfsan/fast16labels.c
index 72aaf38bfed4..9236d77939b0 100644
--- a/compiler-rt/test/dfsan/fast16labels.c
+++ b/compiler-rt/test/dfsan/fast16labels.c
@@ -1,6 +1,8 @@
 // RUN: %clang_dfsan %s -mllvm -dfsan-fast-16-labels -o %t
 // RUN: %run %t
 //
+// REQUIRES: x86_64-target-arch
+//
 // Tests fast16labels mode.
 
 #include <sanitizer/dfsan_interface.h>

diff  --git a/compiler-rt/test/dfsan/flags.c b/compiler-rt/test/dfsan/flags.c
index 9ac61a2b6d8c..1123d154d31e 100644
--- a/compiler-rt/test/dfsan/flags.c
+++ b/compiler-rt/test/dfsan/flags.c
@@ -1,6 +1,8 @@
 // RUN: %clang_dfsan %s -fsanitize-ignorelist=%S/Inputs/flags_abilist.txt -mllvm -dfsan-debug-nonzero-labels -o %t && %run %t 2>&1 | FileCheck %s
 // RUN: %clang_dfsan %s -fsanitize-ignorelist=%S/Inputs/flags_abilist.txt -mllvm -dfsan-debug-nonzero-labels -o %t && DFSAN_OPTIONS=warn_unimplemented=0 %run %t 2>&1 | count 0
 // RUN: %clang_dfsan %s -fsanitize-ignorelist=%S/Inputs/flags_abilist.txt -mllvm -dfsan-debug-nonzero-labels -o %t && DFSAN_OPTIONS=warn_nonzero_labels=1 %run %t 2>&1 | FileCheck --check-prefix=CHECK-NONZERO %s
+//
+// REQUIRES: x86_64-target-arch
 
 // Tests that flags work correctly.
 

diff  --git a/compiler-rt/test/dfsan/flush.c b/compiler-rt/test/dfsan/flush.c
index 3986eb26a622..1a71c22471de 100644
--- a/compiler-rt/test/dfsan/flush.c
+++ b/compiler-rt/test/dfsan/flush.c
@@ -1,7 +1,7 @@
 // Tests dfsan_flush().
 // RUN: %clang_dfsan %s -o %t && %run %t
 // RUN: %clang_dfsan -DORIGIN_TRACKING -mllvm -dfsan-track-origins=1 -mllvm -dfsan-fast-16-labels=true %s -o %t && %run %t
-// 
+//
 // REQUIRES: x86_64-target-arch
 
 #include <sanitizer/dfsan_interface.h>

diff  --git a/compiler-rt/test/dfsan/fncall.c b/compiler-rt/test/dfsan/fncall.c
index 458fba66dbbe..7650529536a1 100644
--- a/compiler-rt/test/dfsan/fncall.c
+++ b/compiler-rt/test/dfsan/fncall.c
@@ -1,6 +1,8 @@
 // RUN: %clang_dfsan %s -o %t && %run %t
 // RUN: %clang_dfsan -mllvm -dfsan-args-abi %s -o %t && %run %t
-
+//
+// REQUIRES: x86_64-target-arch
+//
 // Tests that labels are propagated through function calls.
 
 #include <sanitizer/dfsan_interface.h>

diff  --git a/compiler-rt/test/dfsan/interceptors.c b/compiler-rt/test/dfsan/interceptors.c
index 77aec2078f13..d0961383e93f 100644
--- a/compiler-rt/test/dfsan/interceptors.c
+++ b/compiler-rt/test/dfsan/interceptors.c
@@ -2,6 +2,8 @@
 // RUN: %clang_dfsan %s %t-calloc.o -o %t
 // RUN: %run %t
 //
+// REQUIRES: x86_64-target-arch
+//
 // Tests that calling mmap() during during dfsan initialization works.
 
 #include <assert.h>

diff  --git a/compiler-rt/test/dfsan/label_count.c b/compiler-rt/test/dfsan/label_count.c
index b42ce5824256..444278b89e9c 100644
--- a/compiler-rt/test/dfsan/label_count.c
+++ b/compiler-rt/test/dfsan/label_count.c
@@ -7,6 +7,8 @@
 // RUN: %clang_dfsan -mllvm -dfsan-args-abi -c %s -o %t.o && \
 // RUN: %clang_dfsan -mllvm -dfsan-args-abi %t.o %t.lib.o -o %t.bin && \
 // RUN: %run %t.bin
+//
+// REQUIRES: x86_64-target-arch
 
 #include <sanitizer/dfsan_interface.h>
 #include <assert.h>

diff  --git a/compiler-rt/test/dfsan/pair.cpp b/compiler-rt/test/dfsan/pair.cpp
index 52fa8bdde7e8..4c2700d28e83 100644
--- a/compiler-rt/test/dfsan/pair.cpp
+++ b/compiler-rt/test/dfsan/pair.cpp
@@ -1,5 +1,7 @@
 // RUN: %clangxx_dfsan %s -mllvm -dfsan-fast-16-labels -mllvm -dfsan-track-select-control-flow=false -mllvm -dfsan-combine-pointer-labels-on-load=false -O0 -DO0 -o %t && %run %t
 // RUN: %clangxx_dfsan %s -mllvm -dfsan-fast-16-labels -mllvm -dfsan-track-select-control-flow=false -mllvm -dfsan-combine-pointer-labels-on-load=false -O1 -o %t && %run %t
+//
+// REQUIRES: x86_64-target-arch
 
 #include <algorithm>
 #include <assert.h>

diff  --git a/compiler-rt/test/dfsan/propagate.c b/compiler-rt/test/dfsan/propagate.c
index c30a087d6636..bd8fca9ca5af 100644
--- a/compiler-rt/test/dfsan/propagate.c
+++ b/compiler-rt/test/dfsan/propagate.c
@@ -1,5 +1,7 @@
 // RUN: %clang_dfsan %s -o %t && %run %t
 // RUN: %clang_dfsan -mllvm -dfsan-args-abi %s -o %t && %run %t
+//
+// REQUIRES: x86_64-target-arch
 
 // Tests that labels are propagated through computation and that union labels
 // are properly created.

diff  --git a/compiler-rt/test/dfsan/release_shadow_space.c b/compiler-rt/test/dfsan/release_shadow_space.c
index a1253ef87416..bdeafdbb6135 100644
--- a/compiler-rt/test/dfsan/release_shadow_space.c
+++ b/compiler-rt/test/dfsan/release_shadow_space.c
@@ -1,5 +1,7 @@
 // DFSAN_OPTIONS=no_huge_pages_for_shadow=false RUN: %clang_dfsan %s -o %t && setarch `uname -m` -R %run %t
 // DFSAN_OPTIONS=no_huge_pages_for_shadow=true RUN: %clang_dfsan %s -o %t && setarch `uname -m` -R %run %t
+//
+// REQUIRES: x86_64-target-arch
 
 #include <assert.h>
 #include <sanitizer/dfsan_interface.h>

diff  --git a/compiler-rt/test/dfsan/sigaction.c b/compiler-rt/test/dfsan/sigaction.c
index d9b7db2dd3d9..30f8b0bf340c 100644
--- a/compiler-rt/test/dfsan/sigaction.c
+++ b/compiler-rt/test/dfsan/sigaction.c
@@ -1,6 +1,8 @@
 // RUN: %clang_dfsan -DUSE_SIGNAL_ACTION -mllvm -dfsan-fast-16-labels=true %s -o %t && \
 // RUN:     %run %t
 // RUN: %clang_dfsan -mllvm -dfsan-fast-16-labels=true %s -o %t && %run %t
+//
+// REQUIRES: x86_64-target-arch
 
 #include <sanitizer/dfsan_interface.h>
 

diff  --git a/compiler-rt/test/dfsan/struct.c b/compiler-rt/test/dfsan/struct.c
index db31567f584b..8a6913f4dcec 100644
--- a/compiler-rt/test/dfsan/struct.c
+++ b/compiler-rt/test/dfsan/struct.c
@@ -2,6 +2,8 @@
 // RUN: %clang_dfsan %s -O1 -DO1 -o %t && %run %t
 // RUN: %clang_dfsan %s -O0 -mllvm -dfsan-fast-16-labels=true -DFAST16_O0 -o %t && %run %t
 // RUN: %clang_dfsan %s -O0 -DO0 -o %t && %run %t
+//
+// REQUIRES: x86_64-target-arch
 
 #include <assert.h>
 #include <sanitizer/dfsan_interface.h>

diff  --git a/compiler-rt/test/dfsan/threaded_flush.c b/compiler-rt/test/dfsan/threaded_flush.c
index 66f41dbe96ca..3f346481ceb2 100644
--- a/compiler-rt/test/dfsan/threaded_flush.c
+++ b/compiler-rt/test/dfsan/threaded_flush.c
@@ -1,6 +1,9 @@
 // Tests that doing dfsan_flush() while another thread is executing doesn't
 // segfault.
 // RUN: %clang_dfsan %s -o %t && %run %t
+//
+// REQUIRES: x86_64-target-arch
+
 #include <assert.h>
 #include <pthread.h>
 #include <sanitizer/dfsan_interface.h>

diff  --git a/compiler-rt/test/dfsan/trace-cmp.c b/compiler-rt/test/dfsan/trace-cmp.c
index 0645363b2605..a5e70e980976 100644
--- a/compiler-rt/test/dfsan/trace-cmp.c
+++ b/compiler-rt/test/dfsan/trace-cmp.c
@@ -3,6 +3,8 @@
 //
 // RUN: %clang_dfsan -fsanitize-coverage=trace-pc-guard,pc-table,func,trace-cmp %s -o %t
 // RUN: %run %t 2>&1 | FileCheck %s
+//
+// REQUIRES: x86_64-target-arch
 
 #include <stdio.h>
 #include <stdint.h>

diff  --git a/compiler-rt/test/dfsan/vararg.c b/compiler-rt/test/dfsan/vararg.c
index f51e39c71899..3cb4a5bfd54a 100644
--- a/compiler-rt/test/dfsan/vararg.c
+++ b/compiler-rt/test/dfsan/vararg.c
@@ -4,6 +4,8 @@
 // RUN: %clang_dfsan -mllvm -dfsan-args-abi %s -o %t
 // RUN: not %run %t 2>&1 | FileCheck %s
 // RUN: %run %t foo
+//
+// REQUIRES: x86_64-target-arch
 
 #include <stdio.h>
 

diff  --git a/compiler-rt/test/dfsan/write_callback.c b/compiler-rt/test/dfsan/write_callback.c
index 31470efa9e87..d6d3ec18f38d 100644
--- a/compiler-rt/test/dfsan/write_callback.c
+++ b/compiler-rt/test/dfsan/write_callback.c
@@ -1,5 +1,7 @@
 // RUN: %clang_dfsan                         %s -o %t && %run %t | FileCheck %s
 // RUN: %clang_dfsan  -mllvm -dfsan-args-abi %s -o %t && %run %t | FileCheck %s
+//
+// REQUIRES: x86_64-target-arch
 
 // Tests that the custom implementation of write() does writes with or without
 // a callback set using dfsan_set_write_callback().


        


More information about the llvm-commits mailing list