3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-11-25 09:39:25 +01:00

auto-t: testutil.py: update to work with test-runner rewrite

Similar to the others, testutil.py was converted to use the global
test context to lookup radios/interfaces rather than the wiphy_map
This commit is contained in:
James Prestwood 2020-09-10 16:12:25 -07:00 committed by Denis Kenzior
parent edac41b1b3
commit 85259bb519

View File

@ -5,8 +5,8 @@ import fcntl
import struct import struct
import select import select
import wiphy
import iwd import iwd
from config import ctx
HWSIM_ETHERTYPE = 0x0800 HWSIM_ETHERTYPE = 0x0800
HWSIM_PACKETLEN = 250 HWSIM_PACKETLEN = 250
@ -54,8 +54,9 @@ def tx(fromsock, tosock, src, dst):
def test_connected(if0=None, if1=None, group=True): def test_connected(if0=None, if1=None, group=True):
if if0 is None or if1 is None: if if0 is None or if1 is None:
iwd_list = [dev.name for dev in iwd.IWD.get_instance().list_devices()] iwd_list = [dev.name for dev in iwd.IWD.get_instance().list_devices()]
non_iwd_list = [ifname for w in wiphy.wiphy_map.values()
for ifname in w.interface_map] non_iwd_list = [rad.interface.name for rad in ctx.radios if rad.interface is not None]
for intf in iwd_list + non_iwd_list: for intf in iwd_list + non_iwd_list:
if if0 is None: if if0 is None:
if0 = intf if0 = intf