[PATCH v2 3/3] tests: Fix wpas_ap_async_fail false negative by using common finalizer

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

 



wpas_ap_async_fail fails with this message.

---------------
wlan0: Country code not reset back to 00: is FI
wlan0: Country code cleared back to 00
---------------

This patch fixes the issue.

Signed-off-by: Masashi Honma <masashi.honma@xxxxxxxxx>
---
 tests/hwsim/test_wpas_ap.py | 5 ++---
 tests/hwsim/utils.py        | 3 +++
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/tests/hwsim/test_wpas_ap.py b/tests/hwsim/test_wpas_ap.py
index 102edbc0d..85074974a 100644
--- a/tests/hwsim/test_wpas_ap.py
+++ b/tests/hwsim/test_wpas_ap.py
@@ -10,7 +10,7 @@ import logging
 logger = logging.getLogger()
 
 import hwsim_utils
-from utils import HwsimSkip, alloc_fail
+from utils import HwsimSkip, alloc_fail, clear_regdom_dev
 from wpasupplicant import WpaSupplicant
 from test_p2p_channel import set_country
 
@@ -761,5 +761,4 @@ def test_wpas_ap_async_fail(dev):
             dev[0].select_network(id)
             dev[0].wait_disconnected()
     finally:
-        set_country("00")
-        dev[0].set("country", "00")
+        clear_regdom_dev(dev)
diff --git a/tests/hwsim/utils.py b/tests/hwsim/utils.py
index 1044e9180..868537527 100644
--- a/tests/hwsim/utils.py
+++ b/tests/hwsim/utils.py
@@ -151,6 +151,9 @@ def clear_regdom(hapd, dev, count=1):
     if hapd:
         hapd.request("DISABLE")
         time.sleep(0.1)
+    clear_regdom_dev(dev, count)
+
+def clear_regdom_dev(dev, count=1):
     for i in range(count):
         dev[i].request("DISCONNECT")
     for i in range(count):
-- 
2.17.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