[compiler-rt] r317756 - [libFuzzer] mechanically simplify a test, NFC

Kostya Serebryany via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 8 18:13:44 PST 2017


Author: kcc
Date: Wed Nov  8 18:13:43 2017
New Revision: 317756

URL: http://llvm.org/viewvc/llvm-project?rev=317756&view=rev
Log:
[libFuzzer] mechanically simplify a test, NFC

Modified:
    compiler-rt/trunk/test/fuzzer/merge.test

Modified: compiler-rt/trunk/test/fuzzer/merge.test
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/fuzzer/merge.test?rev=317756&r1=317755&r2=317756&view=diff
==============================================================================
--- compiler-rt/trunk/test/fuzzer/merge.test (original)
+++ compiler-rt/trunk/test/fuzzer/merge.test Wed Nov  8 18:13:43 2017
@@ -2,65 +2,65 @@ CHECK: BINGO
 
 RUN: %cpp_compiler %S/FullCoverageSetTest.cpp -o %t-FullCoverageSetTest
 
-RUN: rm -rf %tmp/T0 %tmp/T1 %tmp/T2
-RUN: mkdir -p %tmp/T0 %tmp/T1 %tmp/T2
-RUN: echo F..... > %tmp/T0/1
-RUN: echo .U.... > %tmp/T0/2
-RUN: echo ..Z... > %tmp/T0/3
+RUN: rm -rf %t/T0 %t/T1 %t/T2
+RUN: mkdir -p %t/T0 %t/T1 %t/T2
+RUN: echo F..... > %t/T0/1
+RUN: echo .U.... > %t/T0/2
+RUN: echo ..Z... > %t/T0/3
 
 # T1 has 3 elements, T2 is empty.
