]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: RADIUS Accounting and interim updates failing
authorJouni Malinen <j@w1.fi>
Sun, 14 Mar 2021 15:59:52 +0000 (17:59 +0200)
committerJouni Malinen <j@w1.fi>
Sun, 14 Mar 2021 15:59:52 +0000 (17:59 +0200)
Signed-off-by: Jouni Malinen <j@w1.fi>
tests/hwsim/test_radius.py

index f82e6e07466386981a7978132e2111aed5187add..ca96c979e12553c7506dfaf6531c13350ef6d2f2 100644 (file)
@@ -313,6 +313,20 @@ def test_radius_acct_interim(dev, apdev):
     req_e = int(as_mib_end['radiusAccServTotalRequests'])
     if req_e < req_s + 3:
         raise Exception("Unexpected RADIUS server acct MIB value (req_e=%d req_s=%d)" % (req_e, req_s))
+    # Disable Accounting server and wait for interim update retries to fail and
+    # expire.
+    as_hapd.disable()
+    time.sleep(15)
+    as_hapd.enable()
+    ok = False
+    for i in range(10):
+        time.sleep(1)
+        as_mib = as_hapd.get_mib(param="radius_server")
+        if int(as_mib['radiusAccServTotalRequests']) > 0:
+            ok = True
+            break
+    if not ok:
+        raise Exception("Accounting updates did not seen after server restart")
 
 def test_radius_acct_interim_unreachable(dev, apdev):
     """RADIUS Accounting interim update with unreachable server"""