From 90366ba0c4597ed0854ca8cb7014823d12a74a37 Mon Sep 17 00:00:00 2001 From: Andrew Zaborowski Date: Wed, 21 Mar 2018 07:15:29 +0100 Subject: [PATCH] test-runner: Kill hwsim after failed hostapd setup Without this subsequent tests may be affected by hwsim not being restarted. Additionally in 4.13 the kernel will not use the registered hwsim wmedium for wiphys created after the HWSIM_CMD_REGISTER call and there's no way to re-register it without disconnecting from netlink which is a bit of work. It's a one line fix in 4.13, I've not yet checked if this has changed in current git. --- tools/test-runner.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/test-runner.c b/tools/test-runner.c index 6b20a47a..fd644fe3 100644 --- a/tools/test-runner.c +++ b/tools/test-runner.c @@ -1794,8 +1794,6 @@ static void create_network_and_run_tests(const void *key, void *value, if (iwd_pid > 0) terminate_iwd(iwd_pid); - terminate_medium(medium_pid); - if (ofono_req) { loopback_started = false; stop_ofono(ofono_pid); @@ -1805,6 +1803,8 @@ static void create_network_and_run_tests(const void *key, void *value, exit_hostapd: destroy_hostapd_instances(hostapd_pids); + terminate_medium(medium_pid); + exit_hwsim: l_queue_destroy(wiphy_list, wiphy_free);