Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[llvm-lit] Ulimit command not found in lit internal shell #102398

Closed
6 tasks done
Harini0924 opened this issue Aug 7, 2024 · 0 comments · Fixed by #105339
Closed
6 tasks done

[llvm-lit] Ulimit command not found in lit internal shell #102398

Harini0924 opened this issue Aug 7, 2024 · 0 comments · Fixed by #105339

Comments

@Harini0924
Copy link
Contributor

Harini0924 commented Aug 7, 2024

The LLVM's lit internal shell fails to find the ulimit command and fails to set resource limits.
Error displayed:

# executed command: ulimit -s 1000
# .---command stderr------------
# | 'ulimit': command not found
# `-----------------------------
# error: command failed with exit status: 127

Files with failure:

  • compiler-rt/test/asan/TestCases/Linux/allocator_oom_test.cpp
  • compiler-rt/test/asan/TestCases/Posix/deep_call_stack.cpp
  • compiler-rt/test/fuzzer/merge-posix.test
  • compiler-rt/test/fuzzer/ulimit.test
  • compiler-rt/test/hwasan/TestCases/print-memory-usage.c
  • compiler-rt/test/msan/Linux/reexec_unlimited_stack.cpp
@Harini0924 Harini0924 self-assigned this Aug 25, 2024
Harini0924 added a commit that referenced this issue Aug 26, 2024
…` command (#105339)

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants