crc/test: sha1 should do _final() after _update()
authorJens Axboe <axboe@fb.com>
Fri, 16 Jan 2015 23:10:43 +0000 (16:10 -0700)
committerJens Axboe <axboe@fb.com>
Fri, 16 Jan 2015 23:10:43 +0000 (16:10 -0700)
Signed-off-by: Jens Axboe <axboe@fb.com>
crc/test.c

index bc5cc45658ec4818e3b57ef9f03927c9f1c6bc29..dbc5653ffc14410711ed6a7df1a7d333aae0a629 100644 (file)
@@ -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)