3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-11-25 17:59:25 +01:00

test-runner: fix removal of SIM/AKA/AKA' files

If ofono/phonesim is not found on the system, any test requiring those will
be skipped. In this case we would still try and remove symlinks that were
never created. An error would be printed, but the actual source tree files
were getting removed. This adds a new goto label where we can skip the tmpfs
removal in this error case.
This commit is contained in:
James Prestwood 2018-12-05 10:49:43 -08:00 committed by Denis Kenzior
parent 94b7a69146
commit dd835aba2e

View File

@ -1782,14 +1782,14 @@ static void create_network_and_run_tests(const void *key, void *value,
setenv("IWD_TEST_TIMEOUTS", "off", true); setenv("IWD_TEST_TIMEOUTS", "off", true);
if (!create_tmpfs_extra_stuff(tmpfs_extra_stuff)) if (!create_tmpfs_extra_stuff(tmpfs_extra_stuff))
goto exit_hwsim; goto remove_abs_paths;
if (!configure_hw_radios(hw_settings, wiphy_list)) if (!configure_hw_radios(hw_settings, wiphy_list))
goto exit_hwsim; goto remove_abs_paths;
medium_pid = register_hwsim_as_trans_medium(); medium_pid = register_hwsim_as_trans_medium();
if (medium_pid < 0) if (medium_pid < 0)
goto exit_hwsim; goto remove_abs_paths;
if (check_verbosity("hwsim")) { if (check_verbosity("hwsim")) {
list_hwsim_radios(); list_hwsim_radios();
@ -1851,11 +1851,13 @@ exit_hostapd:
terminate_medium(medium_pid); terminate_medium(medium_pid);
remove_abs_paths:
remove_absolute_path_dirs(tmpfs_extra_stuff);
exit_hwsim: exit_hwsim:
l_queue_destroy(wiphy_list, wiphy_free); l_queue_destroy(wiphy_list, wiphy_free);
l_settings_free(hw_settings); l_settings_free(hw_settings);
remove_absolute_path_dirs(tmpfs_extra_stuff);
l_strfreev(tmpfs_extra_stuff); l_strfreev(tmpfs_extra_stuff);
} }