Skip to content

Commit 554dd73

Browse files
kikairoyaLukacma
authored andcommitted
[LIT][Cygwin] Mark ulimit -n unsupported for Cygwin (llvm#164604)
Cygwin doesn't support `ulimit -n` because Windows doesn't provide such functionality.
1 parent 75d93f0 commit 554dd73

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

llvm/utils/lit/lit/run.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,10 @@ def _increase_process_limit(self):
137137
"Raised process limit from %d to %d" % (soft_limit, desired_limit)
138138
)
139139
except Exception as ex:
140-
# Warn, unless this is Windows or z/OS, in which case this is expected.
141-
if os.name != "nt" and platform.system() != "OS/390":
140+
# Warn, unless this is Windows, z/OS, or Cygwin in which case this is expected.
141+
if (
142+
os.name != "nt"
143+
and platform.system() != "OS/390"
144+
and platform.sys.platform != "cygwin"
145+
):
142146
self.lit_config.warning("Failed to raise process limit: %s" % ex)

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# ulimit does not work on non-POSIX platforms.
44
# Solaris for some reason does not respect ulimit -n, so mark it unsupported
55
# as well.
6-
# UNSUPPORTED: system-windows, system-solaris
6+
# UNSUPPORTED: system-windows, system-cygwin, system-solaris
77

88
# RUN: %{python} %S/Inputs/shtest-ulimit/print_limits.py | grep RLIMIT_NOFILE \
99
# RUN: | sed -n -e 's/.*=//p' | tr -d '\n' > %t.nofile_limit

0 commit comments

Comments
 (0)