Commit d7cc386
committed
Normalize NS350 chip state at entry/exit of nations SPDM tests
NS350's Nations_IdentityKeySet returns TPM_RC_VALUE when asked to set
the identity key to its current value. The nations test assumed the
chip always started at identity-key=1, but self-hosted CI runners
carry persistent NV state across runs — any prior failure left the
chip in a state the next run could not recover from. GPIO reset
clears volatile state but does not reset NV-persistent identity-key
or PSK provisioning.
Add normalize_nations_chip(): GPIO reset + idempotent --psk-clear +
idempotent --identity-key-set. Call at entry of both nations and
nations-psk blocks, and wire to trap EXIT so the chip is always
cleaned up on success, failure, or set -e early exit.
Validated on Pi hardware across five scenarios (identity-key=1,
identity-key=0, PSK-provisioned, nations-psk clean, nations-psk
PSK-stuck): all runs now pass and leave the chip at canonical
identity-key=1.1 parent 23b3ed6 commit d7cc386
1 file changed
Lines changed: 29 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
51 | 70 | | |
52 | 71 | | |
53 | 72 | | |
| |||
132 | 151 | | |
133 | 152 | | |
134 | 153 | | |
135 | | - | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
136 | 160 | | |
137 | 161 | | |
138 | 162 | | |
| |||
156 | 180 | | |
157 | 181 | | |
158 | 182 | | |
159 | | - | |
160 | | - | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
161 | 187 | | |
162 | 188 | | |
163 | 189 | | |
| |||
0 commit comments