]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: Set device_name for WPS test cases
authorJanusz Dziedzic <janusz.dziedzic@gmail.com>
Sun, 8 Mar 2020 13:27:04 +0000 (14:27 +0100)
committerJouni Malinen <j@w1.fi>
Sun, 8 Mar 2020 15:14:48 +0000 (17:14 +0200)
Set device_name in the test cases instead of relying on the
wpa_supplicant configuration file. This fixes problems when we run WPS
test cases in remote test environment.

Signed-off-by: Janusz Dziedzic <janusz.dziedzic@gmail.com>
tests/hwsim/test_ap_wps.py

index b4dacf280620d8010aa09b37a8e53d63fec23cd0..b1b0331c48595ad4f72b5f1c31f80a4a0515dc26 100644 (file)
@@ -230,6 +230,7 @@ def test_ap_wps_conf(dev, apdev):
                            "wpa_key_mgmt": "WPA-PSK", "rsn_pairwise": "CCMP"})
     logger.info("WPS provisioning step")
     hapd.request("WPS_PBC")
+    dev[0].set("device_name", "Device A")
     dev[0].scan_for_bss(apdev[0]['bssid'], freq="2412")
     dev[0].dump_monitor()
     dev[0].request("WPS_PBC " + apdev[0]['bssid'])
@@ -262,6 +263,7 @@ def test_ap_wps_conf_5ghz(dev, apdev):
         hapd = hostapd.add_ap(apdev[0], params)
         logger.info("WPS provisioning step")
         hapd.request("WPS_PBC")
+        dev[0].set("device_name", "Device A")
         dev[0].scan_for_bss(apdev[0]['bssid'], freq="5180")
         dev[0].request("WPS_PBC " + apdev[0]['bssid'])
         dev[0].wait_connected(timeout=30)
@@ -285,6 +287,7 @@ def test_ap_wps_conf_chan14(dev, apdev):
         hapd = hostapd.add_ap(apdev[0], params)
         logger.info("WPS provisioning step")
         hapd.request("WPS_PBC")
+        dev[0].set("device_name", "Device A")
         dev[0].request("WPS_PBC")
         dev[0].wait_connected(timeout=30)