[test] Make fuzzer/value-profile-div.test x86 specific
authorFangrui Song <i@maskray.me>
Wed, 19 Jul 2023 05:11:27 +0000 (22:11 -0700)
committerFangrui Song <i@maskray.me>
Wed, 19 Jul 2023 05:11:27 +0000 (22:11 -0700)
The test requires that an integer division by zero causes a trap, leading to a
signal like SIGFPE. This is the case on x86. On many other architectures, such
as Arm (unless software division is used and `__aeabi_idiv0` is patched),
Power, RISC-V, LoongArch, there is no trap. Therefore, it's more appropriate to
invert the condition to run the test.

Reviewed By: Ami-zhang

Differential Revision: https://reviews.llvm.org/D155644

compiler-rt/test/fuzzer/value-profile-div.test

index 40ff374..cf2e255 100644 (file)
@@ -1,5 +1,4 @@
-UNSUPPORTED: ios
-UNSUPPORTED: target={{(arm|aarch64).*}}
+REQUIRES: target={{(i.86|x86_64)-.*}}
 CHECK: AddressSanitizer: {{FPE|int-divide-by-zero}}
 RUN: %cpp_compiler %S/DivTest.cpp -fsanitize-coverage=trace-div -o %t-DivTest
 RUN: not %run %t-DivTest -seed=1 -use_value_profile=1 -runs=10000000 2>&1 | FileCheck %s