From 4fe798bd9de8c7c381ff05fbbe661e52d20182e4 Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Mon, 6 Mar 2017 23:53:33 +0200 Subject: [PATCH] tests: Make wnm_bss_tm_req a bit more efficient and robust Use a local variable for the STA address instead of fetching it separately for each operation. Dump control interface monitor events between each test message to avoid increasing the socket output queue unnecessarily. Signed-off-by: Jouni Malinen --- tests/hwsim/test_wnm.py | 45 +++++++++++++++++++++++++++-------------- 1 file changed, 30 insertions(+), 15 deletions(-) diff --git a/tests/hwsim/test_wnm.py b/tests/hwsim/test_wnm.py index 6999f9c94..6323c050d 100644 --- a/tests/hwsim/test_wnm.py +++ b/tests/hwsim/test_wnm.py @@ -381,86 +381,97 @@ def test_wnm_bss_tm_req(dev, apdev): params = { "ssid": "test-wnm", "bss_transition": "1" } hapd = hostapd.add_ap(apdev[0], params) dev[0].connect("test-wnm", key_mgmt="NONE", scan_freq="2412") + addr = dev[0].own_addr() hapd.set("ext_mgmt_frame_handling", "1") # truncated BSS TM Request - req = bss_tm_req(dev[0].p2p_interface_addr(), apdev[0]['bssid'], + req = bss_tm_req(addr, apdev[0]['bssid'], req_mode=0x08) req['payload'] = struct.pack("