diff options
author | Ulrich Drepper <drepper@redhat.com> | 2009-03-15 01:45:47 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2009-03-15 01:45:47 +0000 |
commit | fad070abc4292bd82ef0ea5977162fdc710a2e64 (patch) | |
tree | 4fac04ccec4d6dda823b1b0d5c095f51ebf6512c | |
parent | a42ad61bae4d378f290df67015b14dec1236545f (diff) | |
download | glibc-fad070abc4292bd82ef0ea5977162fdc710a2e64.zip glibc-fad070abc4292bd82ef0ea5977162fdc710a2e64.tar.gz glibc-fad070abc4292bd82ef0ea5977162fdc710a2e64.tar.bz2 |
* crypt/sha256test.c (main): Perform 100,000 'a' test in a second way.
-rw-r--r-- | ChangeLog | 2 | ||||
-rw-r--r-- | crypt/sha256test.c | 12 |
2 files changed, 13 insertions, 1 deletions
@@ -1,5 +1,7 @@ 2009-03-14 Ulrich Drepper <drepper@redhat.com> + * crypt/sha256test.c (main): Perform 100,000 'a' test in a second way. + * elf/dl-runtime.c (reloc_offset): Define. (reloc_index): Define. (_dl_fixup): Rename reloc_offset parameter to reloc_arg. diff --git a/crypt/sha256test.c b/crypt/sha256test.c index b13a3c5..39e8030 100644 --- a/crypt/sha256test.c +++ b/crypt/sha256test.c @@ -84,7 +84,17 @@ main (void) "\xf1\x80\x9a\x48\xa4\x97\x20\x0e\x04\x6d\x39\xcc\xc7\x11\x2c\xd0"; if (memcmp (expected, sum, 32) != 0) { - printf ("test %d failed\n", cnt); + printf ("test %d failed\n", cnt++); + result = 1; + } + + __sha256_init_ctx (&ctx); + for (int i = 0; i < 100000; ++i) + __sha256_process_bytes (buf, 10, &ctx); + __sha256_finish_ctx (&ctx, sum); + if (memcmp (expected, sum, 32) != 0) + { + printf ("test %d failed\n", cnt++); result = 1; } |