[llvm] f8f7f1b - [lit] Update shtest-ulimit.py to explicitly check default limits (#164678)

via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 22 11:50:53 PDT 2025


Author: Aiden Grossman
Date: 2025-10-22T18:50:46Z
New Revision: f8f7f1b67c8ee5d81847955dc36fab86a6d129ad

URL: https://github.com/llvm/llvm-project/commit/f8f7f1b67c8ee5d81847955dc36fab86a6d129ad
DIFF: https://github.com/llvm/llvm-project/commit/f8f7f1b67c8ee5d81847955dc36fab86a6d129ad.diff

LOG: [lit] Update shtest-ulimit.py to explicitly check default limits (#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.

Added: 
    

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

Removed: 
    


################################################################################
diff  --git a/llvm/utils/lit/tests/shtest-ulimit.py b/llvm/utils/lit/tests/shtest-ulimit.py
index 9a8febd3333c4..dadde70336812 100644
--- a/llvm/utils/lit/tests/shtest-ulimit.py
+++ b/llvm/utils/lit/tests/shtest-ulimit.py
@@ -5,7 +5,11 @@
 # as well.
 # UNSUPPORTED: system-windows, system-solaris
 
-# RUN: not %{lit} -a -v %{inputs}/shtest-ulimit --order=lexical | FileCheck %s
+# RUN: %{python} %S/Inputs/shtest-ulimit/print_limits.py | grep RLIMIT_NOFILE \
+# RUN:   | sed -n -e 's/.*=//p' | tr -d '\n' > %t.nofile_limit
+
+# RUN: not %{lit} -a -v %{inputs}/shtest-ulimit --order=lexical \
+# RUN:   | FileCheck -DBASE_NOFILE_LIMIT=%{readfile:%t.nofile_limit} %s
 
 # CHECK: -- Testing: 3 tests{{.*}}
 
@@ -18,4 +22,4 @@
 # CHECK: RLIMIT_NOFILE=50
 
 # CHECK-LABEL: FAIL: shtest-ulimit :: ulimit_reset.txt ({{[^)]*}})
-# CHECK-NOT: RLIMIT_NOFILE=50
+# CHECK: RLIMIT_NOFILE=[[BASE_NOFILE_LIMIT]]


        


More information about the llvm-commits mailing list