summaryrefslogtreecommitdiff
path: root/crc
diff options
context:
space:
mode:
authorJens Axboe <axboe@fb.com>2015-01-16 16:10:43 -0700
committerJens Axboe <axboe@fb.com>2015-01-16 16:10:43 -0700
commitcbe000462519f8d8bfeb119029177a5a3788296a (patch)
treea741482e6f295b995ff0798827b0ebcf1ecd5b1d /crc
parent67a176fc7fa918cc91880530fac07cc3aa864c71 (diff)
crc/test: sha1 should do _final() after _update()
Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'crc')
-rw-r--r--crc/test.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/crc/test.c b/crc/test.c
index bc5cc45..dbc5653 100644
--- a/crc/test.c
+++ b/crc/test.c
@@ -111,8 +111,10 @@ static void t_sha1(struct test_type *t, void *buf, size_t size)
fio_sha1_init(&ctx);
- for (i = 0; i < NR_CHUNKS; i++)
+ for (i = 0; i < NR_CHUNKS; i++) {
fio_sha1_update(&ctx, buf, size);
+ fio_sha1_final(&ctx);
+ }
}
static void t_sha256(struct test_type *t, void *buf, size_t size)