From 52611afe6f19470c1365b771263498e6ab70d12d Mon Sep 17 00:00:00 2001 From: Tim Kourt Date: Tue, 17 May 2016 16:52:41 -0700 Subject: [PATCH] t-runner: Start SW entropy generator if no HW avail. --- tools/test-runner.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/tools/test-runner.c b/tools/test-runner.c index b3434350..a36f9ece 100644 --- a/tools/test-runner.c +++ b/tools/test-runner.c @@ -445,6 +445,21 @@ static pid_t start_dbus_daemon(void) return pid; } +static pid_t start_haveged(void) +{ + char *argv[2]; + pid_t pid; + + argv[0] = "/usr/sbin/haveged"; + argv[1] = NULL; + + pid = execute_program(argv, true); + if (pid < 0) + return -1; + + return pid; +} + static bool set_interface_state(const char *if_name, bool isUp) { char *state, *argv[4]; @@ -1500,6 +1515,9 @@ static void run_command(char *cmdname) if (dbus_pid < 0) goto exit; + if (check_virtualization()) + start_haveged(); + test_stat_queue = l_queue_new(); l_hashmap_foreach(test_config_map, create_network_and_run_tests,