[compiler-rt] c4be17a - [compiler-rt] [libFuzzer] Fix merge-posix.test file size test (#168137)
via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 17 10:28:30 PST 2025
Author: Andrew Haberlandt
Date: 2025-11-17T10:28:26-08:00
New Revision: c4be17a8877ba406bcda63c5398bc09ebb32598a
URL: https://github.com/llvm/llvm-project/commit/c4be17a8877ba406bcda63c5398bc09ebb32598a
DIFF: https://github.com/llvm/llvm-project/commit/c4be17a8877ba406bcda63c5398bc09ebb32598a.diff
LOG: [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.
Added:
Modified:
compiler-rt/test/fuzzer/merge-posix.test
Removed:
################################################################################
diff --git a/compiler-rt/test/fuzzer/merge-posix.test b/compiler-rt/test/fuzzer/merge-posix.test
index 2721668fb9706..5e342142216f8 100644
--- a/compiler-rt/test/fuzzer/merge-posix.test
+++ b/compiler-rt/test/fuzzer/merge-posix.test
@@ -14,7 +14,7 @@ RUN: echo ....U. > %tmp/T2/2
RUN: echo ...Z.. > %tmp/T2/3
RUN: echo ...Z.. > %tmp/T2/4
RUN: echo ....E. > %tmp/T2/5
-RUN: echo .....R > %tmp/T2/6
+RUN: %python -c "print('.....R' + 'X' * 1024, end='')" > %tmp/T2/6
# Check that we can report an error if file size exceeded
RUN: (ulimit -f 1; not %run %t-FullCoverageSetTest -merge=1 %tmp/T1 %tmp/T2 2>&1 | FileCheck %s --check-prefix=SIGXFSZ)
More information about the llvm-commits
mailing list