From: Jouni Malinen Date: Mon, 6 Mar 2017 21:53:33 +0000 (+0200) Subject: tests: Make wnm_bss_tm_req a bit more efficient and robust X-Git-Tag: hostap_2_7~1501 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=4fe798bd9de8c7c381ff05fbbe661e52d20182e4;p=thirdparty%2Fhostap.git 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 --- 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("