diff --git a/llvm/lib/Fuzzer/test/CMakeLists.txt b/llvm/lib/Fuzzer/test/CMakeLists.txt index 1080b30ec39b..fc663883ea19 100644 --- a/llvm/lib/Fuzzer/test/CMakeLists.txt +++ b/llvm/lib/Fuzzer/test/CMakeLists.txt @@ -4,6 +4,11 @@ # for the Fuzzer lib) set(CMAKE_CXX_FLAGS_RELEASE "${LIBFUZZER_FLAGS_BASE} -O0 -fsanitize-coverage=edge,indirect-calls") +set(DFSanTests + DFSanMemcmpTest + DFSanSimpleCmpTest + ) + set(Tests CounterTest CxxTokensTest @@ -13,12 +18,9 @@ set(Tests NullDerefTest SimpleTest TimeoutTest + ${DFSanTests} ) -set(DFSanTests - DFSanMemcmpTest - DFSanSimpleCmpTest - ) set(TestBinaries) @@ -60,7 +62,7 @@ set(TestBinaries ${TestBinaries} LLVMFuzzer-Unittest) add_subdirectory(dfsan) foreach(Test ${DFSanTests}) - set(TestBinaries ${TestBinaries} LLVMFuzzer-${Test}) + set(TestBinaries ${TestBinaries} LLVMFuzzer-${Test}-DFSan) endforeach() diff --git a/llvm/lib/Fuzzer/test/dfsan/DFSanMemcmpTest.cpp b/llvm/lib/Fuzzer/test/DFSanMemcmpTest.cpp similarity index 100% rename from llvm/lib/Fuzzer/test/dfsan/DFSanMemcmpTest.cpp rename to llvm/lib/Fuzzer/test/DFSanMemcmpTest.cpp diff --git a/llvm/lib/Fuzzer/test/dfsan/DFSanSimpleCmpTest.cpp b/llvm/lib/Fuzzer/test/DFSanSimpleCmpTest.cpp similarity index 100% rename from llvm/lib/Fuzzer/test/dfsan/DFSanSimpleCmpTest.cpp rename to llvm/lib/Fuzzer/test/DFSanSimpleCmpTest.cpp diff --git a/llvm/lib/Fuzzer/test/dfsan/CMakeLists.txt b/llvm/lib/Fuzzer/test/dfsan/CMakeLists.txt index d1a140d6b50b..2b49831fcdb8 100644 --- a/llvm/lib/Fuzzer/test/dfsan/CMakeLists.txt +++ b/llvm/lib/Fuzzer/test/dfsan/CMakeLists.txt @@ -4,10 +4,10 @@ set(CMAKE_CXX_FLAGS_RELEASE "${LIBFUZZER_FLAGS_BASE} -O0 -fno-sanitize=all -fsanitize=dataflow") foreach(Test ${DFSanTests}) - add_executable(LLVMFuzzer-${Test} - ${Test}.cpp + add_executable(LLVMFuzzer-${Test}-DFSan + ../${Test}.cpp ) - target_link_libraries(LLVMFuzzer-${Test} + target_link_libraries(LLVMFuzzer-${Test}-DFSan LLVMFuzzer ) endforeach() diff --git a/llvm/lib/Fuzzer/test/fuzzer.test b/llvm/lib/Fuzzer/test/fuzzer.test index 9006c4a706d5..7d1908f61798 100644 --- a/llvm/lib/Fuzzer/test/fuzzer.test +++ b/llvm/lib/Fuzzer/test/fuzzer.test @@ -19,9 +19,9 @@ RUN: not ./LLVMFuzzer-FourIndependentBranchesTest -timeout=15 -seed=1 -use_cover RUN: not ./LLVMFuzzer-CounterTest -use_counters=1 -max_len=6 -seed=1 -timeout=15 2>&1 | FileCheck %s -RUN: not ./LLVMFuzzer-DFSanSimpleCmpTest -seed=1 -runs=1000000 -timeout=5 2>&1 | FileCheck %s +RUN: not ./LLVMFuzzer-DFSanSimpleCmpTest-DFSan -seed=1 -runs=1000000 -timeout=5 2>&1 | FileCheck %s -RUN: not ./LLVMFuzzer-DFSanMemcmpTest -seed=1 -runs=100 -timeout=5 2>&1 | FileCheck %s +RUN: not ./LLVMFuzzer-DFSanMemcmpTest-DFSan -seed=1 -runs=100 -timeout=5 2>&1 | FileCheck %s RUN: not ./LLVMFuzzer-CxxTokensTest -seed=1 -timeout=15 -tokens=%S/../cxx_fuzzer_tokens.txt 2>&1 | FileCheck %s