]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
* crypt/sha256test.c (main): Perform 100,000 'a' test in a second way.
authorUlrich Drepper <drepper@redhat.com>
Sun, 15 Mar 2009 01:45:47 +0000 (01:45 +0000)
committerUlrich Drepper <drepper@redhat.com>
Sun, 15 Mar 2009 01:45:47 +0000 (01:45 +0000)
ChangeLog
crypt/sha256test.c

index 36939796c896a2fa1d58968782fbfe3e99c5ec44..83c355e8ab51ab9bdccf710375687c21735360f9 100644 (file)
--- a/ChangeLog
+++ b/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.
index b13a3c511ee656de209c92219beeea35d2fad6ee..39e80307c7345cc7e0cff97afb096ab3b8ce3594 100644 (file)
@@ -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;
     }