Commit 6e86b4b
committed
[NFC][analyzer] Remove Z3-as-constraint-manager hacks from lit test code
Before this commit the LIT test framework of the static analyzer had a
file called `analyzer_test.py` which implemented a tricky system for
selecting the constraint manager:
- (A) Test files without `REQUIRES: z3` were executed with the default
range-based constraint manager.
- (B) If clang was built with Z3 support, the test was executed with Z3
as the constraint manager.
(There was support for executing the same RUN line twice if both
conditions were satisfied.)
Unfortunately, using Z3 as the constraint manager does not work in
practice (very slow and causes many crashes), so the (B) pathway became
unused (or was never truly used?) and became non-functional due to bit
rot. (In the CI bots the analyzer is built without Z3 support, so only
the pathway (A) is used.)
This commit removes `analyzer_test.py` (+ related logic in other build
files + the test `z3/enabled.c` which just tested that
`analyzer_test.py` is active), because it tries to implement a feature
that we don't need (only one constraint manager is functional) and its
code is so complicated and buggy that it isn't useful as a starting
point for future development.
The fact that this script was non-functional implied that tests with
`REQUIRES: z3` were not executed during normal testing, so they were
also affected by bitrot. Unfortunately this also affected the tests of
the `z3-crosscheck` (aka Z3 refutation) mode which also require Z3 (they
don't work if clang is compiled without Z3 support) but use Z3 in a
different way which is actually stable and functional.
In this commit I'm fixing most of the `REQUIRES: z3` tests that were
broken by straightforward issues. Two test files, `PR37855.c` and
`z3-crosscheck.c` were affected by more complex issues, so I left them
in a failing state; they should be fixed by follow-up commits. Note that
these two tests use `REQUIRES: z3`, so they are not executed in the
automatic buildbots (because before this commit if somebody tried to run
the tests on a clang built with Z3 supports, `analyzer_test.py` would
have ran into an assertion failure).1 parent b77c713 commit 6e86b4b
File tree
19 files changed
+23
-132
lines changed- clang
- docs/analyzer/developer-docs
- test
- Analysis
- z3
- llvm
- cmake/modules
- utils
- gn/secondary/clang/test
- lit/lit/llvm
19 files changed
+23
-132
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
317 | 317 | | |
318 | 318 | | |
319 | 319 | | |
320 | | - | |
321 | | - | |
322 | | - | |
323 | | - | |
324 | | - | |
325 | | - | |
326 | | - | |
327 | | - | |
328 | | - | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
329 | 324 | | |
330 | 325 | | |
331 | 326 | | |
| |||
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | 46 | | |
50 | | - | |
51 | 47 | | |
52 | 48 | | |
53 | 49 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
3 | | - | |
| 2 | + | |
4 | 3 | | |
5 | 4 | | |
6 | 5 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
3 | | - | |
| 2 | + | |
4 | 3 | | |
5 | | - | |
6 | | - | |
7 | | - | |
8 | | - | |
9 | | - | |
10 | | - | |
11 | | - | |
12 | | - | |
| 4 | + | |
13 | 5 | | |
14 | 6 | | |
15 | 7 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
221 | 221 | | |
222 | 222 | | |
223 | 223 | | |
224 | | - | |
225 | | - | |
226 | | - | |
227 | | - | |
228 | 224 | | |
229 | | - | |
230 | 225 | | |
231 | 226 | | |
232 | 227 | | |
| |||
236 | 231 | | |
237 | 232 | | |
238 | 233 | | |
239 | | - | |
240 | | - | |
241 | | - | |
242 | 234 | | |
243 | | - | |
244 | 235 | | |
245 | 236 | | |
246 | 237 | | |
| |||
251 | 242 | | |
252 | 243 | | |
253 | 244 | | |
254 | | - | |
255 | | - | |
256 | | - | |
257 | 245 | | |
258 | | - | |
259 | 246 | | |
260 | 247 | | |
261 | 248 | | |
| |||
265 | 252 | | |
266 | 253 | | |
267 | 254 | | |
268 | | - | |
269 | | - | |
270 | | - | |
271 | 255 | | |
272 | | - | |
273 | 256 | | |
274 | 257 | | |
275 | 258 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
123 | 123 | | |
124 | 124 | | |
125 | 125 | | |
126 | | - | |
127 | | - | |
128 | | - | |
129 | | - | |
130 | | - | |
131 | 126 | | |
132 | 127 | | |
133 | | - | |
134 | | - | |
135 | | - | |
136 | | - | |
137 | | - | |
138 | 128 | | |
139 | | - | |
140 | | - | |
141 | | - | |
142 | | - | |
143 | | - | |
144 | 129 | | |
145 | | - | |
146 | 130 | | |
147 | 131 | | |
148 | 132 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | | - | |
| 32 | + | |
33 | 33 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
67 | | - | |
| 67 | + | |
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
| |||
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
77 | | - | |
| 77 | + | |
78 | 78 | | |
79 | 79 | | |
80 | 80 | | |
| |||
0 commit comments