summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonathan Metzman <metzman@chromium.org>2019-04-30 17:58:55 +0000
committerJonathan Metzman <metzman@chromium.org>2019-04-30 17:58:55 +0000
commit6fa864b7a6418e26c18e7355a32f58482c829f23 (patch)
tree481f29106481d8ac0336d16f80f3423e9c700397
parentf721230831c5aec709b1d1720452e80d7306c91d (diff)
downloadbcm5719-llvm-6fa864b7a6418e26c18e7355a32f58482c829f23.tar.gz
bcm5719-llvm-6fa864b7a6418e26c18e7355a32f58482c829f23.zip
Fix issues with testing for i386
llvm-svn: 359584
-rw-r--r--compiler-rt/test/fuzzer/CMakeLists.txt1
-rw-r--r--compiler-rt/test/fuzzer/compressed.test1
-rw-r--r--compiler-rt/test/fuzzer/lit.cfg6
-rw-r--r--compiler-rt/test/fuzzer/lit.site.cfg.in1
-rw-r--r--compiler-rt/test/fuzzer/trace-malloc-threaded.test2
5 files changed, 8 insertions, 3 deletions
diff --git a/compiler-rt/test/fuzzer/CMakeLists.txt b/compiler-rt/test/fuzzer/CMakeLists.txt
index d38ce478b6b..de0268e14ff 100644
--- a/compiler-rt/test/fuzzer/CMakeLists.txt
+++ b/compiler-rt/test/fuzzer/CMakeLists.txt
@@ -50,6 +50,7 @@ macro(test_fuzzer stdlib)
set(LIBFUZZER_TEST_COMPILER ${COMPILER_RT_TEST_COMPILER})
get_test_cc_for_arch(${arch} LIBFUZZER_TEST_COMPILER LIBFUZZER_TEST_FLAGS)
+ set(LIBFUZZER_TEST_TARGET_ARCH ${arch})
set(LIBFUZZER_TEST_APPLE_PLATFORM "osx")
set(LIBFUZZER_TEST_STDLIB ${stdlib})
diff --git a/compiler-rt/test/fuzzer/compressed.test b/compiler-rt/test/fuzzer/compressed.test
index b2f4fd1d157..4c539c2229d 100644
--- a/compiler-rt/test/fuzzer/compressed.test
+++ b/compiler-rt/test/fuzzer/compressed.test
@@ -1,5 +1,6 @@
REQUIRES: linux
REQUIRES: zlib
+UNSUPPORTED: i386
# Custom mutator should find this bug, w/o custom -- no chance.
RUN: %cpp_compiler %S/CompressedTest.cpp -o %t-CompressedTestCustom -DCUSTOM_MUTATOR -lz
RUN: %cpp_compiler %S/CompressedTest.cpp -o %t-CompressedTestPlain -lz
diff --git a/compiler-rt/test/fuzzer/lit.cfg b/compiler-rt/test/fuzzer/lit.cfg
index b9e351432e0..fda7b30619c 100644
--- a/compiler-rt/test/fuzzer/lit.cfg
+++ b/compiler-rt/test/fuzzer/lit.cfg
@@ -6,6 +6,7 @@ config.name = "libFuzzer" + config.name_suffix
config.test_format = lit.formats.ShTest(True)
config.suffixes = ['.test']
config.test_source_root = os.path.dirname(__file__)
+config.available_features.add(config.target_arch)
# Choose between lit's internal shell pipeline runner and a real shell. If
# LIT_USE_INTERNAL_SHELL is in the environment, we use that as an override.
@@ -24,7 +25,7 @@ else:
# the test runner updated.
config.test_format = lit.formats.ShTest(execute_external)
-# LeakSanitizer is not supported on OSX or Windows right now.
+# LeakSanitizer is not supported on OSX, Windows, or i386 right now.
if (sys.platform.startswith('darwin') or
sys.platform.startswith('freebsd') or
sys.platform.startswith('netbsd') or
@@ -35,7 +36,8 @@ else:
config.available_features.add('lsan')
# MemorySanitizer is not supported on OSX or Windows right now
-if sys.platform.startswith('darwin') or sys.platform.startswith('win'):
+if (sys.platform.startswith('darwin') or sys.platform.startswith('win') or
+ config.target_arch == 'i386'):
lit_config.note('msan feature unavailable')
assert 'msan' not in config.available_features
else:
diff --git a/compiler-rt/test/fuzzer/lit.site.cfg.in b/compiler-rt/test/fuzzer/lit.site.cfg.in
index b333c78e59e..e48be2f4c6c 100644
--- a/compiler-rt/test/fuzzer/lit.site.cfg.in
+++ b/compiler-rt/test/fuzzer/lit.site.cfg.in
@@ -11,6 +11,7 @@ config.osx_sysroot_flag = "@OSX_SYSROOT_FLAG@"
config.cmake_binary_dir = "@CMAKE_BINARY_DIR@"
config.llvm_library_dir = "@LLVM_LIBRARY_DIR@"
config.target_triple = "@TARGET_TRIPLE@"
+config.target_arch = "@LIBFUZZER_TEST_TARGET_ARCH@"
# Load common config for all compiler-rt lit tests.
lit_config.load_config(config,
diff --git a/compiler-rt/test/fuzzer/trace-malloc-threaded.test b/compiler-rt/test/fuzzer/trace-malloc-threaded.test
index f38005c1d2f..c3d19ca1b54 100644
--- a/compiler-rt/test/fuzzer/trace-malloc-threaded.test
+++ b/compiler-rt/test/fuzzer/trace-malloc-threaded.test
@@ -1,7 +1,7 @@
// FIXME: This test infinite loops on darwin because it crashes
// printing a stack trace repeatedly
// FIXME: Disabled on Windows because of a crash (possibly related to above).
-UNSUPPORTED: darwin, aarch64, windows
+UNSUPPORTED: darwin, aarch64, windows, i386
RUN: %cpp_compiler %S/TraceMallocThreadedTest.cpp -o \
RUN: %t-TraceMallocThreadedTest
OpenPOWER on IntegriCloud