mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-12-20 19:12:33 +01:00
auto-t: fix testNetconfig
The interface was hard coded to wln0 which works when running single tests but not when running multiple. Instead use the actual ifname that hostapd is using.
This commit is contained in:
parent
ee4e1368d2
commit
1e8fedce6c
@ -8,6 +8,7 @@ import iwd
|
|||||||
from iwd import IWD
|
from iwd import IWD
|
||||||
from iwd import PSKAgent
|
from iwd import PSKAgent
|
||||||
from iwd import NetworkType
|
from iwd import NetworkType
|
||||||
|
from hostapd import HostapdCLI
|
||||||
import testutil
|
import testutil
|
||||||
from config import ctx
|
from config import ctx
|
||||||
|
|
||||||
@ -54,10 +55,11 @@ class Test(unittest.TestCase):
|
|||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def setUpClass(cls):
|
def setUpClass(cls):
|
||||||
|
hapd = HostapdCLI()
|
||||||
# TODO: This could be moved into test-runner itself if other tests ever
|
# TODO: This could be moved into test-runner itself if other tests ever
|
||||||
# require this functionality (p2p, FILS, etc.). Since its simple
|
# require this functionality (p2p, FILS, etc.). Since its simple
|
||||||
# enough it can stay here for now.
|
# enough it can stay here for now.
|
||||||
ctx.start_process(['ifconfig', 'wln0', '192.168.1.1', 'netmask', '255.255.255.0'],
|
ctx.start_process(['ifconfig', hapd.ifname, '192.168.1.1', 'netmask', '255.255.255.0'],
|
||||||
wait=True)
|
wait=True)
|
||||||
ctx.start_process(['touch', '/tmp/dhcpd.leases'], wait=True)
|
ctx.start_process(['touch', '/tmp/dhcpd.leases'], wait=True)
|
||||||
ctx.start_process(['dhcpd', '-cf', '/tmp/dhcpd.conf', '-lf', '/tmp/dhcpd.leases'])
|
ctx.start_process(['dhcpd', '-cf', '/tmp/dhcpd.conf', '-lf', '/tmp/dhcpd.leases'])
|
||||||
|
Loading…
Reference in New Issue
Block a user