]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: D-Bus SaveConfig
authorJouni Malinen <j@w1.fi>
Sun, 15 Nov 2015 17:08:05 +0000 (19:08 +0200)
committerJouni Malinen <j@w1.fi>
Sun, 15 Nov 2015 17:08:05 +0000 (19:08 +0200)
Signed-off-by: Jouni Malinen <j@w1.fi>
tests/hwsim/test_dbus.py

index 718d17134c81fcee60ab69fa5dbdc1476fea7053..9db645fdee56f2e78d7f16fcf5d7bf2b39b9a263 100644 (file)
@@ -4971,3 +4971,14 @@ def test_dbus_expectdisconnect(dev, apdev):
     wpas.ExpectDisconnect()
     dev[0].request("DISCONNECT")
     dev[0].wait_disconnected()
+
+def test_dbus_save_config(dev, apdev):
+    """D-Bus SaveConfig"""
+    (bus,wpas_obj,path,if_obj) = prepare_dbus(dev[0])
+    iface = dbus.Interface(if_obj, WPAS_DBUS_IFACE)
+    try:
+        iface.SaveConfig()
+        raise Exception("SaveConfig() accepted unexpectedly")
+    except dbus.exceptions.DBusException, e:
+        if not str(e).startswith("fi.w1.wpa_supplicant1.UnknownError: Not allowed to update configuration"):
+            raise Exception("Unexpected error message for SaveConfig(): " + str(e))