test-runner: make default iwd_config_dir=/tmp
PATCH 1/3 test-runner: make default iwd_config_dir=/tmp
The configuration value of iwd_config_dir was defaulting to /etc/iwd which, in the context of test-runner, is probably not the best idea. The system may have a main.conf file in /etc/iwd which could cause tests to fail or behave unexpectedly.
In addition all tests which use iwd_config_dir set it to /tmp anyways. Because of this, the new default value will be /tmp and no tests will even need to bother setting this.
The configuration value itself is not being removed because it may be useful to set arbitrary paths (e.g. /etc/iwd) for example when using the shell functionality.
--- tools/test-runner.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tools/test-runner.c +1 -1
@@ -2205,7 +2205,7 @@ static void create_network_and_run_tests(void *data, void *user_data)HW_CONFIG_GROUP_SETUP , HW_CONFIG_SETUP_IWD_CONF_DIR);if (!iwd_config_dir) - iwd_config_dir =DAEMON_CONFIGDIR ; + iwd_config_dir ="/tmp" ; iwd_pid =start_iwd (iwd_config_dir, wiphy_list, iwd_ext_options, iwd_phys, test_name);
Signature · 1 line
2.21.1
PATCH 2/3 auto-t: fix testAddressRandomization
This test was dependent on having a local main.conf in /etc/iwd
--- autotests/testAddressRandomization/connection_test.py | 2 +- autotests/testAddressRandomization/hw.conf | 1 - 2 files changed, 1 insertion(+), 2 deletions(-)
autotests/testAddressRandomization/connection_test.py +1 -1
@@ -38,7 +38,7 @@ class Test(unittest.TestCase): return device.address def test_connection_success(self): - wd = IWD(True) + wd = IWD() devices = wd.list_devices(1) device = devices[0]
autotests/testAddressRandomization/hw.conf +0 -1
@@ -1,6 +1,5 @@ [SETUP] num_radios=2 -start_iwd=0 tmpfs_extra_stuff=main.conf [HOSTAPD]
Signature · 1 line
2.21.1
PATCH 3/3 auto-t: remove iwd_config_dir from autotests
In reply to James PrestwoodThis is no longer needed unless setting a different directory than /tmp
--- autotests/testAP/hw.conf | 1 - autotests/testEAP-TLS-Frag/hw.conf | 1 - autotests/testEAP-TTLS-Frag/hw.conf | 1 - autotests/testEAP-WPS-Frag/hw.conf | 1 - autotests/testFT-8021x-roam/hw.conf | 2 -- autotests/testFT-FILS-SHA256/hw.conf | 1 - autotests/testFT-FILS-SHA384/hw.conf | 1 - autotests/testFT-PSK-over-DS/hw.conf | 1 - autotests/testFT-PSK-roam/hw.conf | 1 - autotests/testFT-SAE-roam/hw.conf | 1 - autotests/testHT-VHT/hw.conf | 1 - autotests/testRSSIAgent/hw.conf | 1 - 12 files changed, 13 deletions(-)
autotests/testAP/hw.conf +0 -1
@@ -1,7 +1,6 @@ [SETUP] num_radios=3 max_test_exec_interval_sec=40 -iwd_config_dir=/tmp tmpfs_extra_stuff=main.conf [HOSTAPD]
autotests/testEAP-TLS-Frag/hw.conf +0 -1
@@ -1,7 +1,6 @@ [SETUP] num_radios=2 tmpfs_extra_stuff=../misc/certs:main.conf -iwd_config_dir=/tmp [HOSTAPD] rad0=ssidEAP-TLS.conf
autotests/testEAP-TTLS-Frag/hw.conf +0 -1
@@ -1,7 +1,6 @@ [SETUP] num_radios=2 tmpfs_extra_stuff=../misc/certs:main.conf -iwd_config_dir=/tmp [HOSTAPD] rad0=ssidEAP-TTLS.conf
autotests/testEAP-WPS-Frag/hw.conf +0 -1
@@ -1,7 +1,6 @@ [SETUP] num_radios=2 tmpfs_extra_stuff=main.conf -iwd_config_dir=/tmp [HOSTAPD] rad0=ssid-wps-small-mtu.conf
autotests/testFT-8021x-roam/hw.conf +0 -2
@@ -2,8 +2,6 @@ num_radios=3 max_test_exec_interval_sec=45 tmpfs_extra_stuff=../misc/certs:main.conf -iwd_config_dir=/tmp -tmpfs_extra_stuff=../misc/certs needs_hwsim=1 [HOSTAPD]
autotests/testFT-FILS-SHA256/hw.conf +0 -1
@@ -2,7 +2,6 @@ num_radios=3 max_test_exec_interval_sec=45 tmpfs_extra_stuff=../misc/certs:main.conf:pwd.eap_user -iwd_config_dir=/tmp [HOSTAPD] rad0=ft-eap-ccmp-1.conf
autotests/testFT-FILS-SHA384/hw.conf +0 -1
@@ -2,7 +2,6 @@ num_radios=3 max_test_exec_interval_sec=45 tmpfs_extra_stuff=../misc/certs:main.conf:pwd.eap_user -iwd_config_dir=/tmp [HOSTAPD] rad0=ft-eap-ccmp-1.conf
autotests/testFT-PSK-over-DS/hw.conf +0 -1
@@ -1,7 +1,6 @@ [SETUP] num_radios=3 max_test_exec_interval_sec=45 -iwd_config_dir=/tmp tmpfs_extra_stuff=main.conf needs_hwsim=1
autotests/testFT-PSK-roam/hw.conf +0 -1
@@ -1,7 +1,6 @@ [SETUP] num_radios=3 max_test_exec_interval_sec=45 -iwd_config_dir=/tmp tmpfs_extra_stuff=main.conf needs_hwsim=1
autotests/testFT-SAE-roam/hw.conf +0 -1
@@ -1,7 +1,6 @@ [SETUP] num_radios=4 max_test_exec_interval_sec=120 -iwd_config_dir=/tmp tmpfs_extra_stuff=main.conf needs_hwsim=1
autotests/testHT-VHT/hw.conf +0 -1
@@ -2,7 +2,6 @@ num_radios=4 max_test_exec_interval_sec=45 reg_domain=US -iwd_config_dir=/tmp tmpfs_extra_stuff=main.conf [HOSTAPD]
autotests/testRSSIAgent/hw.conf +0 -1
@@ -1,7 +1,6 @@ [SETUP] num_radios=2 max_test_exec_interval_sec=60 -iwd_config_dir=/tmp tmpfs_extra_stuff=main.conf needs_hwsim=1
Signature · 1 line
2.21.1
Hi James,
Quoted 9 lines · James Prestwood
The configuration value of
iwd_config_dirwas defaulting to/etc/iwdwhich, in the context of test-runner, is probably not the best idea. The system may have a main.conf file in/etc/iwdwhich could cause tests to fail or behave unexpectedly.In addition all tests which use
iwd_config_dirset it to /tmp anyways. Because of this, the new default value will be /tmp and no tests will even need to bother setting this.
Quoted 6 lines
The configuration value itself is not being removed because it may be useful to set arbitrary paths (e.g.
/etc/iwd) for example when using the shell functionality.--- tools/test-runner.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
all applied, thanks.
Regards,
-Denis