diff options
author | Werner Koch <wk@gnupg.org> | 2006-03-14 13:26:55 +0000 |
---|---|---|
committer | Werner Koch <wk@gnupg.org> | 2006-03-14 13:26:55 +0000 |
commit | 8889a912fdb4f8f2246a613662cefa1a30b27871 (patch) | |
tree | 53a74d87a698a8ca383af9d65a0ab57e5ab48de3 /tests | |
parent | 7d2a1049d580d91fd56695594bd52ed5b0864253 (diff) | |
download | libgcrypt-8889a912fdb4f8f2246a613662cefa1a30b27871.tar.gz |
Add a way to manually test the seed file locking
Diffstat (limited to 'tests')
-rw-r--r-- | tests/ChangeLog | 9 | ||||
-rw-r--r-- | tests/benchmark.c | 13 |
2 files changed, 16 insertions, 6 deletions
diff --git a/tests/ChangeLog b/tests/ChangeLog index 2b75b786..014fbbea 100644 --- a/tests/ChangeLog +++ b/tests/ChangeLog @@ -1,15 +1,16 @@ 2006-03-14 Werner Koch <wk@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@frogmouth.net> (wk, patch 2006-02-18) * basic.c (check_one_hmac, check_hmac): New. diff --git a/tests/benchmark.c b/tests/benchmark.c index 1d82c5d8..362ecec3 100644 --- a/tests/benchmark.c +++ b/tests/benchmark.c @@ -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 @@ main( int argc, char **argv ) 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")) { |