-
Notifications
You must be signed in to change notification settings - Fork 15.4k
[Clang] Port ulimit tests to work with internal shell #157977
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Clang] Port ulimit tests to work with internal shell #157977
Conversation
Created using spr 1.3.6 [skip ci]
Created using spr 1.3.6
|
@llvm/pr-subscribers-clang Author: Aiden Grossman (boomanaiden154) ChangesNow that ulimit is implemented for the internal shell, we can make sure Full diff: https://github.com/llvm/llvm-project/pull/157977.diff 2 Files Affected:
diff --git a/clang/test/PCH/leakfiles.test b/clang/test/PCH/leakfiles.test
index dc4047ac3ff48..6f7420362a2c6 100644
--- a/clang/test/PCH/leakfiles.test
+++ b/clang/test/PCH/leakfiles.test
@@ -2,7 +2,6 @@
// https://bugs.chromium.org/p/chromium/issues/detail?id=924225
//
// This test requires bash loops and ulimit.
-// REQUIRES: shell
// UNSUPPORTED: target={{.*win32.*}}
//
// Set up source files. lib/lib.h includes lots of lib*.h files in that dir.
@@ -12,10 +11,10 @@
// RUN: mkdir %t
// RUN: cd %t
// RUN: mkdir lib
-// RUN: for i in {1..300}; do touch lib/lib$i.h; done
-// RUN: for i in {1..300}; do echo "#include \"lib$i.h\"" >> lib/lib.h; done
+// RUN: %python -c "from pathlib import Path; list(map(lambda i: Path(f'lib/lib{i}.h').touch(), range(1, 301)))"
+// RUN: %python -c "for i in range(1, 301): print(f'#include \"lib{i}.h\"')" > lib/lib.h
// RUN: echo "#include \"lib/lib.h\"" > client.c
-// RUN: for i in {1..300}; do echo "#include \"lib/lib$i.h\"" >> client.c; done
+// RUN: %python -c "for i in range(1, 301): print(f'#include \"lib/lib{i}.h\"')" > client.c
//
// We want to verify that we don't hold all the files open at the same time.
// This is important e.g. on mac, which has a low default FD limit.
diff --git a/clang/test/SemaCXX/PR51712-large-array-constexpr-check-oom.cpp b/clang/test/SemaCXX/PR51712-large-array-constexpr-check-oom.cpp
index 98e1a9afae6ea..df5d8c513d514 100644
--- a/clang/test/SemaCXX/PR51712-large-array-constexpr-check-oom.cpp
+++ b/clang/test/SemaCXX/PR51712-large-array-constexpr-check-oom.cpp
@@ -1,7 +1,6 @@
// Only run this test where ulimit is known to work well.
// (There's nothing really platform-specific being tested, this is just ulimit).
//
-// REQUIRES: shell
// REQUIRES: system-linux
// UNSUPPORTED: msan
// UNSUPPORTED: asan
|
Created using spr 1.3.6 [skip ci]
Created using spr 1.3.6 [skip ci]
Created using spr 1.3.6 [skip ci]
Now that ulimit is implemented for the internal shell, we can make sure that the clang tests utilizing ulimit actually work. One just needs the removal of its shell requirement while the other one needs some rework to avoid bash for loops. These are writtein in Python for about the same amount of complexity. Reviewers: ilovepi, cmtice, AaronBallman, Sirraide, petrhosek Reviewed By: ilovepi Pull Request: llvm/llvm-project#157977
Now that ulimit is implemented for the internal shell, we can make sure
that the clang tests utilizing ulimit actually work. One just needs the
removal of its shell requirement while the other one needs some rework
to avoid bash for loops. These are writtein in Python for about the same
amount of complexity.