diff --git a/tests/sm3test.c b/tests/sm3test.c index b58b0174..84623aa2 100644 --- a/tests/sm3test.c +++ b/tests/sm3test.c @@ -185,6 +185,9 @@ static int test_sm3_speed(void) double seconds; int i; + for (i = 0; i < 4096; i++) { + sm3_update(&sm3_ctx, blocks, sizeof(blocks)); + } start = clock(); sm3_init(&sm3_ctx); for (i = 0; i < 4096; i++) { @@ -195,7 +198,7 @@ static int test_sm3_speed(void) seconds = (double)(end - start)/CLOCKS_PER_SEC; - fprintf(stderr, "sm3 on 16-MiB : time %f seconds : %f MiB per second\n", seconds, 16/seconds); + fprintf(stderr, "%s: %f MiB per second\n", __FUNCTION__, 16/seconds); return 1;