Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
* crypt/sha256test.c (main): Perform 100,000 'a' test in a second way.
  • Loading branch information
Ulrich Drepper committed Mar 15, 2009
1 parent a42ad61 commit fad070a
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
2 changes: 2 additions & 0 deletions ChangeLog
@@ -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.
Expand Down
12 changes: 11 additions & 1 deletion crypt/sha256test.c
Expand Up @@ -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;
}

Expand Down

0 comments on commit fad070a

Please sign in to comment.