[svn] gcry - r1148 - trunk/tests

svn author wk cvs at cvs.gnupg.org
Tue Mar 14 14:26:55 CET 2006


Author: wk
Date: 2006-03-14 14:26:55 +0100 (Tue, 14 Mar 2006)
New Revision: 1148

Modified:
   trunk/tests/ChangeLog
   trunk/tests/benchmark.c
Log:
Add a way to manually test the seed file locking


Modified: trunk/tests/ChangeLog
===================================================================
--- trunk/tests/ChangeLog	2006-03-14 13:13:11 UTC (rev 1147)
+++ trunk/tests/ChangeLog	2006-03-14 13:26:55 UTC (rev 1148)
@@ -1,15 +1,16 @@
 2006-03-14  Werner Koch  <wk at g10code.com>
 
+	* benchmark.c (main): Allow for seed file argument to random bench.
+
+	* basic.c (main): Use progress handler only in verbose mode.
+	(main): Speed up test key generation.
 	* ac-data.c (check_sexp_conversion, check_run): Take care of VERBOSE.
-	* basic.c (main): Speed up test key generation.
-	(main): use progress handler only in verbose mode.
 	* ac.c (main): Ditto.
 	* pubkey.c (main): Ditto.
+	* pkbench.c (main): Ditto.
 	* keygen.c (main): Ditto.
 	(check_rsa_keys): Print key only in verbose mode.
 
-	* pkbench.c (main): Ditto.
-
 2006-03-10  Brad Hards  <bradh at frogmouth.net>  (wk, patch 2006-02-18)
 
 	* basic.c (check_one_hmac, check_hmac): New.

Modified: trunk/tests/benchmark.c
===================================================================
--- trunk/tests/benchmark.c	2006-03-14 13:13:11 UTC (rev 1147)
+++ trunk/tests/benchmark.c	2006-03-14 13:26:55 UTC (rev 1148)
@@ -1,5 +1,5 @@
 /* benchmark.c - for libgcrypt
- *	Copyright (C) 2002, 2004, 2005 Free Software Foundation, Inc.
+ * Copyright (C) 2002, 2004, 2005, 2006 Free Software Foundation, Inc.
  *
  * This file is part of Libgcrypt.
  *
@@ -695,7 +695,16 @@
             stdout);
   else if ( !strcmp (*argv, "random"))
     {
-      random_bench ();
+      if (argc == 1)
+        random_bench ();
+      else if (argc == 2)
+        {
+          gcry_control (GCRYCTL_SET_RANDOM_SEED_FILE, argv[1]);
+          random_bench ();
+          gcry_control (GCRYCTL_UPDATE_RANDOM_SEED_FILE);
+        }
+      else
+        fputs ("usage: benchmark random [seedfile]\n", stdout);
     }
   else if ( !strcmp (*argv, "md"))
     {




More information about the Gnupg-commits mailing list