tests: Work around race condition for TRANSITION-DISABLE processing
This event may be sent before CTRL-EVENT-CONNECTED, so modify the test cases to wait directly for TRANSITION-DISABLE by skipping the separate wait for CTRL-EVENT-CONNECTED. Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
This commit is contained in:
parent
4a28e0cb9c
commit
ed4e845576
6 changed files with 15 additions and 16 deletions
|
@ -7813,8 +7813,8 @@ def test_ap_wpa3_eap_transition_disable(dev, apdev):
|
||||||
proto="WPA WPA2", pairwise="CCMP", group="TKIP CCMP",
|
proto="WPA WPA2", pairwise="CCMP", group="TKIP CCMP",
|
||||||
eap="GPSK", identity="gpsk user",
|
eap="GPSK", identity="gpsk user",
|
||||||
password="abcdefghijklmnop0123456789abcdef",
|
password="abcdefghijklmnop0123456789abcdef",
|
||||||
scan_freq="2412")
|
scan_freq="2412", wait_connect=False)
|
||||||
ev = dev[0].wait_event(["TRANSITION-DISABLE"], timeout=1)
|
ev = dev[0].wait_event(["TRANSITION-DISABLE"], timeout=20)
|
||||||
if ev is None:
|
if ev is None:
|
||||||
raise Exception("Transition disable not indicated")
|
raise Exception("Transition disable not indicated")
|
||||||
if ev.split(' ')[1] != "04":
|
if ev.split(' ')[1] != "04":
|
||||||
|
|
|
@ -976,9 +976,9 @@ def test_owe_transition_mode_disable(dev, apdev):
|
||||||
dev[0].scan_for_bss(bssid2, freq="2412")
|
dev[0].scan_for_bss(bssid2, freq="2412")
|
||||||
|
|
||||||
id = dev[0].connect("owe-test", key_mgmt="OWE", ieee80211w="2",
|
id = dev[0].connect("owe-test", key_mgmt="OWE", ieee80211w="2",
|
||||||
scan_freq="2412")
|
scan_freq="2412", wait_connect=False)
|
||||||
|
|
||||||
ev = dev[0].wait_event(["TRANSITION-DISABLE"], timeout=1)
|
ev = dev[0].wait_event(["TRANSITION-DISABLE"], timeout=15)
|
||||||
if ev is None:
|
if ev is None:
|
||||||
raise Exception("Transition disable not indicated")
|
raise Exception("Transition disable not indicated")
|
||||||
if ev.split(' ')[1] != "08":
|
if ev.split(' ')[1] != "08":
|
||||||
|
|
|
@ -501,8 +501,8 @@ def test_sae_and_psk_transition_disable(dev, apdev):
|
||||||
|
|
||||||
dev[0].request("SET sae_groups ")
|
dev[0].request("SET sae_groups ")
|
||||||
id = dev[0].connect("test-sae", psk="12345678", key_mgmt="SAE WPA-PSK",
|
id = dev[0].connect("test-sae", psk="12345678", key_mgmt="SAE WPA-PSK",
|
||||||
ieee80211w="1", scan_freq="2412")
|
ieee80211w="1", scan_freq="2412", wait_connect=False)
|
||||||
ev = dev[0].wait_event(["TRANSITION-DISABLE"], timeout=1)
|
ev = dev[0].wait_event(["TRANSITION-DISABLE"], timeout=15)
|
||||||
if ev is None:
|
if ev is None:
|
||||||
raise Exception("Transition disable not indicated")
|
raise Exception("Transition disable not indicated")
|
||||||
if ev.split(' ')[1] != "01":
|
if ev.split(' ')[1] != "01":
|
||||||
|
|
|
@ -259,8 +259,8 @@ def test_sae_pk_transition_disable(dev, apdev):
|
||||||
hapd = hostapd.add_ap(apdev[0], params)
|
hapd = hostapd.add_ap(apdev[0], params)
|
||||||
|
|
||||||
id = dev[0].connect(SAE_PK_SSID, sae_password=SAE_PK_SEC3_PW,
|
id = dev[0].connect(SAE_PK_SSID, sae_password=SAE_PK_SEC3_PW,
|
||||||
key_mgmt="SAE", scan_freq="2412")
|
key_mgmt="SAE", scan_freq="2412", wait_connect=False)
|
||||||
ev = dev[0].wait_event(["TRANSITION-DISABLE"], timeout=1)
|
ev = dev[0].wait_event(["TRANSITION-DISABLE"], timeout=15)
|
||||||
if ev is None:
|
if ev is None:
|
||||||
raise Exception("Transition disable not indicated")
|
raise Exception("Transition disable not indicated")
|
||||||
if ev.split(' ')[1] != "02":
|
if ev.split(' ')[1] != "02":
|
||||||
|
|
|
@ -5791,8 +5791,8 @@ def test_sigma_dut_ap_transition_disable(dev, apdev, params):
|
||||||
|
|
||||||
dev[0].set("sae_groups", "")
|
dev[0].set("sae_groups", "")
|
||||||
dev[0].connect("test-sae", key_mgmt="SAE", psk="12345678",
|
dev[0].connect("test-sae", key_mgmt="SAE", psk="12345678",
|
||||||
ieee80211w="2", scan_freq="2412")
|
ieee80211w="2", scan_freq="2412", wait_connect=False)
|
||||||
ev = dev[0].wait_event(["TRANSITION-DISABLE"], timeout=1)
|
ev = dev[0].wait_event(["TRANSITION-DISABLE"], timeout=15)
|
||||||
if ev is None:
|
if ev is None:
|
||||||
raise Exception("Transition disable not indicated")
|
raise Exception("Transition disable not indicated")
|
||||||
if ev.split(' ')[1] != "01":
|
if ev.split(' ')[1] != "01":
|
||||||
|
@ -5816,8 +5816,8 @@ def test_sigma_dut_ap_transition_disable_change(dev, apdev, params):
|
||||||
sigma_dut_cmd_check("ap_config_commit,NAME,AP")
|
sigma_dut_cmd_check("ap_config_commit,NAME,AP")
|
||||||
dev[0].set("sae_groups", "")
|
dev[0].set("sae_groups", "")
|
||||||
dev[0].connect("test-sae", key_mgmt="SAE", psk="12345678",
|
dev[0].connect("test-sae", key_mgmt="SAE", psk="12345678",
|
||||||
ieee80211w="2", scan_freq="2412")
|
ieee80211w="2", scan_freq="2412", wait_connect=False)
|
||||||
ev = dev[0].wait_event(["TRANSITION-DISABLE"], timeout=1)
|
ev = dev[0].wait_event(["TRANSITION-DISABLE"], timeout=15)
|
||||||
if ev is not None:
|
if ev is not None:
|
||||||
raise Exception("Unexpected transition disable indication")
|
raise Exception("Unexpected transition disable indication")
|
||||||
dev[0].request("DISCONNECT")
|
dev[0].request("DISCONNECT")
|
||||||
|
@ -5826,8 +5826,7 @@ def test_sigma_dut_ap_transition_disable_change(dev, apdev, params):
|
||||||
|
|
||||||
sigma_dut_cmd_check("ap_set_rfeature,NAME,AP,Transition_Disable,1,Transition_Disable_Index,0")
|
sigma_dut_cmd_check("ap_set_rfeature,NAME,AP,Transition_Disable,1,Transition_Disable_Index,0")
|
||||||
dev[0].request("RECONNECT")
|
dev[0].request("RECONNECT")
|
||||||
dev[0].wait_connected()
|
ev = dev[0].wait_event(["TRANSITION-DISABLE"], timeout=15)
|
||||||
ev = dev[0].wait_event(["TRANSITION-DISABLE"], timeout=1)
|
|
||||||
if ev is None:
|
if ev is None:
|
||||||
raise Exception("Transition disable not indicated")
|
raise Exception("Transition disable not indicated")
|
||||||
if ev.split(' ')[1] != "01":
|
if ev.split(' ')[1] != "01":
|
||||||
|
|
|
@ -978,8 +978,8 @@ def test_wpas_ap_sae_and_psk_transition_disable(dev):
|
||||||
dev[1].set("sae_groups", "")
|
dev[1].set("sae_groups", "")
|
||||||
dev[1].connect("wpas-ap-sae", key_mgmt="SAE WPA-PSK",
|
dev[1].connect("wpas-ap-sae", key_mgmt="SAE WPA-PSK",
|
||||||
psk="12345678", ieee80211w="1",
|
psk="12345678", ieee80211w="1",
|
||||||
scan_freq="2412")
|
scan_freq="2412", wait_connect=False)
|
||||||
ev = dev[1].wait_event(["TRANSITION-DISABLE"], timeout=1)
|
ev = dev[1].wait_event(["TRANSITION-DISABLE"], timeout=15)
|
||||||
if ev is None:
|
if ev is None:
|
||||||
raise Exception("Transition disable not indicated")
|
raise Exception("Transition disable not indicated")
|
||||||
if ev.split(' ')[1] != "01":
|
if ev.split(' ')[1] != "01":
|
||||||
|
|
Loading…
Reference in a new issue