NetworkManager/libnm-glib
Thomas Haller 92f122525d libnm/tests: add tests for libnm handling invalid connections
Add test showing how libnm/libnm-glib handles invalid connections,
i.e. connections that fail nm_connection_verify(). libnm implements
settings a static types (via different NMSetting types). This makes
it unavoidable that eventually a newer server version will
expose connections that fail verification in the client.

For example, master added a new base type NMSettingTun. This setting type
was not backported to legacy libnm-glib, thus such connection will not verify.
Also, we want that newer server versions are backward compatible with older
library versions. Thus also a pre-NMSettingTun libnm version has the same
problem.

The test shows that libnm is agnostic to whether the connection verifies.
That is consistent behavior, but possibly problematic because most
accessors to connections assert against a valid connection. Thus using
the common nm_connection*() functions on an invalid connection can lead
to problems.
Also, due to the static nature of our NMSetting types, some properties
can be silently dropped and thus mangling the connection without the
library user noticing.

libnm-glib prints a g_warning() whenever parsing an invalid connection.
When an invalid connection is added initially, it is exposed to the library
user. When a connection gets later invalidated due to an update, the
connection disappears and it stays missing even if a subsequent update
makes the connection valid again.

libnm-glib's behavior indicates that we might wanted to hide invalid
connections from the user. But it's very broken there.
2015-12-26 19:09:11 +01:00
..
tests libnm/tests: add tests for libnm handling invalid connections 2015-12-26 19:09:11 +01:00
libnm-glib-test.c libnm-glib: print HW address of generic devices in test tool 2015-11-25 11:39:57 +01:00
libnm-glib-vpn.pc.in release: bump version to 0.9.0 2011-08-22 20:33:07 -05:00
libnm-glib-vpn.ver libnm-glib-vpn: add support for interactive secrets requests 2013-07-31 08:16:40 -05:00
libnm-glib.pc.in libnm-glib,libnm-util: -glib requires -util, -util requires NetworkManager 2013-03-14 10:23:19 -05:00
libnm-glib.ver libnm/libnm-glib: add NMClient.get_all_devices() method and AllDevices property 2015-12-04 12:16:41 +01:00
libnm_glib.c all: make use of new header file "nm-default.h" 2015-08-05 15:32:40 +02:00
libnm_glib.h libnm-glib: deprecate original libnm_glib bits 2010-03-10 09:18:08 -08:00
Makefile.am build: rename directory "include" to "shared" 2015-12-24 11:42:37 +01:00
nm-access-point.c all: make use of new header file "nm-default.h" 2015-08-05 15:32:40 +02:00
nm-access-point.h libnm-glib: add NM_AVAILABLE_IN_1_2 for API nm_access_point_get_last_seen() 2015-08-09 14:36:55 +02:00
nm-active-connection.c all: make use of new header file "nm-default.h" 2015-08-05 15:32:40 +02:00
nm-active-connection.h libnm-util, libnm-glib: standardize copyright/license headers 2014-07-15 09:44:54 -04:00
nm-client.c libnm/libnm-glib: add NMClient.get_all_devices() method and AllDevices property 2015-12-04 12:16:41 +01:00
nm-client.h libnm/libnm-glib: add NMClient.get_all_devices() method and AllDevices property 2015-12-04 12:16:41 +01:00
nm-dbus-helpers-private.h all: make use of new header file "nm-default.h" 2015-08-05 15:32:40 +02:00
nm-dbus-helpers.c all: make use of new header file "nm-default.h" 2015-08-05 15:32:40 +02:00
nm-device-adsl.c all: consistently include config.h 2014-11-13 17:18:42 -05:00
nm-device-adsl.h libnm-util, libnm-glib: standardize copyright/license headers 2014-07-15 09:44:54 -04:00
nm-device-bond.c all: make use of new header file "nm-default.h" 2015-08-05 15:32:40 +02:00
nm-device-bond.h libnm-util, libnm-glib: standardize copyright/license headers 2014-07-15 09:44:54 -04:00
nm-device-bridge.c all: make use of new header file "nm-default.h" 2015-08-05 15:32:40 +02:00
nm-device-bridge.h libnm-util, libnm-glib: standardize copyright/license headers 2014-07-15 09:44:54 -04:00
nm-device-bt.c all: make use of new header file "nm-default.h" 2015-08-05 15:32:40 +02:00
nm-device-bt.h libnm-util, libnm-glib: standardize copyright/license headers 2014-07-15 09:44:54 -04:00
nm-device-ethernet.c all: make use of new header file "nm-default.h" 2015-08-05 15:32:40 +02:00
nm-device-ethernet.h libnm-util, libnm-glib: standardize copyright/license headers 2014-07-15 09:44:54 -04:00
nm-device-generic.c libnm-glib: add support for TUN devices 2015-11-25 11:39:57 +01:00
nm-device-generic.h libnm-util, libnm-glib: standardize copyright/license headers 2014-07-15 09:44:54 -04:00
nm-device-infiniband.c all: make use of new header file "nm-default.h" 2015-08-05 15:32:40 +02:00
nm-device-infiniband.h libnm-util, libnm-glib: standardize copyright/license headers 2014-07-15 09:44:54 -04:00
nm-device-modem.c all: make use of new header file "nm-default.h" 2015-08-05 15:32:40 +02:00
nm-device-modem.h libnm-util, libnm-glib: standardize copyright/license headers 2014-07-15 09:44:54 -04:00
nm-device-olpc-mesh.c all: make use of new header file "nm-default.h" 2015-08-05 15:32:40 +02:00
nm-device-olpc-mesh.h libnm-util, libnm-glib: standardize copyright/license headers 2014-07-15 09:44:54 -04:00
nm-device-private.h libnm-glib: refactor _nm_device_type_for_path() 2015-11-25 11:39:57 +01:00
nm-device-team.c all: make use of new header file "nm-default.h" 2015-08-05 15:32:40 +02:00
nm-device-team.h libnm-util, libnm-glib: standardize copyright/license headers 2014-07-15 09:44:54 -04:00
nm-device-vlan.c all: make use of new header file "nm-default.h" 2015-08-05 15:32:40 +02:00
nm-device-vlan.h libnm-glib: add :parent property for VLAN devices 2014-11-24 10:33:22 +01:00
nm-device-wifi.c all: make use of new header file "nm-default.h" 2015-08-05 15:32:40 +02:00
nm-device-wifi.h libnm-util, libnm-glib: standardize copyright/license headers 2014-07-15 09:44:54 -04:00
nm-device-wimax.c all: make use of new header file "nm-default.h" 2015-08-05 15:32:40 +02:00
nm-device-wimax.h wimax: drop WiMAX support (bgo #747846) 2015-04-17 12:42:23 -04:00
nm-device.c libnm-glib: consider unknown devices as generic ones 2015-12-09 16:36:46 +01:00
nm-device.h libnm-glib/libnm: add support for "real" NMDevice property 2015-12-04 12:15:12 +01:00
nm-dhcp4-config.c all: consistently include config.h 2014-11-13 17:18:42 -05:00
nm-dhcp4-config.h libnm-util, libnm-glib: standardize copyright/license headers 2014-07-15 09:44:54 -04:00
nm-dhcp6-config.c all: consistently include config.h 2014-11-13 17:18:42 -05:00
nm-dhcp6-config.h libnm-util, libnm-glib: standardize copyright/license headers 2014-07-15 09:44:54 -04:00
nm-ip4-config.c all: consistently include config.h 2014-11-13 17:18:42 -05:00
nm-ip4-config.h libnm-util, libnm-glib: standardize copyright/license headers 2014-07-15 09:44:54 -04:00
nm-ip6-config.c all: consistently include config.h 2014-11-13 17:18:42 -05:00
nm-ip6-config.h libnm-util, libnm-glib: standardize copyright/license headers 2014-07-15 09:44:54 -04:00
nm-object-cache.c all: make use of new header file "nm-default.h" 2015-08-05 15:32:40 +02:00
nm-object-cache.h all: make use of new header file "nm-default.h" 2015-08-05 15:32:40 +02:00
nm-object-private.h all: make use of new header file "nm-default.h" 2015-08-05 15:32:40 +02:00
nm-object.c libnm-glib: queue added/removed signals and suppress uninitialized notifications 2015-12-04 12:15:12 +01:00
nm-object.h libnm-util, libnm-glib: standardize copyright/license headers 2014-07-15 09:44:54 -04:00
nm-remote-connection-private.h libnm-util, libnm-glib: whitespace fixes 2014-07-15 09:44:55 -04:00
nm-remote-connection.c libnm-glib: avoid use-after-free when replace_settings() fails 2015-12-26 19:09:04 +01:00
nm-remote-connection.h libnm-util, libnm-glib: whitespace fixes 2014-07-15 09:44:55 -04:00
nm-remote-settings.c all: make use of new header file "nm-default.h" 2015-08-05 15:32:40 +02:00
nm-remote-settings.h libnm-util, libnm-glib: standardize copyright/license headers 2014-07-15 09:44:54 -04:00
nm-secret-agent.c all: make use of new header file "nm-default.h" 2015-08-05 15:32:40 +02:00
nm-secret-agent.h docs: misc small fixes 2014-12-18 13:47:03 -05:00
nm-types-private.h libnm-util, libnm-glib: whitespace fixes 2014-07-15 09:44:55 -04:00
nm-types.c all: make use of new header file "nm-default.h" 2015-08-05 15:32:40 +02:00
nm-types.h libnm-util, libnm-glib: standardize copyright/license headers 2014-07-15 09:44:54 -04:00
nm-vpn-connection.c all: consistently include config.h 2014-11-13 17:18:42 -05:00
nm-vpn-connection.h libnm-util, libnm-glib: standardize copyright/license headers 2014-07-15 09:44:54 -04:00
nm-vpn-plugin-ui-interface.c all: consistently include config.h 2014-11-13 17:18:42 -05:00
nm-vpn-plugin-ui-interface.h libnm-glib: add libnm compat defines to nm-vpn-plugin-ui-interface.h 2015-07-25 10:51:23 +02:00
nm-vpn-plugin-utils.c all: consistently include config.h 2014-11-13 17:18:42 -05:00
nm-vpn-plugin-utils.h libnm-util, libnm-glib: standardize copyright/license headers 2014-07-15 09:44:54 -04:00
nm-vpn-plugin.c libnm-glib,vpn-plugin: remove old connect timer when adding new one 2015-10-23 18:24:07 +02:00
nm-vpn-plugin.h libnm-util, libnm-glib: standardize copyright/license headers 2014-07-15 09:44:54 -04:00
nm-wimax-nsp.c all: make use of new header file "nm-default.h" 2015-08-05 15:32:40 +02:00
nm-wimax-nsp.h docs: misc small fixes 2014-12-18 13:47:03 -05:00