summaryrefslogtreecommitdiff
path: root/test/birdtest.h
diff options
context:
space:
mode:
authorMaria Matejka <mq@ucw.cz>2019-07-09 14:34:26 +0200
committerMaria Matejka <mq@ucw.cz>2019-07-09 14:37:14 +0200
commitbb001af0e8022f6445ff50b7f32c9ac102cc244e (patch)
tree5401f52c0265ab4be4d3e9033fd1bb94f871de3a /test/birdtest.h
parent05e3933c06b488e71c9c149c25aec9c733a8bd1f (diff)
Test: better random u64 generator
Diffstat (limited to 'test/birdtest.h')
-rw-r--r--test/birdtest.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/test/birdtest.h b/test/birdtest.h
index 4443bfc1..b2d572d0 100644
--- a/test/birdtest.h
+++ b/test/birdtest.h
@@ -33,7 +33,8 @@ extern const char *bt_test_id;
void bt_init(int argc, char *argv[]);
int bt_exit_value(void);
int bt_test_suite_base(int (*test_fn)(const void *), const char *test_id, const void *test_fn_argument, int forked, int timeout, const char *dsc, ...);
-long int bt_random(void);
+static inline u64 bt_random(void)
+{ return ((u64) random() & 0xffffffff) | ((u64) random() << 32); }
void bt_log_suite_result(int result, const char *fmt, ...);
void bt_log_suite_case_result(int result, const char *fmt, ...);
@@ -41,7 +42,7 @@ void bt_log_suite_case_result(int result, const char *fmt, ...);
#define BT_TIMEOUT 5 /* Default timeout in seconds */
#define BT_FORKING 1 /* Forking is enabled in default */
-#define BT_RANDOM_SEED 982451653
+#define BT_RANDOM_SEED 0x5097d2bb
#define BT_BUFFER_SIZE 10000