]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: Fix dbus_set_global_properties failure if run twice
authorJouni Malinen <j@w1.fi>
Sat, 17 Feb 2018 15:41:57 +0000 (17:41 +0200)
committerJouni Malinen <j@w1.fi>
Sat, 17 Feb 2018 15:41:57 +0000 (17:41 +0200)
Clear the model_name parameter back to the default (empty string) at the
beginning and the end of dbus_set_global_properties to avoid failures if
the test case is run multiple times.

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

index 280148c332624e95d41b82e088f25f73e60462bf..4257b2462e3792cc65c30cb63e29a0dde27c0bd5 100644 (file)
@@ -325,6 +325,7 @@ def test_dbus_set_global_properties(dev, apdev):
     """D-Bus Get/Set fi.w1.wpa_supplicant1 interface global properties"""
     (bus,wpas_obj,path,if_obj) = prepare_dbus(dev[0])
 
+    dev[0].set("model_name", "")
     props = [ ('Okc', '0', '1'), ('ModelName', '', 'blahblahblah') ]
 
     for p in props:
@@ -340,6 +341,7 @@ def test_dbus_set_global_properties(dev, apdev):
                          dbus_interface=dbus.PROPERTIES_IFACE)
         if res != p[2]:
             raise Exception("Unexpected " + p[0] + " value after set: " + str(res))
+    dev[0].set("model_name", "")
 
 def test_dbus_invalid_method(dev, apdev):
     """D-Bus invalid method"""