]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: Fix wpas_mesh_pmksa_caching_ext to allow lifetime to decrease
authorJouni Malinen <j@w1.fi>
Sun, 10 Dec 2023 16:27:26 +0000 (18:27 +0200)
committerJouni Malinen <j@w1.fi>
Sun, 10 Dec 2023 17:40:18 +0000 (19:40 +0200)
The remaining lifetime of the PMKSA entry is decreasing, so need to
allow it to differ between the old and new entries.

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

index 27397fbfb9790123cb9b195c4e0842f211dc8461..5d212400550fe312f2b1288491ccb17c4a02ae05 100644 (file)
@@ -1730,7 +1730,12 @@ def test_wpas_mesh_pmksa_caching_ext(dev, apdev):
         raise Exception("PMKID mismatch in PMKSA cache entries after external storage restore")
 
     res3 = dev[1].request("MESH_PMKSA_GET " + addr0)
-    if res2 != res3:
+    logger.info("MESH_PMKSA_GET: " + res3)
+    # Require other fields to be equal, but allow remaining time to be smaller.
+    r2 = res2.split()
+    r3 = res3.split()
+    if r2[0] != r3[0] or r2[1] != r3[1] or r2[2] != r3[2] or \
+       int(r3[3]) > int(r2[3]):
         raise Exception("Unexpected change in MESH_PMKSA_GET result")
 
     hwsim_utils.test_connectivity(dev[0], dev[1])