From: Jouni Malinen Date: Sun, 10 Dec 2023 16:27:26 +0000 (+0200) Subject: tests: Fix wpas_mesh_pmksa_caching_ext to allow lifetime to decrease X-Git-Tag: hostap_2_11~686 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a10158a49aae065c1ca0e30ce22901ad3fcd12c7;p=thirdparty%2Fhostap.git tests: Fix wpas_mesh_pmksa_caching_ext to allow lifetime to decrease 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 --- diff --git a/tests/hwsim/test_wpas_mesh.py b/tests/hwsim/test_wpas_mesh.py index 27397fbfb..5d2124005 100644 --- a/tests/hwsim/test_wpas_mesh.py +++ b/tests/hwsim/test_wpas_mesh.py @@ -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])