mirror of
				https://git.kernel.org/pub/scm/network/wireless/iwd.git
				synced 2025-10-30 20:37:26 +01:00 
			
		
		
		
	auto-t: use wait_for_event in testSAE-roam
Depending on timing hostapd may not show a station with list_sta(). Instead use wait_for_event.
This commit is contained in:
		
							parent
							
								
									2ee4e95193
								
							
						
					
					
						commit
						c852892426
					
				| @ -35,7 +35,8 @@ class Test(unittest.TestCase): | ||||
|         condition = 'obj.state == DeviceState.connected' | ||||
|         wd.wait_for_object_condition(device, condition) | ||||
| 
 | ||||
|         self.assertTrue(self.bss_hostapd[0].list_sta()) | ||||
|         self.bss_hostapd[0].wait_for_event('AP-STA-CONNECTED %s' % device.address) | ||||
| 
 | ||||
|         self.assertFalse(self.bss_hostapd[1].list_sta()) | ||||
| 
 | ||||
|         testutil.test_iface_operstate(device.name) | ||||
| @ -54,7 +55,7 @@ class Test(unittest.TestCase): | ||||
|         to_condition = 'obj.state == DeviceState.connected' | ||||
|         wd.wait_for_object_change(device, from_condition, to_condition) | ||||
| 
 | ||||
|         self.assertTrue(self.bss_hostapd[1].list_sta()) | ||||
|         self.bss_hostapd[1].wait_for_event('AP-STA-CONNECTED %s' % device.address) | ||||
| 
 | ||||
|         testutil.test_iface_operstate(device.name) | ||||
|         testutil.test_ifaces_connected(self.bss_hostapd[1].ifname, device.name) | ||||
| @ -72,8 +73,10 @@ class Test(unittest.TestCase): | ||||
|         condition = 'obj.state != DeviceState.roaming' | ||||
|         wd.wait_for_object_condition(device, condition) | ||||
| 
 | ||||
|         self.assertEqual(device.state, iwd.DeviceState.connected) | ||||
|         self.assertTrue(self.bss_hostapd[2].list_sta()) | ||||
|         condition = 'obj.state == DeviceState.connected' | ||||
|         wd.wait_for_object_condition(device, condition) | ||||
| 
 | ||||
|         self.bss_hostapd[2].wait_for_event('AP-STA-CONNECTED %s' % device.address) | ||||
| 
 | ||||
|         testutil.test_iface_operstate(device.name) | ||||
|         testutil.test_ifaces_connected(self.bss_hostapd[2].ifname, device.name) | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 James Prestwood
						James Prestwood