tests: Change wpas_config_file test for dedicated P2P Device case
authorAvraham Stern <avraham.stern@intel.com>
Wed, 14 Oct 2015 15:43:12 +0000 (18:43 +0300)
committerJouni Malinen <j@w1.fi>
Fri, 16 Oct 2015 17:34:04 +0000 (20:34 +0300)
SAVE_CONFIG command on the global control interface tries to save
the config file on all interfaces. The test disabled updating the
config file only on one interface, thus for configurations that
support a dedicated P2P Device interface, saving the config file
would still have succeeded on the P2P Device interface.

Fix the test by disabling updating the configuration file on the global
control interface (which will, in practice, disable this for the P2P
Device interface) in addition to disabling it on the main interface.

Signed-off-by: Avraham Stern <avraham.stern@intel.com>
tests/hwsim/test_wpas_config.py

index 0af31da..d9be63a 100644 (file)
@@ -117,6 +117,7 @@ def test_wpas_config_file(dev):
             raise Exception("Unexpected configuration change")
 
         wpas.request("SET update_config 0")
+        wpas.global_request("SET update_config 0")
         if "OK" in wpas.request("SAVE_CONFIG"):
             raise Exception("SAVE_CONFIG succeeded unexpectedly")
         if "OK" in wpas.global_request("SAVE_CONFIG"):
@@ -126,6 +127,7 @@ def test_wpas_config_file(dev):
         os.remove(config)
         os.mkdir(config)
         wpas.request("SET update_config 1")
+        wpas.global_request("SET update_config 1")
         if "OK" in wpas.request("SAVE_CONFIG"):
             raise Exception("SAVE_CONFIG succeeded unexpectedly")
         if "OK" in wpas.global_request("SAVE_CONFIG"):