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
31 lines
792 B
C++
31 lines
792 B
C++
// Check that UAR mode can handle very deep recusrion.
|
|
// REQUIRES: shell
|
|
// RUN: %clangxx_asan -O2 %s -o %t
|
|
// RUN: ulimit -s 4096
|
|
// RUN: %env_asan_opts=detect_stack_use_after_return=1 %run %t 2>&1 | FileCheck %s
|
|
|
|
// Also check that use_sigaltstack+verbosity doesn't crash.
|
|
// RUN: %env_asan_opts=verbosity=1:use_sigaltstack=1:detect_stack_use_after_return=1 %run %t | FileCheck %s
|
|
|
|
// UNSUPPORTED: ios
|
|
|
|
#include <stdio.h>
|
|
|
|
__attribute__((noinline))
|
|
void RecursiveFunc(int depth, int *ptr) {
|
|
if ((depth % 1000) == 0)
|
|
printf("[%05d] ptr: %p\n", depth, ptr);
|
|
if (depth == 0)
|
|
return;
|
|
int local;
|
|
RecursiveFunc(depth - 1, &local);
|
|
}
|
|
|
|
int main(int argc, char **argv) {
|
|
RecursiveFunc(15000, 0);
|
|
return 0;
|
|
}
|
|
// CHECK: [15000] ptr:
|
|
// CHECK: [07000] ptr:
|
|
// CHECK: [00000] ptr:
|