tests: Clear config_methods at the end of wpas_ctrl_set_wps_params
authorJouni Malinen <j@w1.fi>
Sat, 31 Oct 2015 17:45:59 +0000 (19:45 +0200)
committerJouni Malinen <j@w1.fi>
Sat, 31 Oct 2015 19:56:59 +0000 (21:56 +0200)
It was possible for dev[2] to be left with non-default config_methods
parameter at the end of the test case and that could result issues in
following test cases. This hit a failure in the following sequence:
wpas_ctrl_set_wps_params p2ps_channel_active_go_and_station_same

Signed-off-by: Jouni Malinen <j@w1.fi>
tests/hwsim/test_wpas_ctrl.py

index 8a91fde..1c8b445 100644 (file)
@@ -678,6 +678,12 @@ def test_wpas_ctrl_mib(dev):
 
 def test_wpas_ctrl_set_wps_params(dev):
     """wpa_supplicant ctrl_iface SET config_methods"""
+    try:
+        _test_wpas_ctrl_set_wps_params(dev)
+    finally:
+        dev[2].request("SET config_methods ")
+
+def _test_wpas_ctrl_set_wps_params(dev):
     ts = [ "config_methods label virtual_display virtual_push_button keypad",
            "device_type 1-0050F204-1",
            "os_version 01020300",