From eb2af30ac2e1ba560a066745643cc50a3808f3c7 Mon Sep 17 00:00:00 2001 From: Janusz Dziedzic Date: Wed, 30 Mar 2016 10:55:56 +0200 Subject: [PATCH] tests: Pass full apdev to add_ap() function (6) Pass the full apdev to the add_ap() function instead of just ifname. This allows us to handle also remote hosts while we can check apdev['hostname'], apdev['port']. This step (6) converts the cases where apdevs[#]['ifname'] was used as the argument to hostapd.add_ap(). Signed-off-by: Janusz Dziedzic --- tests/hwsim/test_hs20_filter.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/hwsim/test_hs20_filter.py b/tests/hwsim/test_hs20_filter.py index d17b03fb4..1ec3343d1 100644 --- a/tests/hwsim/test_hs20_filter.py +++ b/tests/hwsim/test_hs20_filter.py @@ -44,7 +44,7 @@ def _test_ip4_gtk_drop(devs, apdevs, params, dst): raise HwsimSkip("kernel doesn't have capability") ap_params = { 'ssid': 'open', 'channel': '5' } - hapd = hostapd.add_ap(apdevs[0]['ifname'], ap_params) + hapd = hostapd.add_ap(apdevs[0], ap_params) dev.connect('open', key_mgmt="NONE", scan_freq="2432") with IPAssign(dev.ifname, '10.0.0.1/24'): @@ -93,7 +93,7 @@ def _test_ip6_gtk_drop(devs, apdevs, params, dst): raise HwsimSkip("kernel doesn't have capability") ap_params = { 'ssid': 'open', 'channel': '5' } - hapd = hostapd.add_ap(apdevs[0]['ifname'], ap_params) + hapd = hostapd.add_ap(apdevs[0], ap_params) dev.connect('open', key_mgmt="NONE", scan_freq="2432") with IPAssign(dev.ifname, 'fdaa::1/48', ipv6=True): @@ -142,7 +142,7 @@ def test_ip4_drop_gratuitous_arp(devs, apdevs, params): raise HwsimSkip("kernel doesn't have capability") ap_params = { 'ssid': 'open', 'channel': '5' } - hapd = hostapd.add_ap(apdevs[0]['ifname'], ap_params) + hapd = hostapd.add_ap(apdevs[0], ap_params) dev.connect('open', key_mgmt="NONE", scan_freq="2432") with IPAssign(dev.ifname, '10.0.0.2/24'): @@ -185,7 +185,7 @@ def test_ip6_drop_unsolicited_na(devs, apdevs, params): raise HwsimSkip("kernel doesn't have capability") ap_params = { 'ssid': 'open', 'channel': '5' } - hapd = hostapd.add_ap(apdevs[0]['ifname'], ap_params) + hapd = hostapd.add_ap(apdevs[0], ap_params) dev.connect('open', key_mgmt="NONE", scan_freq="2432") with IPAssign(dev.ifname, 'fdaa::1/48', ipv6=True):