
This patch adds the `REQUIRES: shell` directive to six test files that use the `ulimit` command, ensuring these tests are only run in environments where a full POSIX-compliant shell is available. The lit internal shell does not use or support the `ulimit` command, which causes failures when running tests with `LIT_USE_INTERNAL_SHELL=1 ninja check-compiler-rt` Specifically, one of the errors encountered is: ``` # RUN: at line 4 ulimit -s 1000 # executed command: ulimit -s 1000 # .---command stderr------------ # | 'ulimit': command not found # `----------------------------- # error: command failed with exit status: 127 ``` Since, the lit internal shell doesn't support `ulimit`, adding this requirement prevents these tests from failing in the lit internal shell, thereby improving the reliability of the test suite in environments where the full shell is not available. This change is relevant for [[RFC] Enabling the Lit Internal Shell by Default](https://discourse.llvm.org/t/rfc-enabling-the-lit-internal-shell-by-default/80179/3) fixes: #102398
26 lines
898 B
Plaintext
26 lines
898 B
Plaintext
REQUIRES: shell
|
|
XFAIL: ios
|
|
RUN: %cpp_compiler %S/FullCoverageSetTest.cpp -o %t-FullCoverageSetTest
|
|
|
|
RUN: rm -rf %tmp/T1 %tmp/T2
|
|
RUN: mkdir -p %tmp/T1 %tmp/T2
|
|
|
|
RUN: echo F..... > %tmp/T1/1
|
|
RUN: echo .U.... > %tmp/T1/2
|
|
RUN: echo ..Z... > %tmp/T1/3
|
|
|
|
RUN: echo .....F > %tmp/T2/1
|
|
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
|
|
|
|
# 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)
|
|
SIGXFSZ: ERROR: libFuzzer: file size exceeded
|
|
|
|
# Check that we honor TMPDIR
|
|
RUN: TMPDIR=DIR_DOES_NOT_EXIST not %run %t-FullCoverageSetTest -merge=1 %tmp/T1 %tmp/T2 2>&1 | FileCheck %s --check-prefix=TMPDIR
|
|
TMPDIR: MERGE-OUTER: failed to write to the control file: DIR_DOES_NOT_EXIST/libFuzzerTemp
|