Skip to content

Commit c4be17a

Browse files
authored
[compiler-rt] [libFuzzer] Fix merge-posix.test file size test (#168137)
This test uses `ulimit -f 1` to test what libFuzzer does when trying to create a file > **_1KB_**. However, the none of the input files used by this test are actually >= 1KB, so there's no reason to expect this test to pass. This test appears to be passing on accident since the "control file" happens to be > 1KB, but this is not always the case depending upon the length of the path where the test is run from. This modifies the test to ensure that one of the input file is actually >1KB.
1 parent 4be0ab6 commit c4be17a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

compiler-rt/test/fuzzer/merge-posix.test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ RUN: echo ....U. > %tmp/T2/2
1414
RUN: echo ...Z.. > %tmp/T2/3
1515
RUN: echo ...Z.. > %tmp/T2/4
1616
RUN: echo ....E. > %tmp/T2/5
17-
RUN: echo .....R > %tmp/T2/6
17+
RUN: %python -c "print('.....R' + 'X' * 1024, end='')" > %tmp/T2/6
1818

1919
# Check that we can report an error if file size exceeded
2020
RUN: (ulimit -f 1; not %run %t-FullCoverageSetTest -merge=1 %tmp/T1 %tmp/T2 2>&1 | FileCheck %s --check-prefix=SIGXFSZ)

0 commit comments

Comments
 (0)