Author: Aiden Grossman Date: 2025-09-12T10:21:40-07:00 New Revision: e5db36b604db35efe3bd3930a1f3a31bf30ef5ec
URL: https://github.com/llvm/llvm-project/commit/e5db36b604db35efe3bd3930a1f3a31bf30ef5ec DIFF: https://github.com/llvm/llvm-project/commit/e5db36b604db35efe3bd3930a1f3a31bf30ef5ec.diff LOG: [Clang] Port ulimit tests to work with internal shell 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: https://github.com/llvm/llvm-project/pull/157977 Added: Modified: clang/test/PCH/leakfiles.test clang/test/SemaCXX/PR51712-large-array-constexpr-check-oom.cpp Removed: ################################################################################ diff --git a/clang/test/PCH/leakfiles.test b/clang/test/PCH/leakfiles.test index dc4047ac3ff48..45dc36f6708bf 100644 --- a/clang/test/PCH/leakfiles.test +++ b/clang/test/PCH/leakfiles.test @@ -1,9 +1,8 @@ // Test that compiling using a PCH doesn't leak file descriptors. // https://bugs.chromium.org/p/chromium/issues/detail?id=924225 // -// This test requires bash loops and ulimit. -// REQUIRES: shell -// UNSUPPORTED: target={{.*win32.*}} +// This test uses ulimit. +// UNSUPPORTED: system-windows // // Set up source files. lib/lib.h includes lots of lib*.h files in that dir. // client.c includes lib/lib.h, and also the individual files directly. @@ -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 _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
