diff options
author | Justus Winter <justus@g10code.com> | 2016-12-13 13:24:51 +0100 |
---|---|---|
committer | Justus Winter <justus@g10code.com> | 2016-12-13 13:52:19 +0100 |
commit | 4fae5c0b62f5a507a74db654c50ad1c8b182c6d5 (patch) | |
tree | ee1a255d0bbd4bc02b02677cc7982ec352cfce3d /tests/random.c | |
parent | 1b15ff58f9c17c16ce44acc110e2865e7d4d2321 (diff) | |
download | libgcrypt-4fae5c0b62f5a507a74db654c50ad1c8b182c6d5.tar.gz |
tests: Use common code for all tests.
--
Also fix minor fallout from the format string warnings.
Signed-off-by: Justus Winter <justus@g10code.com>
Diffstat (limited to 'tests/random.c')
-rw-r--r-- | tests/random.c | 41 |
1 files changed, 1 insertions, 40 deletions
diff --git a/tests/random.c b/tests/random.c index 9e4055d3..f0fda0ef 100644 --- a/tests/random.c +++ b/tests/random.c @@ -30,50 +30,11 @@ # include <sys/wait.h> #endif -#include "../src/gcrypt-int.h" - #define PGM "random" +#include "t-common.h" -#ifndef DIM -# define DIM(v) (sizeof(v)/sizeof((v)[0])) -#endif - - -static int verbose; -static int debug; static int with_progress; -/* If we have a decent libgpg-error we can use some gcc attributes. */ -#ifdef GPGRT_ATTR_NORETURN -static void die (const char *format, ...) GPGRT_ATTR_NR_PRINTF(1,2); -static void info (const char *format, ...) GPGRT_ATTR_PRINTF(1,2); -#endif /*GPGRT_ATTR_NORETURN*/ - - -static void -die (const char *format, ...) -{ - va_list arg_ptr; - - va_start (arg_ptr, format); - fputs ( PGM ": ", stderr); - vfprintf (stderr, format, arg_ptr); - va_end (arg_ptr); - exit (1); -} - - -static void -info (const char *format, ...) -{ - va_list arg_ptr; - - va_start (arg_ptr, format); - fputs ( PGM ": ", stderr); - vfprintf (stderr, format, arg_ptr); - va_end (arg_ptr); -} - static void print_hex (const char *text, const void *buf, size_t n) |