From 8823178c965531ce500337abf58eb51dcc8d9fee Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Sun, 25 Oct 2015 23:01:21 +0200 Subject: [PATCH] tests: Start WNM-Sleep Mode in wnm_action_proto* This is needed to avoid test case failures with additional state validation in wpa_supplicant. Signed-off-by: Jouni Malinen --- tests/hwsim/test_wnm.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tests/hwsim/test_wnm.py b/tests/hwsim/test_wnm.py index 824ae6011..1fed94226 100644 --- a/tests/hwsim/test_wnm.py +++ b/tests/hwsim/test_wnm.py @@ -675,9 +675,12 @@ def test_wnm_bss_tm_global(dev, apdev): def test_wnm_action_proto(dev, apdev): """WNM Action protocol testing""" params = { "ssid": "test-wnm" } + params['wnm_sleep_mode'] = '1' hapd = hostapd.add_ap(apdev[0]['ifname'], params) bssid = apdev[0]['bssid'] dev[0].connect("test-wnm", key_mgmt="NONE", scan_freq="2412") + dev[0].request("WNM_SLEEP enter") + time.sleep(0.1) hapd.set("ext_mgmt_frame_handling", "1") msg = {} @@ -874,10 +877,13 @@ def test_wnm_action_proto_pmf(dev, apdev): params = hostapd.wpa2_params(ssid=ssid, passphrase="12345678") params["wpa_key_mgmt"] = "WPA-PSK-SHA256" params["ieee80211w"] = "2" + params['wnm_sleep_mode'] = '1' hapd = hostapd.add_ap(apdev[0]['ifname'], params) bssid = apdev[0]['bssid'] dev[0].connect(ssid, psk="12345678", key_mgmt="WPA-PSK-SHA256", proto="WPA2", ieee80211w="2", scan_freq="2412") + dev[0].request("WNM_SLEEP enter") + time.sleep(0.1) hapd.set("ext_mgmt_frame_handling", "1") msg = {} @@ -973,10 +979,13 @@ def test_wnm_action_proto_no_pmf(dev, apdev): """WNM Action protocol testing (PMF disabled)""" ssid = "test-wnm-no-pmf" params = hostapd.wpa2_params(ssid=ssid, passphrase="12345678") + params['wnm_sleep_mode'] = '1' hapd = hostapd.add_ap(apdev[0]['ifname'], params) bssid = apdev[0]['bssid'] dev[0].connect(ssid, psk="12345678", key_mgmt="WPA-PSK", proto="WPA2", ieee80211w="0", scan_freq="2412") + dev[0].request("WNM_SLEEP enter") + time.sleep(0.1) hapd.set("ext_mgmt_frame_handling", "1") msg = {}