From 6b294e57a5ef06365569db0667d4bb0b5d7e78a6 Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Sat, 18 Jul 2015 19:04:55 +0300 Subject: [PATCH] tests: Speed up fst_proto by waiting for MGMT-TX-STATUS event Signed-off-by: Jouni Malinen --- tests/hwsim/test_fst_module.py | 48 ++++++++++++++++------------------ 1 file changed, 22 insertions(+), 26 deletions(-) diff --git a/tests/hwsim/test_fst_module.py b/tests/hwsim/test_fst_module.py index 340d723e5..e84368563 100644 --- a/tests/hwsim/test_fst_module.py +++ b/tests/hwsim/test_fst_module.py @@ -1792,6 +1792,14 @@ FST_ACTION_ACK_REQUEST = 3 FST_ACTION_ACK_RESPONSE = 4 FST_ACTION_ON_CHANNEL_TUNNEL = 5 +def hostapd_tx_and_status(hapd, msg): + hapd.set("ext_mgmt_frame_handling", "1") + hapd.mgmt_tx(msg) + ev = hapd.wait_event([ "MGMT-TX-STATUS" ], timeout=1) + if ev is None or "ok=1" not in ev: + raise Exception("No ACK") + hapd.set("ext_mgmt_frame_handling", "0") + def test_fst_proto(dev, apdev, test_params): """FST protocol testing""" ap1, ap2, sta1, sta2 = fst_module_aux.start_two_ap_sta_pairs(apdev) @@ -1810,21 +1818,18 @@ def test_fst_proto(dev, apdev, test_params): # unknown FST Action (255) received! msg['payload'] = struct.pack("