mirror of
https://github.com/tillitis/tillitis-key1.git
synced 2025-01-01 19:06:22 -05:00
testfw: update check for new known UDS; correctly and always print UDS
Signed-off-by: Daniel Lublin <daniel@lublin.se>
This commit is contained in:
parent
909b95cdaa
commit
bcac8eeaf4
@ -150,9 +150,19 @@ int main()
|
|||||||
blake2s_ctx *);
|
blake2s_ctx *);
|
||||||
|
|
||||||
uint8_t in;
|
uint8_t in;
|
||||||
// Hard coded test UDS in ../../data/uds.hex
|
// Hard coded test UDS in ../../data/uds.hex -- but reverse byte-order!
|
||||||
uint32_t uds_test[8] = {0x80808080, 0x91919191, 0xa2a2a2a2, 0xb3b3b3b3,
|
// clang-format off
|
||||||
0xc4c4c4c4, 0xd5d5d5d5, 0xe6e6e6e6, 0xf7f7f7f7};
|
uint32_t uds_test[8] = {
|
||||||
|
0x83828180,
|
||||||
|
0x97969594,
|
||||||
|
0xa3a2a1a0,
|
||||||
|
0xb7b6b5b4,
|
||||||
|
0xc3c2c1c0,
|
||||||
|
0xd7d6d5d4,
|
||||||
|
0xe3e2e1e0,
|
||||||
|
0xf7f6f5f4,
|
||||||
|
};
|
||||||
|
// clang-format on
|
||||||
|
|
||||||
// Wait for terminal program and a character to be typed
|
// Wait for terminal program and a character to be typed
|
||||||
in = readbyte();
|
in = readbyte();
|
||||||
@ -183,15 +193,13 @@ int main()
|
|||||||
anyfailed = 1;
|
anyfailed = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (memeq(uds_local, uds_test, UDS_WORDS * 4)) {
|
puts("UDS: ");
|
||||||
puts("FAIL: UDS not equal to test UDS\r\n");
|
|
||||||
|
|
||||||
puts("uds: ");
|
|
||||||
for (int i = 0; i < UDS_WORDS * 4; i++) {
|
for (int i = 0; i < UDS_WORDS * 4; i++) {
|
||||||
puthex(uds_local[i]);
|
puthex(((uint8_t *)uds_local)[i]);
|
||||||
}
|
}
|
||||||
puts("\r\n");
|
puts("\r\n");
|
||||||
|
if (memeq(uds_local, uds_test, UDS_WORDS * 4)) {
|
||||||
|
puts("FAIL: UDS not equal to test UDS\r\n");
|
||||||
anyfailed = 1;
|
anyfailed = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user