Commit cf54639
authored
testrunner: don't mask a parent test that fails on its own (#5698)
## Summary
The integration test runner masks failures listed in
`known_failures.txt`. A known-failure rule names a specific subtest
(e.g. `TestAccept/ssh/connection`), but a parent test also fails
whenever one of its subtests fails, so the runner additionally allowed
the parent to fail. It did this by matching a rule against the parent
*bidirectionally*: a rule whose pattern was a descendant of the failing
test also matched.
That allowance was unconditional. When the top-level `TestAccept` failed
on its own — before any subtest ran — its failure still matched any
`TestAccept/...` rule and was silently swallowed. The recent
`RequireRuff` setup check (#5662) does exactly this on the integration
runners (ruff isn't installed there), so `TestAccept` has been failing
on every environment while the nightly reports green.
This moves the parent-cascade handling out of rule matching and into
failure analysis:
- `ConfigRule.matches` reverts to plain forward matching — a rule
matches a test or its subtree, nothing about parents.
- `checkFailures` allows a failure when a rule matches **or** a subtest
of it also failed. Go reports a parent's failure only after its
subtests, so the failing subtest is already recorded when the parent is
evaluated; no second pass is needed.
Net effect: a parent failing because of a (known or unknown) subtest is
still not double-counted, but a test that fails on its own with no
failing subtest now surfaces as unexpected.
This only makes the failure visible. Installing ruff on the integration
runners is handled separately.
## Tests
- `TestCheckFailures` exercises `checkFailures` end-to-end:
parent-with-failing-subtest (allowed), parent-alone (the ruff case,
surfaced), unlisted failure (surfaced), and fail-then-pass-on-retry
(allowed).
- `TestConfigRuleMatches` reverse-match cases now assert that a rule
does not match a parent of the listed test.
This pull request and its description were written by Isaac.1 parent 822c719 commit cf54639
2 files changed
Lines changed: 115 additions & 14 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
9 | 14 | | |
10 | 15 | | |
11 | 16 | | |
| |||
158 | 163 | | |
159 | 164 | | |
160 | 165 | | |
| 166 | + | |
161 | 167 | | |
162 | 168 | | |
163 | 169 | | |
| |||
177 | 183 | | |
178 | 184 | | |
179 | 185 | | |
180 | | - | |
181 | 186 | | |
182 | 187 | | |
183 | | - | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
184 | 193 | | |
185 | | - | |
| 194 | + | |
| 195 | + | |
186 | 196 | | |
187 | | - | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
188 | 202 | | |
189 | 203 | | |
190 | 204 | | |
191 | | - | |
192 | | - | |
193 | | - | |
194 | | - | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
195 | 213 | | |
196 | 214 | | |
197 | 215 | | |
| |||
207 | 225 | | |
208 | 226 | | |
209 | 227 | | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
210 | 240 | | |
211 | 241 | | |
212 | 242 | | |
| |||
328 | 358 | | |
329 | 359 | | |
330 | 360 | | |
331 | | - | |
| 361 | + | |
332 | 362 | | |
333 | | - | |
| 363 | + | |
334 | 364 | | |
335 | 365 | | |
336 | 366 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
4 | 8 | | |
5 | 9 | | |
6 | 10 | | |
| |||
44 | 48 | | |
45 | 49 | | |
46 | 50 | | |
47 | | - | |
48 | | - | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
49 | 54 | | |
50 | 55 | | |
51 | 56 | | |
52 | 57 | | |
53 | | - | |
| 58 | + | |
54 | 59 | | |
55 | 60 | | |
56 | 61 | | |
57 | | - | |
| 62 | + | |
58 | 63 | | |
59 | 64 | | |
60 | 65 | | |
| |||
66 | 71 | | |
67 | 72 | | |
68 | 73 | | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
0 commit comments