Commit 5f872cc
committed
fix(tests): the display-disclosure suite was passing vacuously
setUp() inherits a device wipe and never loads a seed, so every SignMessage
in this file was refused with Failure_NotInitialized before confirm_bytes()
was ever reached. _sign_message_screens() caught the CallException and
returned None, and _assert_distinguishable() returned early on None without
executing its assertNotEqual.
Four tests therefore reported PASS having exercised zero display logic, and
the fifth -- written specifically to catch exactly this -- skipped ITSELF on
the same condition. Reintroducing the NUL-truncation bug, so that
b"benign login\x00 AND APPROVE TRANSFER OF ALL FUNDS" renders identically to
b"benign login" while the signature covers all 46 bytes, would leave every
test, the JUnit validation and the ci-gate green. The release PDF certifies
this coverage as passing.
Three changes:
- setUp() loads a seed, so the device actually renders the screens under test.
- A refusal no longer silently satisfies the property. It asserts the device
is initialized first -- a refusal only means something from a device that
could have signed and chose not to -- and otherwise fails by name. An
intended refusal should be asserted explicitly, not inferred from None.
- The anti-vacuity control no longer skips itself. That test exists to prove
the rest of the file is not vacuous, so skipping when the device will not
sign is the one failure mode it cannot be allowed to have.1 parent 44d82ef commit 5f872cc
1 file changed
Lines changed: 31 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
131 | 131 | | |
132 | 132 | | |
133 | 133 | | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
134 | 141 | | |
135 | 142 | | |
136 | 143 | | |
| |||
165 | 172 | | |
166 | 173 | | |
167 | 174 | | |
168 | | - | |
169 | | - | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
170 | 191 | | |
171 | 192 | | |
172 | 193 | | |
| |||
244 | 265 | | |
245 | 266 | | |
246 | 267 | | |
247 | | - | |
248 | | - | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
249 | 276 | | |
250 | 277 | | |
251 | 278 | | |
| |||
0 commit comments