Commit 93dd17a
authored
[lit] Ensure ulimit does not persist across tests (#164485)
When constructing a container in a default argument in Python, we
actually end up with a reference to the same default container for every
invocation of the function. Given this happened with the ulimit variable
in ShellEnvironment, we ended up persisting limits across tests. This
would cause some LLVM tests to fail, particularly jitlink and dsymutil
tests, if they ended up running after the one clang test that uses
ulimit -v to set a maximum amount of memory that can be allocated. This
patch fixes that behavior by constructing the dict inside the function
to ensure we get a new instance and adds test coverage.1 parent fde69fd commit 93dd17a
File tree
3 files changed
+10
-4
lines changed- llvm/utils/lit
- lit
- tests
- Inputs/shtest-ulimit
3 files changed
+10
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
92 | 92 | | |
93 | 93 | | |
94 | 94 | | |
95 | | - | |
| 95 | + | |
96 | 96 | | |
97 | 97 | | |
98 | 98 | | |
99 | 99 | | |
100 | | - | |
| 100 | + | |
101 | 101 | | |
102 | 102 | | |
103 | 103 | | |
| |||
Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
| 8 | + | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
0 commit comments