auto-t: fix FILS-384 autotest

This new test was merged during the time when testutil was not working
properly, so it was never verified to work with respect to testutil
(testing for 'connected' has always worked).

Since testFILS has 2 hostapd interfaces test_interface_connected was
defaulting to the incorrect interface for the SHA384 test. Now, the
explicit interfaces are passed in when checking for connectivity.
This commit is contained in:
James Prestwood 2019-04-25 12:36:47 -07:00 committed by Denis Kenzior
parent 78b5f56516
commit a6d7907a61
2 changed files with 24 additions and 6 deletions

View File

@ -11,10 +11,19 @@ import iwd
from iwd import IWD
from iwd import PSKAgent
from iwd import NetworkType
from hostapd import hostapd_map
from hostapd import HostapdCLI
import testutil
class Test(unittest.TestCase):
def test_connection_success(self):
hapd = None
for intf in hostapd_map.values():
if intf.config == 'ssidFILS-256.conf':
hapd = HostapdCLI(intf)
break
wd = IWD(True)
psk_agent = PSKAgent('user@example.com', ('user@example.com',
@ -45,7 +54,7 @@ class Test(unittest.TestCase):
wd.wait_for_object_condition(ordered_network.network_object, condition)
testutil.test_iface_operstate()
testutil.test_ifaces_connected()
testutil.test_ifaces_connected(device.name, hapd.ifname)
device.disconnect()
@ -65,12 +74,12 @@ class Test(unittest.TestCase):
wd.wait_for_object_condition(ordered_network.network_object, condition)
testutil.test_iface_operstate()
testutil.test_ifaces_connected()
testutil.test_ifaces_connected(device.name, hapd.ifname)
sleep(5)
testutil.test_iface_operstate()
testutil.test_ifaces_connected()
testutil.test_ifaces_connected(device.name, hapd.ifname)
device.disconnect()

View File

@ -11,10 +11,19 @@ import iwd
from iwd import IWD
from iwd import PSKAgent
from iwd import NetworkType
from hostapd import hostapd_map
from hostapd import HostapdCLI
import testutil
class Test(unittest.TestCase):
def test_connection_success(self):
hapd = None
for intf in hostapd_map.values():
if intf.config == 'ssidFILS-384.conf':
hapd = HostapdCLI(intf)
break
wd = IWD(True)
psk_agent = PSKAgent('user@example.com', ('user@example.com',
@ -45,7 +54,7 @@ class Test(unittest.TestCase):
wd.wait_for_object_condition(ordered_network.network_object, condition)
testutil.test_iface_operstate()
testutil.test_ifaces_connected()
testutil.test_ifaces_connected(device.name, hapd.ifname)
device.disconnect()
@ -65,12 +74,12 @@ class Test(unittest.TestCase):
wd.wait_for_object_condition(ordered_network.network_object, condition)
testutil.test_iface_operstate()
testutil.test_ifaces_connected()
testutil.test_ifaces_connected(device.name, hapd.ifname)
sleep(5)
testutil.test_iface_operstate()
testutil.test_ifaces_connected()
testutil.test_ifaces_connected(device.name, hapd.ifname)
device.disconnect()