Skip to content

Commit e5db36b

Browse files
[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: #157977
1 parent fd58f23 commit e5db36b

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

clang/test/PCH/leakfiles.test

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
// Test that compiling using a PCH doesn't leak file descriptors.
22
// https://bugs.chromium.org/p/chromium/issues/detail?id=924225
33
//
4-
// This test requires bash loops and ulimit.
5-
// REQUIRES: shell
6-
// UNSUPPORTED: target={{.*win32.*}}
4+
// This test uses ulimit.
5+
// UNSUPPORTED: system-windows
76
//
87
// Set up source files. lib/lib.h includes lots of lib*.h files in that dir.
98
// client.c includes lib/lib.h, and also the individual files directly.
@@ -12,10 +11,10 @@
1211
// RUN: mkdir %t
1312
// RUN: cd %t
1413
// RUN: mkdir lib
15-
// RUN: for i in {1..300}; do touch lib/lib$i.h; done
16-
// RUN: for i in {1..300}; do echo "#include \"lib$i.h\"" >> lib/lib.h; done
14+
// RUN: %python -c "from pathlib import Path; list(map(lambda i: Path(f'lib/lib{i}.h').touch(), range(1, 301)))"
15+
// RUN: %python -c "for i in range(1, 301): print(f'#include \"lib{i}.h\"')" > lib/lib.h
1716
// RUN: echo "#include \"lib/lib.h\"" > client.c
18-
// RUN: for i in {1..300}; do echo "#include \"lib/lib$i.h\"" >> client.c; done
17+
// RUN: %python -c "for i in range(1, 301): print(f'#include \"lib/lib{i}.h\"')" > client.c
1918
//
2019
// We want to verify that we don't hold all the files open at the same time.
2120
// This is important e.g. on mac, which has a low default FD limit.

clang/test/SemaCXX/PR51712-large-array-constexpr-check-oom.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
// Only run this test where ulimit is known to work well.
22
// (There's nothing really platform-specific being tested, this is just ulimit).
33
//
4-
// REQUIRES: shell
54
// REQUIRES: system-linux
65
// UNSUPPORTED: msan
76
// UNSUPPORTED: asan

0 commit comments

Comments
 (0)