aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorRob Austein <sra@hactrn.net>2015-05-25 15:52:50 -0400
committerRob Austein <sra@hactrn.net>2015-05-25 15:52:50 -0400
commit75688e2f713956fcd1e78cb95cf78bc624552345 (patch)
treee5b501d903584187fef77a568c64eb193074710b /tests
parentcd4311568cbdc451833bb1200dccb49314d22d4c (diff)
Doh, skip tests when we know core isn't present.
Diffstat (limited to 'tests')
-rw-r--r--tests/test-aes-key-wrap.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/tests/test-aes-key-wrap.c b/tests/test-aes-key-wrap.c
index 79bace6..b956ba0 100644
--- a/tests/test-aes-key-wrap.c
+++ b/tests/test-aes-key-wrap.c
@@ -136,16 +136,17 @@ int main (int argc, char *argv[])
int failures = 0;
printf("Testing whether AES core reports present...");
- if (hal_io_expected(AES_ADDR_NAME0, (const uint8_t *) (AES_CORE_NAME0 AES_CORE_NAME1), 8) == HAL_OK)
- printf("yes\n");
- else
- printf("no\n");
-
- if (!run_test(K_128, sizeof(K_128), C_128, sizeof(C_128)))
- failures++;
+ if (hal_io_expected(AES_ADDR_NAME0, (const uint8_t *) (AES_CORE_NAME0 AES_CORE_NAME1), 8) != HAL_OK) {
+ printf("no, skipping keywrap tests\n");
+ }
- if (!run_test(K_256, sizeof(K_256), C_256, sizeof(C_256)))
- failures++;
+ else {
+ printf("yes\n");
+ if (!run_test(K_128, sizeof(K_128), C_128, sizeof(C_128)))
+ failures++;
+ if (!run_test(K_256, sizeof(K_256), C_256, sizeof(C_256)))
+ failures++;
+ }
return failures;
}