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

autotests: Update APRanges usage in testAP

[General].APRange is now [IPv4].APAddressPool and the netmask is changed
from 23 to 27 bits to make the test correctly assert that only two
default-sized subnets are allowed by IWD simultaneously (default has
changed from 24 to 28 bits)
This commit is contained in:
Andrew Zaborowski 2021-05-28 02:47:36 +02:00 committed by Denis Kenzior
parent 7163a9d9d7
commit fc81e07c13
2 changed files with 12 additions and 4 deletions

View File

@ -3,4 +3,6 @@ DisableMacAddressRandomization=true
[General]
EnableNetworkConfiguration=true
APRanges=192.168.80.0/23
[IPv4]
APAddressPool=192.168.80.0/27

View File

@ -58,8 +58,14 @@ class Test(unittest.TestCase):
testutil.test_iface_operstate(dev2.name)
testutil.test_ifaces_connected(dev1.name, dev2.name, group=False)
testutil.test_ip_address_match(dev1.name, "192.168.80.1")
testutil.test_ip_address_match(dev2.name, "192.168.80.2")
try:
testutil.test_ip_address_match(dev1.name, "192.168.80.1")
testutil.test_ip_address_match(dev2.name, "192.168.80.2")
ip = "192.168.80.1"
except:
testutil.test_ip_address_match(dev1.name, "192.168.80.17")
testutil.test_ip_address_match(dev2.name, "192.168.80.18")
ip = "192.168.80.17"
wd.unregister_psk_agent(psk_agent)
@ -76,7 +82,7 @@ class Test(unittest.TestCase):
# got initially.
dev4.start_ap('TestAP4', 'Password4')
testutil.test_ip_address_match(dev4.name, "192.168.80.1")
testutil.test_ip_address_match(dev4.name, ip)
finally:
dev1.stop_ap()