[libFuzzer] [NFC] Remaining minor fixes to support testing on devices.

XFAIL's and adding %run commands.

llvm-svn: 334774
This commit is contained in:
George Karpenkov 2018-06-14 22:13:36 +00:00
parent 31730ae761
commit d7e1a9488b
7 changed files with 15 additions and 13 deletions

View File

@ -1,3 +1,3 @@
RUN: %cpp_compiler %S/AcquireCrashStateTest.cpp -o %t
RUN: %t 2>&1 | FileCheck %s
RUN: %run %t 2>&1 | FileCheck %s
CHECK-NOT: fuzz target exited

View File

@ -1,7 +1,7 @@
RUN: %cpp_compiler -mllvm -use-unknown-locations=Disable %S/NullDerefTest.cpp -o %t-NullDerefTest
RUN: %cpp_compiler -mllvm -use-unknown-locations=Disable %S/DSO1.cpp -fPIC -shared -o %t-DSO1.so
RUN: %cpp_compiler -mllvm -use-unknown-locations=Disable %S/DSO2.cpp -fPIC -shared -o %t-DSO2.so
RUN: %cpp_compiler -mllvm -use-unknown-locations=Disable %S/DSOTestMain.cpp %S/DSOTestExtra.cpp -L. %t-DSO1.so %t-DSO2.so -o %t-DSOTest
RUN: %cpp_compiler -mllvm -use-unknown-locations=Disable %S/DSO1.cpp -fPIC %ld_flags_rpath_so1 -shared -o %dynamiclib1
RUN: %cpp_compiler -mllvm -use-unknown-locations=Disable %S/DSO2.cpp -fPIC %ld_flags_rpath_so2 -shared -o %dynamiclib2
RUN: %cpp_compiler -mllvm -use-unknown-locations=Disable %S/DSOTestMain.cpp %S/DSOTestExtra.cpp %ld_flags_rpath_exe1 %ld_flags_rpath_exe2 -o %t-DSOTest
CHECK: COVERAGE:
CHECK: COVERED_FUNC: {{.*}}in LLVMFuzzerTestOneInput {{.*}}NullDerefTest.cpp:13
@ -9,9 +9,9 @@ RUN: not %run %t-NullDerefTest -print_coverage=1 2>&1 | FileCheck %s
RUN: %run %t-DSOTest -print_coverage=1 -runs=0 2>&1 | FileCheck %s --check-prefix=DSO
DSO: COVERAGE:
DSO-DAG: COVERED_FUNC:{{.*}}DSO1{{.*}}DSO1.cpp
DSO-DAG: COVERED_FUNC:{{.*}}DSO2{{.*}}DSO2.cpp
DSO-DAG: COVERED_FUNC:{{.*}}1{{.*}}
DSO-DAG: COVERED_FUNC:{{.*}}2{{.*}}
DSO-DAG: COVERED_FUNC:{{.*}}LLVMFuzzerTestOneInput{{.*}}DSOTestMain
DSO-DAG: UNCOVERED_PC:{{.*}}DSO1.cpp
DSO-DAG: UNCOVERED_PC:{{.*}}DSO2.cpp
DSO-DAG: UNCOVERED_PC:{{.*}}1
DSO-DAG: UNCOVERED_PC:{{.*}}2
DSO-DAG: UNCOVERED_PC:{{.*}}DSOTestMain

View File

@ -6,10 +6,10 @@ RUN: %cpp_compiler -fsanitize-coverage=0 -fsanitize-coverage=trace-pc-guard %S/D
RUN: %cpp_compiler -fsanitize-coverage=0 -fsanitize-coverage=trace-pc-guard %S/NullDerefTest.cpp -o %t-NullDerefTest
RUN: rm -rf %t_workdir && mkdir -p %t_workdir
RUN: env ASAN_OPTIONS=coverage_dir='"%t_workdir"' not %t-NullDerefTest -dump_coverage=1 2>&1 | FileCheck %s
RUN: env ASAN_OPTIONS=coverage_dir='"%t_workdir"' not %run %t-NullDerefTest -dump_coverage=1 2>&1 | FileCheck %s
RUN: sancov -covered-functions %t-NullDerefTest* %t_workdir/*.sancov | FileCheck %s --check-prefix=SANCOV
RUN: env ASAN_OPTIONS=coverage_dir='"%t_workdir"' %t-DSOTest -dump_coverage=1 -runs=0 2>&1 | FileCheck %s --check-prefix=DSO
RUN: env ASAN_OPTIONS=coverage_dir='"%t_workdir"' not %t-NullDerefTest -dump_coverage=0 2>&1 | FileCheck %s --check-prefix=NOCOV
RUN: env ASAN_OPTIONS=coverage_dir='"%t_workdir"' %run %t-DSOTest -dump_coverage=1 -runs=0 2>&1 | FileCheck %s --check-prefix=DSO
RUN: env ASAN_OPTIONS=coverage_dir='"%t_workdir"' not %run %t-NullDerefTest -dump_coverage=0 2>&1 | FileCheck %s --check-prefix=NOCOV
CHECK: SanitizerCoverage: {{.*}}NullDerefTest.{{.*}}.sancov: {{.*}} PCs written
SANCOV: LLVMFuzzerTestOneInput

View File

@ -1,4 +1,4 @@
RUN: %cpp_compiler -fsanitize=undefined -fno-sanitize-recover=all %S/SignedIntOverflowTest.cpp -o %run %t-SignedIntOverflowTest-Ubsan
RUN: %cpp_compiler -fsanitize=undefined -fno-sanitize-recover=all %S/SignedIntOverflowTest.cpp -o %t-SignedIntOverflowTest-Ubsan
RUN: not %run %t-SignedIntOverflowTest-Ubsan 2>&1 | FileCheck %s
CHECK: runtime error: signed integer overflow: 2147483647 + 1 cannot be represented in type 'int'
CHECK: Test unit written to ./crash-

View File

@ -1,3 +1,4 @@
XFAIL: ios
RUN: mkdir -p %t
RUN: %cpp_compiler %S/FullCoverageSetTest.cpp -o %t/T

View File

@ -1,3 +1,4 @@
# XFAIL: ios
# Check that libFuzzer honors SIGUSR1/SIGUSR2
RUN: rm -rf %t
RUN: mkdir -p %t

View File

@ -1,2 +1,2 @@
RUN: %cpp_compiler %S/SymbolizeDeadlock.cpp -o %t
RUN: not %t -rss_limit_mb=20 2>&1
RUN: not %run %t -rss_limit_mb=20 2>&1