From: Jouni Malinen Date: Wed, 25 Aug 2021 09:26:30 +0000 (+0300) Subject: tests: connected_time for mesh peer X-Git-Tag: hostap_2_10~200 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0cc9d7fb1277649009f96ff09ba2e1d814807087;p=thirdparty%2Fhostap.git tests: connected_time for mesh peer Signed-off-by: Jouni Malinen --- diff --git a/tests/hwsim/test_wpas_mesh.py b/tests/hwsim/test_wpas_mesh.py index 75bc02146..0caed771e 100644 --- a/tests/hwsim/test_wpas_mesh.py +++ b/tests/hwsim/test_wpas_mesh.py @@ -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])