mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-19 04:32:19 +00:00
[lib/Fuzzer] build tests that work well with dfsan also w/o dfsan
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236909 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
8ae273d380
commit
5ba2a0b8b0
@ -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()
|
||||
|
||||
|
||||
|
@ -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()
|
||||
|
@ -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
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user