[PATCH 17/24] tests: Modify test_autogo_bridge() test to use group interface
Jouni Malinen
j
Thu Feb 5 03:51:39 PST 2015
On Wed, Feb 04, 2015 at 04:30:29AM -0500, Ilan Peer wrote:
> 1. Add get_group_ifname() to wpasupplicant.py
> 2. Use the function to get the interface name for the bridge.
That approach in general looks fine..
> diff --git a/tests/hwsim/test_p2p_autogo.py b/tests/hwsim/test_p2p_autogo.py
> @@ -451,17 +451,17 @@ def test_autogo_bridge(dev):
> - dev[0].remove_group()
> finally:
> dev[0].request("AUTOSCAN ")
> - subprocess.Popen(['sudo', 'brctl', 'delif', 'p2p-br0', dev[0].ifname],
> + subprocess.Popen(['sudo', 'brctl', 'delif', 'p2p-br0', dev[0].get_group_ifname()],
> stderr=open('/dev/null', 'w'))
> subprocess.Popen(['sudo', 'ip', 'link', 'set', 'dev', 'p2p-br0', 'down'],
> stderr=open('/dev/null', 'w'))
> subprocess.Popen(['sudo', 'brctl', 'delbr', 'p2p-br0'],
> stderr=open('/dev/null', 'w'))
> + dev[0].remove_group()
... but I'm not that sure about move dev[0].remove_group() in this way.
That function can fail and raise an exception. I'd rather leave it where
it was and store the dev[0].get_group_ifname() result locally so that it
can be used in finally-processing.
--
Jouni Malinen PGP id EFC895FA
More information about the Hostap
mailing list