]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: connected_time for mesh peer
authorJouni Malinen <j@w1.fi>
Wed, 25 Aug 2021 09:26:30 +0000 (12:26 +0300)
committerJouni Malinen <j@w1.fi>
Wed, 25 Aug 2021 09:26:30 +0000 (12:26 +0300)
Signed-off-by: Jouni Malinen <j@w1.fi>
tests/hwsim/test_wpas_mesh.py

index 75bc02146eb8a1946ded21cb925897f307ca6169..0caed771edadf682fa5eb384e9980d9946a02303 100644 (file)
@@ -270,6 +270,9 @@ def test_wpas_mesh_open(dev, apdev):
     if mode != "mesh":
         raise Exception("Unexpected mode: " + mode)
 
+    peer = dev[1].own_addr()
+    sta1 = dev[0].get_sta(peer)
+
     dev[0].scan(freq="2462")
     bss = dev[0].get_bss(dev[1].own_addr())
     if bss and 'ie' in bss and "ff0724" in bss['ie']:
@@ -280,6 +283,15 @@ def test_wpas_mesh_open(dev, apdev):
         if "[VHT]" in sta:
             raise Exception("Unexpected STA VHT flag")
 
+    time.sleep(1.1)
+    sta2 = dev[0].get_sta(peer)
+    if 'connected_time' not in sta1 or 'connected_time' not in sta2:
+        raise Exception("connected_time not reported for peer")
+    ct1 = int(sta1['connected_time'])
+    ct2 = int(sta2['connected_time'])
+    if ct2 <= ct1:
+        raise Exception("connected_time did not increment")
+
 def test_wpas_mesh_open_no_auto(dev, apdev):
     """wpa_supplicant open MESH network connectivity"""
     check_mesh_support(dev[0])