summaryrefslogtreecommitdiff
path: root/tests/lib/test_zlog.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/lib/test_zlog.c')
-rw-r--r--tests/lib/test_zlog.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/tests/lib/test_zlog.c b/tests/lib/test_zlog.c
index 07885d9847..48fa7bce94 100644
--- a/tests/lib/test_zlog.c
+++ b/tests/lib/test_zlog.c
@@ -20,6 +20,7 @@
#include <zebra.h>
#include <memory.h>
#include "log.h"
+#include "network.h"
/* maximum amount of data to hexdump */
#define MAXDATA 16384
@@ -37,7 +38,7 @@ static bool test_zlog_hexdump(void)
uint8_t d[nl];
for (unsigned int i = 0; i < nl; i++)
- d[i] = random();
+ d[i] = frr_weak_random();
zlog_hexdump(d, nl - 1);
nl += 1 + (nl / 2);
@@ -52,9 +53,7 @@ bool (*tests[])(void) = {
int main(int argc, char **argv)
{
- openzlog("testzlog", "NONE", 0, LOG_CONS | LOG_NDELAY | LOG_PID,
- LOG_ERR);
- zlog_set_file("test_zlog.log", LOG_DEBUG);
+ zlog_aux_init("NONE: ", ZLOG_DISABLED);
for (unsigned int i = 0; i < array_size(tests); i++)
if (!tests[i]())