[PATCH 2/6] tests: sigma_dut: set regulatory inside try/except

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



If sigma_dut is not installed, start_sigma_dut() will
throw an exception. Call start_sigma_dut() inside the
try/except to correctly reset the regulatory domain.

This fixes several seemingly random failures due to
regulatory domain not being reset.

Signed-off-by: Thomas Pedersen <thomas@xxxxxxxxxxxx>
---
 tests/hwsim/test_sigma_dut.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/hwsim/test_sigma_dut.py b/tests/hwsim/test_sigma_dut.py
index 33a4b5751220..242c44f8c292 100644
--- a/tests/hwsim/test_sigma_dut.py
+++ b/tests/hwsim/test_sigma_dut.py
@@ -4105,9 +4105,9 @@ def run_sigma_dut_ap_channel(dev, apdev, params, channel, mode, scan_freq,
                              extra=None, check_signal=None, program=None):
     logdir = params['prefix'] + ".sigma-hostapd"
     with HWSimRadio() as (radio, iface):
-        subprocess.call(['iw', 'reg', 'set', 'US'])
         sigma = start_sigma_dut(iface, hostapd_logdir=logdir)
         try:
+            subprocess.call(['iw', 'reg', 'set', 'US'])
             cmd = "ap_reset_default"
             if program:
                 cmd += ",program," + program
-- 
2.20.1


_______________________________________________
Hostap mailing list
Hostap@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/hostap



[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux