[llvm] cae7dec - [LIT][Cygwin] Mark `ulimit -n` unsupported for Cygwin (#164604)

via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 22 23:52:02 PDT 2025


Author: Tomohiro Kashiwada
Date: 2025-10-23T09:51:57+03:00
New Revision: cae7dec112800cb6670324f52098e10a432d3306

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

LOG: [LIT][Cygwin] Mark `ulimit -n` unsupported for Cygwin (#164604)

Cygwin doesn't support `ulimit -n` because Windows doesn't provide such
functionality.

Added: 
    

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

Removed: 
    


################################################################################
diff  --git a/llvm/utils/lit/lit/run.py b/llvm/utils/lit/lit/run.py
index 62070e824e87f..55de914d4d2e0 100644
--- a/llvm/utils/lit/lit/run.py
+++ b/llvm/utils/lit/lit/run.py
@@ -137,6 +137,10 @@ def _increase_process_limit(self):
                     "Raised process limit from %d to %d" % (soft_limit, desired_limit)
                 )
         except Exception as ex:
-            # Warn, unless this is Windows or z/OS, in which case this is expected.
-            if os.name != "nt" and platform.system() != "OS/390":
+            # Warn, unless this is Windows, z/OS, or Cygwin in which case this is expected.
+            if (
+                os.name != "nt"
+                and platform.system() != "OS/390"
+                and platform.sys.platform != "cygwin"
+            ):
                 self.lit_config.warning("Failed to raise process limit: %s" % ex)

diff  --git a/llvm/utils/lit/tests/shtest-ulimit.py b/llvm/utils/lit/tests/shtest-ulimit.py
index dadde70336812..09cd475b737c1 100644
--- a/llvm/utils/lit/tests/shtest-ulimit.py
+++ b/llvm/utils/lit/tests/shtest-ulimit.py
@@ -3,7 +3,7 @@
 # ulimit does not work on non-POSIX platforms.
 # Solaris for some reason does not respect ulimit -n, so mark it unsupported
 # as well.
-# UNSUPPORTED: system-windows, system-solaris
+# UNSUPPORTED: system-windows, system-cygwin, system-solaris
 
 # RUN: %{python} %S/Inputs/shtest-ulimit/print_limits.py | grep RLIMIT_NOFILE \
 # RUN:   | sed -n -e 's/.*=//p' | tr -d '\n' > %t.nofile_limit


        


More information about the llvm-commits mailing list