[PATCH 3/3 v3] tests: Add testcases for interface global properties
Jouni Malinen
j at w1.fi
Fri Oct 16 04:52:52 EDT 2015
On Tue, Oct 13, 2015 at 11:48:43AM -0500, Dan Williams wrote:
> diff --git a/tests/hwsim/test_dbus.py b/tests/hwsim/test_dbus.py
> @@ -295,6 +295,26 @@ def test_dbus_properties(dev, apdev):
> +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])
> +
> + props = [ ('Okc', '0', '1'), ('Bgscan', '', 'learn:1:-20:2') ]
> +
> + for p in props:
> + res = if_obj.Get(WPAS_DBUS_IFACE, p[0],
> + dbus_interface=dbus.PROPERTIES_IFACE)
> + if res != p[1]:
> + raise Exception("Unexpected " + p[0] + " value: " + str(res))
> +
> + if_obj.Set(WPAS_DBUS_IFACE_WPS, p[0], p[2],
> + dbus_interface=dbus.PROPERTIES_IFACE)
WPAS_DBUS_IFACE_WPS?? This Set() would fail every time... And even if
fixed to use WPAS_DBUS_IFACE, the test case seems to fail:
2015-10-16 08:48:26,815 INFO org.freedesktop.DBus.Error.InvalidArgs: Failed to set interface property Bgscan
1444985306.814676: dbus: org.freedesktop.DBus.Properties.Set (/fi/w1/wpa_supplicant1/Interfaces/1) [ssv]
1444985306.814854: properties_get_or_set: Set(Bgscan)
1444985306.815035: Line -1: failed to parse bgscan
1444985306.815263: Line -1: failed to parse 'bgscan=learn:1:-20:2'.
--
Jouni Malinen PGP id EFC895FA
More information about the HostAP
mailing list