-RUN: cp %tmp/T0/* %tmp/T1/
-RUN: %t-FullCoverageSetTest         -merge=1 %tmp/T1 %tmp/T2 2>&1 | FileCheck %s --check-prefix=CHECK1
+RUN: cp %t/T0/* %t/T1/
+RUN: %t-FullCoverageSetTest         -merge=1 %t/T1 %t/T2 2>&1 | FileCheck %s --check-prefix=CHECK1
 CHECK1: MERGE-OUTER: 3 files, 3 in the initial corpus
 CHECK1: MERGE-OUTER: 0 new files with 0 new features added
 
-RUN: echo ...Z.. > %tmp/T2/1
-RUN: echo ....E. > %tmp/T2/2
-RUN: echo .....R > %tmp/T2/3
-RUN: echo F..... > %tmp/T2/a
-RUN: echo .U.... > %tmp/T2/b
-RUN: echo ..Z... > %tmp/T2/c
+RUN: echo ...Z.. > %t/T2/1
+RUN: echo ....E. > %t/T2/2
+RUN: echo .....R > %t/T2/3
+RUN: echo F..... > %t/T2/a
+RUN: echo .U.... > %t/T2/b
+RUN: echo ..Z... > %t/T2/c
 
 # T1 has 3 elements, T2 has 6 elements, only 3 are new.
-RUN: %t-FullCoverageSetTest         -merge=1 %tmp/T1 %tmp/T2 2>&1 | FileCheck %s --check-prefix=CHECK2
+RUN: %t-FullCoverageSetTest         -merge=1 %t/T1 %t/T2 2>&1 | FileCheck %s --check-prefix=CHECK2
 CHECK2: MERGE-OUTER: 9 files, 3 in the initial corpus
 CHECK2: MERGE-OUTER: 3 new files with 3 new features added
 
 # Now, T1 has 6 units and T2 has no new interesting units.
-RUN: %t-FullCoverageSetTest         -merge=1 %tmp/T1 %tmp/T2 2>&1 | FileCheck %s --check-prefix=CHECK3
+RUN: %t-FullCoverageSetTest         -merge=1 %t/T1 %t/T2 2>&1 | FileCheck %s --check-prefix=CHECK3
 CHECK3: MERGE-OUTER: 12 files, 6 in the initial corpus
 CHECK3: MERGE-OUTER: 0 new files with 0 new features added
 
 # Check that we respect max_len during the merge and don't crash.
-RUN: rm %tmp/T1/*
-RUN: cp %tmp/T0/* %tmp/T1/
-RUN: echo looooooooong > %tmp/T2/looooooooong
-RUN: %t-FullCoverageSetTest         -merge=1 %tmp/T1 %tmp/T2 -max_len=6 2>&1 | FileCheck %s --check-prefix=MAX_LEN
+RUN: rm %t/T1/*
+RUN: cp %t/T0/* %t/T1/
+RUN: echo looooooooong > %t/T2/looooooooong
+RUN: %t-FullCoverageSetTest         -merge=1 %t/T1 %t/T2 -max_len=6 2>&1 | FileCheck %s --check-prefix=MAX_LEN
 MAX_LEN: MERGE-OUTER: 3 new files
 
 # Check that we respect -merge_control_file=FILE
-RUN: rm %tmp/T1/*
-RUN: cp %tmp/T0/* %tmp/T1/
-RUN: rm -f %tmp/MCF
-RUN: %t-FullCoverageSetTest -merge=1 -merge_control_file=%tmp/MCF %tmp/T1 %tmp/T2 2>&1 | FileCheck %s --check-prefix=MCF
-RUN: grep STARTED %tmp/MCF
-RUN: grep DONE %tmp/MCF
+RUN: rm %t/T1/*
+RUN: cp %t/T0/* %t/T1/
+RUN: rm -f %t/MCF
+RUN: %t-FullCoverageSetTest -merge=1 -merge_control_file=%t/MCF %t/T1 %t/T2 2>&1 | FileCheck %s --check-prefix=MCF
+RUN: grep STARTED %t/MCF
+RUN: grep DONE %t/MCF
 MCF: MERGE-INNER: using the control file {{.*}}MCF
 MCF: MERGE-OUTER: 3 new files
 
 
 # Check that merge tolerates failures.
-RUN: rm %tmp/T1/*
-RUN: cp %tmp/T0/* %tmp/T1/
-RUN: echo 'FUZZER' > %tmp/T2/FUZZER
-RUN: %t-FullCoverageSetTest -merge=1 %tmp/T1 %tmp/T2 2>&1 | FileCheck %s --check-prefix=MERGE_WITH_CRASH
+RUN: rm %t/T1/*
+RUN: cp %t/T0/* %t/T1/
+RUN: echo 'FUZZER' > %t/T2/FUZZER
+RUN: %t-FullCoverageSetTest -merge=1 %t/T1 %t/T2 2>&1 | FileCheck %s --check-prefix=MERGE_WITH_CRASH
 MERGE_WITH_CRASH: MERGE-OUTER: succesfull in 2 attempt(s)
 MERGE_WITH_CRASH: MERGE-OUTER: 3 new files
 
 # Check that we actually limit the size with max_len
-RUN: %t-FullCoverageSetTest -merge=1 %tmp/T1 %tmp/T2  -max_len=5 2>&1 | FileCheck %s --check-prefix=MERGE_LEN5
+RUN: %t-FullCoverageSetTest -merge=1 %t/T1 %t/T2  -max_len=5 2>&1 | FileCheck %s --check-prefix=MERGE_LEN5
 MERGE_LEN5: MERGE-OUTER: succesfull in 1 attempt(s)
 
-RUN: rm -rf  %tmp/T1/* %tmp/T2/*
-RUN: not %t-FullCoverageSetTest -merge=1 %tmp/T1 %tmp/T2 2>&1 | FileCheck %s --check-prefix=EMPTY
+RUN: rm -rf  %t/T1/* %t/T2/*
+RUN: not %t-FullCoverageSetTest -merge=1 %t/T1 %t/T2 2>&1 | FileCheck %s --check-prefix=EMPTY
 EMPTY: MERGE-OUTER: zero succesfull attempts, exiting




More information about the llvm-commits mailing list