eiwd

no dbus iwd with iwctl functionality
git clone https://git.daat.foo/repos/eiwd.git
Log | Files | Refs | Submodules | README | LICENSE

commit 3eff81864ced4ea20d7684a248affc2e9d0fc446
parent bc046994dbda594291a702c7e8b8082999b35935
Author: Andrew Zaborowski <andrew.zaborowski@intel.com>
Date:   Mon, 23 Aug 2021 16:14:24 +0200

autotests: Test GO-side IP Allocation in testP2P

Check if our wpa_supplicant P2P Client has received the allocated
Clieant IP/netmask/GO IP values we sent in the 4-Way Handshake.

Diffstat:
Mautotests/testP2P/connection_test.py | 9++++++++-
Mautotests/util/wpas.py | 1+
2 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/autotests/testP2P/connection_test.py b/autotests/testP2P/connection_test.py @@ -91,6 +91,7 @@ class Test(unittest.TestCase): wd.wait_for_object_condition(wpas, 'obj.p2p_group is not None', max_wait=3) peer_ifname = wpas.p2p_group['ifname'] + self.assertEqual(wpas.p2p_group['role'], 'GO' if not go else 'client') if not go: ctx.start_process(['ifconfig', peer_ifname, '192.168.1.20', 'netmask', '255.255.255.0'], wait=True) @@ -102,6 +103,9 @@ class Test(unittest.TestCase): client = wpas.p2p_clients[request['peer_iface']] self.assertEqual(client['p2p_dev_addr'], wpas_peer['p2p_dev_addr']) else: + self.assertEqual(wpas.p2p_group['ip_addr'], '192.168.1.2') + self.assertEqual(wpas.p2p_group['ip_mask'], '255.255.255.240') + self.assertEqual(wpas.p2p_group['go_ip_addr'], '192.168.1.1') dhcp = ctx.start_process(['dhclient', '-v', '-d', '--no-pid', '-cf', '/dev/null', '-lf', '/tmp/dhcp.leases', '-sf', '/tmp/dhclient-script', peer_ifname]) self.dhcp = dhcp @@ -136,7 +140,10 @@ class Test(unittest.TestCase): def tearDown(self): if self.p2p is not None: - self.p2p.enabled = False + try: + self.p2p.enabled = False + except: + pass if self.wpas is not None: self.wpas.clean_up() self.wpas = None diff --git a/autotests/util/wpas.py b/autotests/util/wpas.py @@ -159,6 +159,7 @@ class Wpas: elif event['event'] == 'P2P-GROUP-STARTED': event.pop('event') event['ifname'] = event.pop('arg1') + event['role'] = event.pop('arg2') self.p2p_group = event elif event['event'] == 'P2P-GROUP-REMOVED': self.p2p_group = None