]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: Fix nfc_wps_handover_chan14 false negative by using common finalizer
authorMasashi Honma <masashi.honma@gmail.com>
Tue, 25 Jun 2019 01:50:38 +0000 (10:50 +0900)
committerJouni Malinen <j@w1.fi>
Wed, 26 Jun 2019 17:42:18 +0000 (20:42 +0300)
nfc_wps_handover_chan14 fails with this message.

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

This patch fixes the issue.

Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
tests/hwsim/test_nfc_wps.py

index 74476852bf552aa49df67a63cfa2fd5576ffc307..c15d2ea891677c53bf2d3d47087723c0ccdc650e 100644 (file)
@@ -336,10 +336,7 @@ def test_nfc_wps_handover_chan14(dev, apdev):
         check_wpa2_connection(dev[0], apdev[0], hapd, ssid)
     finally:
         dev[0].request("DISCONNECT")
-        if hapd:
-            hapd.request("DISABLE")
-        subprocess.call(['iw', 'reg', 'set', '00'])
-        dev[0].flush_scan_cache()
+        clear_regdom(hapd, dev)
 
 def test_nfc_wps_handover_with_pw_token_set(dev, apdev):
     """Connect to WPS AP with NFC connection handover (wps_nfc_* set)"""