From: Jouni Malinen Date: Wed, 19 Mar 2025 17:04:44 +0000 (+0200) Subject: tests: Make ap_wpa2_eap_eke_server_oom a bit more robust X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5105f9cb9ab492ffa46cc7c1b17b3af02915077a;p=thirdparty%2Fhostap.git tests: Make ap_wpa2_eap_eke_server_oom a bit more robust Clear the pending event messages and remove old networks between all connection attempts to make this more robust. Signed-off-by: Jouni Malinen --- diff --git a/tests/hwsim/test_ap_eap.py b/tests/hwsim/test_ap_eap.py index 3f214a9a9..450c7af5a 100644 --- a/tests/hwsim/test_ap_eap.py +++ b/tests/hwsim/test_ap_eap.py @@ -3473,6 +3473,8 @@ def test_ap_wpa2_eap_eke_server_oom(dev, apdev): eap_connect(dev[0], hapd, "EKE", "eke user", password="hello", expect_failure=True) dev[0].request("REMOVE_NETWORK all") + dev[0].dump_monitor() + hapd.dump_monitor() for count, func, pw in [(1, "eap_eke_init", "hello"), (1, "eap_eke_get_session_id", "hello"), @@ -3492,9 +3494,13 @@ def test_ap_wpa2_eap_eke_server_oom(dev, apdev): if hapd.request("GET_ALLOC_FAIL").startswith('0'): break dev[0].request("REMOVE_NETWORK all") + dev[0].dump_monitor() + hapd.dump_monitor() for count in range(1, 1000): # Fail on allocation number "count" + dev[0].dump_monitor() + hapd.dump_monitor() hapd.request("TEST_ALLOC_FAIL %d:eap_server_sm_step" % count) dev[0].connect("test-wpa2-eap", @@ -3506,6 +3512,7 @@ def test_ap_wpa2_eap_eke_server_oom(dev, apdev): for i in range(10): time.sleep(0.1) if hapd.request("GET_ALLOC_FAIL").startswith('0'): + dev[0].request("REMOVE_NETWORK all") break else: # Last iteration had no failure