From 85c96b7cf7b7a46bd901551ccb287ce8b9d1ad5e Mon Sep 17 00:00:00 2001 From: Benjamin Berg Date: Tue, 21 Nov 2023 01:51:47 +0200 Subject: [PATCH] tests: Fix some incorrect failure waiting calls These were either sending the command to the wrong hostapd/wpa_supplicant instance or using the wrong command. This currently causes the wait to just immediately stop, but with future commits it would start failing. Signed-off-by: Benjamin Berg --- tests/hwsim/test_ap_hs20.py | 4 ++-- tests/hwsim/test_rrm.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/hwsim/test_ap_hs20.py b/tests/hwsim/test_ap_hs20.py index 30bacb969..c77c8d2e9 100644 --- a/tests/hwsim/test_ap_hs20.py +++ b/tests/hwsim/test_ap_hs20.py @@ -5470,7 +5470,7 @@ def run_proxyarp_errors(dev, apdev, params): with fail_test(hapd, 1, "x_snoop_mcast_to_ucast_convert_send"): if "OK" not in hapd.request("DATA_TEST_FRAME ifname=ap-br0 " + binascii.hexlify(pkt).decode()): raise Exception("DATA_TEST_FRAME failed") - wait_fail_trigger(dev[0], "GET_FAIL") + wait_fail_trigger(hapd, "GET_FAIL") with alloc_fail(hapd, 1, "sta_ip6addr_add"): src_ll_opt0 = b"\x01\x01" + binascii.unhexlify(addr0.replace(':', '')) @@ -5479,7 +5479,7 @@ def run_proxyarp_errors(dev, apdev, params): opt=src_ll_opt0) if "OK" not in dev[0].request("DATA_TEST_FRAME " + binascii.hexlify(pkt).decode()): raise Exception("DATA_TEST_FRAME failed") - wait_fail_trigger(dev[0], "GET_ALLOC_FAIL") + wait_fail_trigger(hapd, "GET_ALLOC_FAIL") def test_ap_hs20_connect_deinit(dev, apdev): """Hotspot 2.0 connection interrupted with deinit""" diff --git a/tests/hwsim/test_rrm.py b/tests/hwsim/test_rrm.py index 76d75067f..4d64d4075 100644 --- a/tests/hwsim/test_rrm.py +++ b/tests/hwsim/test_rrm.py @@ -1134,7 +1134,7 @@ def test_rrm_beacon_req_table_request_oom(dev, apdev): with fail_test(dev[0], 1, "wpa_driver_nl80211_send_action;wpas_rrm_send_msr_report_mpdu"): token = run_req_beacon(hapd, addr, req + "020101" + "0a03000106") - wait_fail_trigger(dev[0], "GET_ALLOC_FAIL") + wait_fail_trigger(dev[0], "GET_FAIL") ev = hapd.wait_event(["BEACON-RESP-RX"], timeout=0.1) if ev is not None: raise Exception("Unexpected beacon report response received (OOM)")