3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-12-22 21:22:37 +01:00

auto-t: cleanup testRRM

This removes prints which were never supposed to make it upstream as
well as changes sleep() to wd.wait() as well as increase the wait
period to fix issues with how fast UML runs the tests.
This commit is contained in:
James Prestwood 2022-03-31 16:16:38 -07:00 committed by Denis Kenzior
parent 95ad47bd98
commit dbd6ddfc95

View File

@ -11,8 +11,6 @@ from iwd import NetworkType
from hostapd import HostapdCLI from hostapd import HostapdCLI
import testutil import testutil
from time import sleep
# Table beacon with wildcard BSSID # Table beacon with wildcard BSSID
basic_beacon = '51000000000002ffffffffffff020100' basic_beacon = '51000000000002ffffffffffff020100'
# Table beacon with wildcard BSSID and SSID filter # Table beacon with wildcard BSSID and SSID filter
@ -53,51 +51,43 @@ class Test(unittest.TestCase):
hapd.wait_for_event('AP-STA-CONNECTED') hapd.wait_for_event('AP-STA-CONNECTED')
wd.wait(1)
# This should return both APs # This should return both APs
hapd.req_beacon(device.address, basic_beacon) hapd.req_beacon(device.address, basic_beacon)
for e in ['BEACON-RESP-RX', 'BEACON-RESP-RX']: for e in ['BEACON-RESP-RX', 'BEACON-RESP-RX']:
event = hapd.wait_for_event(e) hapd.wait_for_event(e)
if event:
print(event)
sleep(0.5) wd.wait(1)
# This should return just ssidRRM # This should return just ssidRRM
hapd.req_beacon(device.address, beacon_with_ssid) hapd.req_beacon(device.address, beacon_with_ssid)
event = hapd.wait_for_event('BEACON-RESP-RX') hapd.wait_for_event('BEACON-RESP-RX')
if event:
print(event)
sleep(0.5) wd.wait(1)
# This should passive scan on channel 11, returning otherSSID # This should passive scan on channel 11, returning otherSSID
hapd.req_beacon(device.address, beacon_passive) hapd.req_beacon(device.address, beacon_passive)
# TODO: See if we are scanning here (scan not initiated from station) # TODO: See if we are scanning here (scan not initiated from station)
event = hapd.wait_for_event('BEACON-RESP-RX') hapd.wait_for_event('BEACON-RESP-RX')
if event:
print(event)
sleep(0.5) wd.wait(1)
# This should active scan on channel 11, returning otherSSID # This should active scan on channel 11, returning otherSSID
hapd.req_beacon(device.address, beacon_active) hapd.req_beacon(device.address, beacon_active)
# TODO: See if we are scanning here (scan not initiated from station) # TODO: See if we are scanning here (scan not initiated from station)
event = hapd.wait_for_event('BEACON-RESP-RX') hapd.wait_for_event('BEACON-RESP-RX')
if event:
print(event)
sleep(0.5) wd.wait(1)
# This should passive scan on channel 11, returning otherSSID # This should passive scan on channel 11, returning otherSSID
hapd.req_beacon(device.address, beacon_passive_duration) hapd.req_beacon(device.address, beacon_passive_duration)
# TODO: See if we are scanning here (scan not initiated from station) # TODO: See if we are scanning here (scan not initiated from station)
event = hapd.wait_for_event('BEACON-RESP-RX') hapd.wait_for_event('BEACON-RESP-RX')
if event:
print(event)
device.disconnect() device.disconnect()