]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: Update gas_anqp_oom_hapd to match new implementation
authorJouni Malinen <j@w1.fi>
Sun, 20 Dec 2015 18:56:34 +0000 (20:56 +0200)
committerJouni Malinen <j@w1.fi>
Sun, 20 Dec 2015 19:07:33 +0000 (21:07 +0200)
Since wpa_supplicant is now retrying GAS comeback failures once, the
gas_anqp_oom_hapd test case started failing. Fix this by updating the
test case to expect success (on the retry).

Signed-off-by: Jouni Malinen <j@w1.fi>
tests/hwsim/test_gas.py

index e8eac9fe0f7403dce685b1b600b5d90b19500033..99a511fc0d4e3f1db65e01e9a4b4527aab3d4ed7 100644 (file)
@@ -925,7 +925,8 @@ def test_gas_anqp_oom_hapd(dev, apdev):
     with alloc_fail(hapd, 1, "gas_anqp_build_comeback_resp"):
         hapd.set("gas_frag_limit", "50")
 
-        # This query will time out due to the AP not sending a response (OOM).
+        # The first attempt of this query will time out due to the AP not
+        # sending a response (OOM), but the retry succeeds.
         dev[0].request("FETCH_ANQP")
         ev = dev[0].wait_event(["GAS-QUERY-START"], timeout=5)
         if ev is None:
@@ -934,13 +935,13 @@ def test_gas_anqp_oom_hapd(dev, apdev):
         ev = dev[0].wait_event(["GAS-QUERY-DONE"], timeout=10)
         if ev is None:
             raise Exception("GAS query timed out")
-        if "result=TIMEOUT" not in ev:
+        if "result=SUCCESS" not in ev:
             raise Exception("Unexpected result: " + ev)
 
         ev = dev[0].wait_event(["ANQP-QUERY-DONE"], timeout=10)
         if ev is None:
             raise Exception("ANQP-QUERY-DONE event not seen")
-        if "result=FAILURE" not in ev:
+        if "result=SUCCESS" not in ev:
             raise Exception("Unexpected result: " + ev)
 
 def test_gas_anqp_extra_elements(dev, apdev):