[PATCH 02/24] tests: Use global control interface in test_wpas_ctrl_global()

Jouni Malinen j at w1.fi
Thu Feb 5 06:28:00 EST 2015


On Wed, Feb 04, 2015 at 04:30:14AM -0500, Ilan Peer wrote:
> Use the global control interface to set/get the status of the
> P2P Device.

>  tests/hwsim/test_wpas_ctrl.py | 10 +++++-----
> diff --git a/tests/hwsim/test_wpas_ctrl.py b/tests/hwsim/test_wpas_ctrl.py
> @@ -1073,13 +1073,13 @@ def test_wpas_ctrl_global(dev):
> -    wpas.request("P2P_SET disabled 1")
> -    if "p2p_state=DISABLED" not in wpas.global_request("STATUS"):
> +    dev[0].global_request("P2P_SET disabled 1")
> +    if "p2p_state=DISABLED" not in dev[0].global_request("STATUS"):

This looks suspicious. dev[0] is completely different radio compared to
wpas. The temporarily allocated wpas was used here on purpose to avoid
any potential issues due to P2P_SET disabled changes remaining in
effect.

-- 
Jouni Malinen                                            PGP id EFC895FA


More information about the HostAP mailing list