Skip to content

Commit 6a075cf

Browse files
boomanaiden154Lukacma
authored andcommitted
[lit] Update shtest-ulimit.py to explicitly check default limits (llvm#164678)
The recently added ulimit_reset.txt section in shtest-ulimit.py was failing on some builders if the default file descriptor limit started with 50. This patch fixes that by explicitly checking that the file descriptor limit is equal to the default value.
1 parent b46f2f5 commit 6a075cf

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

llvm/utils/lit/tests/shtest-ulimit.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,11 @@
55
# as well.
66
# UNSUPPORTED: system-windows, system-solaris
77

8-
# RUN: not %{lit} -a -v %{inputs}/shtest-ulimit --order=lexical | FileCheck %s
8+
# RUN: %{python} %S/Inputs/shtest-ulimit/print_limits.py | grep RLIMIT_NOFILE \
9+
# RUN: | sed -n -e 's/.*=//p' | tr -d '\n' > %t.nofile_limit
10+
11+
# RUN: not %{lit} -a -v %{inputs}/shtest-ulimit --order=lexical \
12+
# RUN: | FileCheck -DBASE_NOFILE_LIMIT=%{readfile:%t.nofile_limit} %s
913

1014
# CHECK: -- Testing: 3 tests{{.*}}
1115

@@ -18,4 +22,4 @@
1822
# CHECK: RLIMIT_NOFILE=50
1923

2024
# CHECK-LABEL: FAIL: shtest-ulimit :: ulimit_reset.txt ({{[^)]*}})
21-
# CHECK-NOT: RLIMIT_NOFILE=50
25+
# CHECK: RLIMIT_NOFILE=[[BASE_NOFILE_LIMIT]]

0 commit comments

Comments
 (0)