xref: /llvm-project/compiler-rt/test/fuzzer/merge-posix.test (revision 2d37e48e2439f70ed394bcca5c065ca2c8f5ae94)
1REQUIRES: shell
2XFAIL: ios
3RUN: %cpp_compiler %S/FullCoverageSetTest.cpp -o %t-FullCoverageSetTest
4
5RUN: rm -rf  %tmp/T1 %tmp/T2
6RUN: mkdir -p %tmp/T1 %tmp/T2
7
8RUN: echo F..... > %tmp/T1/1
9RUN: echo .U.... > %tmp/T1/2
10RUN: echo ..Z... > %tmp/T1/3
11
12RUN: echo .....F > %tmp/T2/1
13RUN: echo ....U. > %tmp/T2/2
14RUN: echo ...Z.. > %tmp/T2/3
15RUN: echo ...Z.. > %tmp/T2/4
16RUN: echo ....E. > %tmp/T2/5
17RUN: echo .....R > %tmp/T2/6
18
19# Check that we can report an error if file size exceeded
20RUN: (ulimit -f 1; not %run %t-FullCoverageSetTest -merge=1 %tmp/T1 %tmp/T2 2>&1 | FileCheck %s --check-prefix=SIGXFSZ)
21SIGXFSZ: ERROR: libFuzzer: file size exceeded
22
23# Check that we honor TMPDIR
24RUN: TMPDIR=DIR_DOES_NOT_EXIST not %run %t-FullCoverageSetTest -merge=1 %tmp/T1 %tmp/T2 2>&1 | FileCheck %s --check-prefix=TMPDIR
25TMPDIR: MERGE-OUTER: failed to write to the control file: DIR_DOES_NOT_EXIST/libFuzzerTemp
26