summaryrefslogtreecommitdiff
path: root/auto_tests/crypto_test.c
diff options
context:
space:
mode:
Diffstat (limited to 'auto_tests/crypto_test.c')
-rw-r--r--auto_tests/crypto_test.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/auto_tests/crypto_test.c b/auto_tests/crypto_test.c
index 57a2a43b..7c5338e2 100644
--- a/auto_tests/crypto_test.c
+++ b/auto_tests/crypto_test.c
@@ -338,8 +338,8 @@ START_TEST(test_memzero)
338} 338}
339END_TEST 339END_TEST
340 340
341#define CRYPTO_TEST_MEMCMP_SIZE 1024*32 341#define CRYPTO_TEST_MEMCMP_SIZE 1024*256
342#define CRYPTO_TEST_MEMCMP_COUNT 500 342#define CRYPTO_TEST_MEMCMP_COUNT 1000
343#define CRYPTO_TEST_MEMCMP_EPS 10 343#define CRYPTO_TEST_MEMCMP_EPS 10
344 344
345static int cmp(const void *a, const void *b) 345static int cmp(const void *a, const void *b)
@@ -389,8 +389,11 @@ START_TEST(test_memcmp)
389 uint8_t not_same[sizeof(src)]; 389 uint8_t not_same[sizeof(src)];
390 rand_bytes(not_same, sizeof(not_same)); 390 rand_bytes(not_same, sizeof(not_same));
391 391
392 printf("timing memcmp (equal arrays)\n");
392 clock_t same_median = memcmp_median(src, same, sizeof(src)); 393 clock_t same_median = memcmp_median(src, same, sizeof(src));
394 printf("timing memcmp (non-equal arrays)\n");
393 clock_t not_same_median = memcmp_median(src, not_same, sizeof(src)); 395 clock_t not_same_median = memcmp_median(src, not_same, sizeof(src));
396 printf("comparing times\n");
394 397
395 clock_t delta; 398 clock_t delta;
396 399