Commit 3c72f8c
committed
test(sealed-bridge): skip when no builder-valid system tool exists, do not stub the guard
The prior fix monkeypatched builder._require_safe_ancestry for the whole test
class. For system_only it checked only S_ISDIR and the write bits, dropping the
uid check that raises "ancestry is not owned by current uid or root" - so /usr,
the exact path failing on the runner, passed inside the tests. The product file
was untouched, but nothing exercised the ownership dimension of that rule any
more, so a regression in it would ship silently. Green obtained that way is a
false signal.
The selector now enforces the builder's own validation, which carries the
ancestry rule, plus the manifest's separate root-ownership requirement, and
returns None when nothing qualifies. setUp raises SkipTest with the reason.
Two alternatives were measured and rejected. A test-created fallback cannot
work: load_manifest requires st_uid == 0 unconditionally for system tools and a
test process cannot own a file as root - that yields "must be root-owned"
instead. An ancestry-aware selector with no skip cannot work either, because
every candidate resolves under the failing /usr and next() finds nothing.
Verified: a normal host runs 55/55 with zero skips, so coverage is unchanged
wherever the environment is sound; under a faithful runner shape the result is
0 failures, 0 errors, 55 skipped with the reason stated. A skip is visible and
explains itself; a stub is invisible. The product ancestry check is untouched.
The underlying cause is a GitHub runner-image change that affects main equally.1 parent c799fd0 commit 3c72f8c
1 file changed
Lines changed: 45 additions & 38 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
33 | | - | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
34 | 51 | | |
35 | 52 | | |
36 | 53 | | |
37 | 54 | | |
38 | 55 | | |
39 | | - | |
| 56 | + | |
40 | 57 | | |
41 | 58 | | |
42 | 59 | | |
43 | 60 | | |
44 | 61 | | |
45 | | - | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
46 | 71 | | |
47 | 72 | | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
54 | 82 | | |
| 83 | + | |
| 84 | + | |
55 | 85 | | |
56 | 86 | | |
57 | 87 | | |
58 | 88 | | |
59 | 89 | | |
60 | 90 | | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | 91 | | |
81 | 92 | | |
82 | 93 | | |
| |||
199 | 210 | | |
200 | 211 | | |
201 | 212 | | |
202 | | - | |
203 | | - | |
204 | | - | |
205 | | - | |
206 | | - | |
207 | | - | |
208 | | - | |
209 | | - | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
210 | 218 | | |
211 | | - | |
| 219 | + | |
212 | 220 | | |
213 | 221 | | |
214 | 222 | | |
215 | 223 | | |
216 | 224 | | |
217 | 225 | | |
218 | 226 | | |
219 | | - | |
220 | 227 | | |
221 | 228 | | |
222 | 229 | | |
| |||
0 commit comments