about summary refs log tree commit diff
path: root/src/settings
diff options
context:
space:
mode:
Diffstat (limited to 'src/settings')
-rw-r--r--src/settings/nm-settings-connection.c11
-rw-r--r--src/settings/nm-settings-connection.h1
-rw-r--r--src/settings/nm-settings-plugin.c24
-rw-r--r--src/settings/nm-settings-plugin.h23
-rw-r--r--src/settings/nm-settings.c266
-rw-r--r--src/settings/nm-settings.h1
-rw-r--r--src/settings/plugins/ibft/meson.build2
-rw-r--r--src/settings/plugins/ibft/nms-ibft-plugin.c35
-rw-r--r--src/settings/plugins/ibft/nms-ibft-reader.c8
-rw-r--r--src/settings/plugins/ibft/tests/meson.build7
-rw-r--r--src/settings/plugins/ibft/tests/test-ibft.c20
-rw-r--r--src/settings/plugins/ifcfg-rh/meson.build2
-rw-r--r--src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-common.h3
-rw-r--r--src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-plugin.c40
-rw-r--r--src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-reader.c14
-rw-r--r--src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-writer.c2
-rw-r--r--src/settings/plugins/ifcfg-rh/tests/meson.build7
-rw-r--r--src/settings/plugins/ifcfg-rh/tests/test-ifcfg-rh.c494
-rw-r--r--src/settings/plugins/ifupdown/meson.build2
-rw-r--r--src/settings/plugins/ifupdown/nms-ifupdown-interface-parser.c1
-rw-r--r--src/settings/plugins/ifupdown/nms-ifupdown-interface-parser.h1
-rw-r--r--src/settings/plugins/ifupdown/nms-ifupdown-parser.c7
-rw-r--r--src/settings/plugins/ifupdown/nms-ifupdown-plugin.c38
-rw-r--r--src/settings/plugins/ifupdown/tests/meson.build4
-rw-r--r--src/settings/plugins/ifupdown/tests/test-ifupdown.c44
-rw-r--r--src/settings/plugins/keyfile/nms-keyfile-plugin.c35
-rw-r--r--src/settings/plugins/keyfile/nms-keyfile-utils.h3
-rw-r--r--src/settings/plugins/keyfile/tests/meson.build7
-rw-r--r--src/settings/plugins/keyfile/tests/test-keyfile.c8
29 files changed, 445 insertions, 665 deletions
diff --git a/src/settings/nm-settings-connection.c b/src/settings/nm-settings-connection.c
index 0b998372..6526abc7 100644
--- a/src/settings/nm-settings-connection.c
+++ b/src/settings/nm-settings-connection.c
@@ -135,7 +135,7 @@ G_DEFINE_TYPE_WITH_CODE (NMSettingsConnection, nm_settings_connection, NM_TYPE_D
             const char *__uuid = (self) ? nm_settings_connection_get_uuid (self) : NULL; \
             \
             if (self) { \
-                g_snprintf (__prefix, sizeof (__prefix), "%s[%p%s%s]", _NMLOG_PREFIX_NAME, self, __uuid ? "," : "", __uuid ? __uuid : ""); \
+                g_snprintf (__prefix, sizeof (__prefix), "%s[%p%s%s]", _NMLOG_PREFIX_NAME, self, __uuid ? "," : "", __uuid ?: ""); \
                 __p_prefix = __prefix; \
             } \
             _nm_log (__level, _NMLOG_DOMAIN, 0, NULL, __uuid, \
@@ -463,7 +463,7 @@ update_agent_secrets_cache (NMSettingsConnection *self, NMConnection *new)
 
 	if (priv->agent_secrets)
 		g_object_unref (priv->agent_secrets);
-	priv->agent_secrets = nm_simple_connection_new_clone (new ? new : NM_CONNECTION (self));
+	priv->agent_secrets = nm_simple_connection_new_clone (new ?: NM_CONNECTION(self));
 
 	/* Clear out non-system-owned secrets */
 	nm_connection_clear_secrets_with_flags (priv->agent_secrets,
@@ -817,10 +817,8 @@ nm_settings_connection_delete (NMSettingsConnection *self,
 	return TRUE;
 }
 
-
 /*****************************************************************************/
 
-
 typedef enum {
 	CALL_ID_TYPE_REQ,
 	CALL_ID_TYPE_IDLE,
@@ -1810,7 +1808,6 @@ update_auth_cb (NMSettingsConnection *self,
 	update_complete (self, info, local);
 }
 
-
 static const char *
 get_update_modify_permission (NMConnection *old, NMConnection *new)
 {
@@ -1886,7 +1883,7 @@ settings_connection_update (NMSettingsConnection *self,
 	 * that's sending the update request.  You can't make a connection
 	 * invisible to yourself.
 	 */
-	if (!nm_auth_is_subject_in_acl_set_error (tmp ? tmp : NM_CONNECTION (self),
+	if (!nm_auth_is_subject_in_acl_set_error (tmp ?: NM_CONNECTION(self),
 	                                          subject,
 	                                          NM_SETTINGS_ERROR,
 	                                          NM_SETTINGS_ERROR_PERMISSION_DENIED,
@@ -1902,7 +1899,7 @@ settings_connection_update (NMSettingsConnection *self,
 	info->new_settings = tmp;
 
 	permission = get_update_modify_permission (NM_CONNECTION (self),
-	                                           tmp ? tmp : NM_CONNECTION (self));
+	                                           tmp ?: NM_CONNECTION(self));
 	auth_start (self, context, subject, permission, update_auth_cb, info);
 	return;
 
diff --git a/src/settings/nm-settings-connection.h b/src/settings/nm-settings-connection.h
index 58901699..70518687 100644
--- a/src/settings/nm-settings-connection.h
+++ b/src/settings/nm-settings-connection.h
@@ -48,7 +48,6 @@
 #define NM_SETTINGS_CONNECTION_FLAGS    "flags"
 #define NM_SETTINGS_CONNECTION_FILENAME "filename"
 
-
 /**
  * NMSettingsConnectionIntFlags:
  * @NM_SETTINGS_CONNECTION_INT_FLAGS_NONE: no flag set
diff --git a/src/settings/nm-settings-plugin.c b/src/settings/nm-settings-plugin.c
index 234e345f..f6dd2cfb 100644
--- a/src/settings/nm-settings-plugin.c
+++ b/src/settings/nm-settings-plugin.c
@@ -35,30 +35,6 @@ nm_settings_plugin_default_init (NMSettingsPluginInterface *g_iface)
 	if (initialized)
 		return;
 
-	/* Properties */
-	g_object_interface_install_property
-		(g_iface,
-		 g_param_spec_string (NM_SETTINGS_PLUGIN_NAME, "", "",
-		                      NULL,
-		                      G_PARAM_READABLE |
-		                      G_PARAM_STATIC_STRINGS));
-
-	g_object_interface_install_property
-		(g_iface,
-		 g_param_spec_string (NM_SETTINGS_PLUGIN_INFO, "", "",
-		                      NULL,
-		                      G_PARAM_READABLE |
-		                      G_PARAM_STATIC_STRINGS));
-
-	g_object_interface_install_property
-		(g_iface,
-		 g_param_spec_uint (NM_SETTINGS_PLUGIN_CAPABILITIES, "", "",
-		                    NM_SETTINGS_PLUGIN_CAP_NONE,
-		                    NM_SETTINGS_PLUGIN_CAP_MODIFY_CONNECTIONS,
-		                    NM_SETTINGS_PLUGIN_CAP_NONE,
-		                    G_PARAM_READABLE |
-		                    G_PARAM_STATIC_STRINGS));
-
 	/* Signals */
 	g_signal_new (NM_SETTINGS_PLUGIN_CONNECTION_ADDED,
 	              iface_type,
diff --git a/src/settings/nm-settings-plugin.h b/src/settings/nm-settings-plugin.h
index 97bb7b65..6fba25e7 100644
--- a/src/settings/nm-settings-plugin.h
+++ b/src/settings/nm-settings-plugin.h
@@ -34,33 +34,10 @@ GObject * nm_settings_plugin_factory (void);
 #define NM_IS_SETTINGS_PLUGIN(obj)            (G_TYPE_CHECK_INSTANCE_TYPE ((obj), NM_TYPE_SETTINGS_PLUGIN))
 #define NM_SETTINGS_PLUGIN_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), NM_TYPE_SETTINGS_PLUGIN, NMSettingsPluginInterface))
 
-
-#define NM_SETTINGS_PLUGIN_NAME "name"
-#define NM_SETTINGS_PLUGIN_INFO "info"
-#define NM_SETTINGS_PLUGIN_CAPABILITIES "capabilities"
-
 #define NM_SETTINGS_PLUGIN_UNMANAGED_SPECS_CHANGED "unmanaged-specs-changed"
 #define NM_SETTINGS_PLUGIN_UNRECOGNIZED_SPECS_CHANGED "unrecognized-specs-changed"
 #define NM_SETTINGS_PLUGIN_CONNECTION_ADDED "connection-added"
 
-typedef enum {
-	NM_SETTINGS_PLUGIN_CAP_NONE = 0x00000000,
-	NM_SETTINGS_PLUGIN_CAP_MODIFY_CONNECTIONS = 0x00000001,
-
-	/* When adding more capabilities, be sure to update the "Capabilities"
-	 * property max value in nm-settings-plugin.c.
-	 */
-} NMSettingsPluginCapabilities;
-
-typedef enum {
-	NM_SETTINGS_PLUGIN_PROP_FIRST = 0x1000,
-
-	NM_SETTINGS_PLUGIN_PROP_NAME = NM_SETTINGS_PLUGIN_PROP_FIRST,
-	NM_SETTINGS_PLUGIN_PROP_INFO,
-	NM_SETTINGS_PLUGIN_PROP_CAPABILITIES,
-} NMSettingsPluginProp;
-
-
 typedef struct _NMSettingsPlugin NMSettingsPlugin;
 
 typedef struct {
diff --git a/src/settings/nm-settings.c b/src/settings/nm-settings.c
index 2c6b7101..94018734 100644
--- a/src/settings/nm-settings.c
+++ b/src/settings/nm-settings.c
@@ -493,21 +493,28 @@ nm_settings_get_connection_by_path (NMSettings *self, const char *path)
 gboolean
 nm_settings_has_connection (NMSettings *self, NMSettingsConnection *connection)
 {
-	NMSettingsConnection *candidate = NULL;
-	const char *path;
+	gboolean has;
 
 	g_return_val_if_fail (NM_IS_SETTINGS (self), FALSE);
 	g_return_val_if_fail (NM_IS_SETTINGS_CONNECTION (connection), FALSE);
 
-	path = nm_dbus_object_get_path (NM_DBUS_OBJECT (connection));
-	if (path)
-		candidate = nm_settings_get_connection_by_path (self, path);
+	has = !c_list_is_empty (&connection->_connections_lst);
+
+	nm_assert (has == nm_c_list_contains_entry (&NM_SETTINGS_GET_PRIVATE (self)->connections_lst_head,
+                                                connection,
+                                                _connections_lst));
+	nm_assert (({
+		NMSettingsConnection *candidate = NULL;
+		const char *path;
+
+		path = nm_dbus_object_get_path (NM_DBUS_OBJECT (connection));
+		if (path)
+			candidate = nm_settings_get_connection_by_path (self, path);
+
+		(has == (connection == candidate));
+	}));
 
-	nm_assert (!candidate || candidate == connection);
-	nm_assert (!!candidate == nm_c_list_contains_entry (&NM_SETTINGS_GET_PRIVATE (self)->connections_lst_head,
-	                                                    connection,
-	                                                    _connections_lst));
-	return !!candidate;
+	return has;
 }
 
 const GSList *
@@ -519,7 +526,7 @@ nm_settings_get_unmanaged_specs (NMSettings *self)
 }
 
 static NMSettingsPlugin *
-get_plugin (NMSettings *self, NMSettingsPluginCapabilities capability)
+get_plugin (NMSettings *self, gboolean has_add_connection)
 {
 	NMSettingsPrivate *priv = NM_SETTINGS_GET_PRIVATE (self);
 	GSList *iter;
@@ -528,11 +535,13 @@ get_plugin (NMSettings *self, NMSettingsPluginCapabilities capability)
 
 	/* Do any of the plugins support the given capability? */
 	for (iter = priv->plugins; iter; iter = iter->next) {
-		NMSettingsPluginCapabilities caps = NM_SETTINGS_PLUGIN_CAP_NONE;
+		NMSettingsPlugin *plugin = NM_SETTINGS_PLUGIN (iter->data);
+
+		if (!has_add_connection)
+			return plugin;
 
-		g_object_get (G_OBJECT (iter->data), NM_SETTINGS_PLUGIN_CAPABILITIES, &caps, NULL);
-		if (NM_FLAGS_ALL (caps, capability))
-			return NM_SETTINGS_PLUGIN (iter->data);
+		if (NM_SETTINGS_PLUGIN_GET_INTERFACE (iter->data)->add_connection != NULL)
+			return plugin;
 	}
 
 	return NULL;
@@ -602,8 +611,6 @@ static gboolean
 add_plugin (NMSettings *self, NMSettingsPlugin *plugin)
 {
 	NMSettingsPrivate *priv;
-	char *pname = NULL;
-	char *pinfo = NULL;
 	const char *path;
 
 	g_return_val_if_fail (NM_IS_SETTINGS (self), FALSE);
@@ -619,44 +626,102 @@ add_plugin (NMSettings *self, NMSettingsPlugin *plugin)
 	priv->plugins = g_slist_append (priv->plugins, g_object_ref (plugin));
 	nm_settings_plugin_init (plugin);
 
-	g_object_get (G_OBJECT (plugin),
-	              NM_SETTINGS_PLUGIN_NAME, &pname,
-	              NM_SETTINGS_PLUGIN_INFO, &pinfo,
-	              NULL);
 
 	path = g_object_get_qdata (G_OBJECT (plugin), plugin_module_path_quark ());
 
-	_LOGI ("loaded plugin %s: %s%s%s%s", pname, pinfo,
-	       NM_PRINT_FMT_QUOTED (path, " (", path, ")", ""));
-	g_free (pname);
-	g_free (pinfo);
+	_LOGI ("Loaded settings plugin: %s (%s)", G_OBJECT_TYPE_NAME (plugin), path ?: "internal");
 
 	return TRUE;
 }
 
-static GObject *
-find_plugin (GSList *list, const char *pname)
+static gboolean
+plugin_loaded (GSList *list, const char *path)
 {
 	GSList *iter;
-	GObject *obj = NULL;
 
-	g_return_val_if_fail (pname != NULL, NULL);
+	g_return_val_if_fail (path != NULL, TRUE);
 
-	for (iter = list; iter && !obj; iter = g_slist_next (iter)) {
-		NMSettingsPlugin *plugin = NM_SETTINGS_PLUGIN (iter->data);
-		char *list_pname = NULL;
+	for (iter = list; iter; iter = g_slist_next (iter)) {
+		const char *list_path = g_object_get_qdata (G_OBJECT (iter->data),
+		                                            plugin_module_path_quark ());
+
+		if (g_strcmp0 (path, list_path) == 0)
+			return TRUE;
+	}
+
+	return FALSE;
+}
+
+static gboolean
+load_plugin (NMSettings *self, GSList *list, const char *pname, GError **error)
+{
+	gs_free char *full_name = NULL;
+	gs_free char *path = NULL;
+	gs_unref_object GObject *obj = NULL;
+	GModule *plugin;
+	GObject * (*factory_func) (void);
+	struct stat st;
+	int errsv;
+
+	full_name = g_strdup_printf ("nm-settings-plugin-%s", pname);
+	path = g_module_build_path (NMPLUGINDIR, full_name);
+
+	if (plugin_loaded (list, path))
+		return TRUE;
+
+	if (stat (path, &st) != 0) {
+		errsv = errno;
+		_LOGW ("could not load plugin '%s' from file '%s': %s", pname, path, strerror (errsv));
+		return TRUE;
+	}
+	if (!S_ISREG (st.st_mode)) {
+		_LOGW ("could not load plugin '%s' from file '%s': not a file", pname, path);
+		return TRUE;
+	}
+	if (st.st_uid != 0) {
+		_LOGW ("could not load plugin '%s' from file '%s': file must be owned by root", pname, path);
+		return TRUE;
+	}
+	if (st.st_mode & (S_IWGRP | S_IWOTH | S_ISUID)) {
+		_LOGW ("could not load plugin '%s' from file '%s': invalid file permissions", pname, path);
+		return TRUE;
+	}
+
+	plugin = g_module_open (path, G_MODULE_BIND_LOCAL);
+	if (!plugin) {
+		_LOGW ("could not load plugin '%s' from file '%s': %s",
+		     pname, path, g_module_error ());
+		return TRUE;
+	}
+
+	/* errors after this point are fatal, because we loaded the shared library already. */
+
+	if (!g_module_symbol (plugin, "nm_settings_plugin_factory", (gpointer) (&factory_func))) {
+		g_set_error (error, NM_SETTINGS_ERROR, NM_SETTINGS_ERROR_FAILED,
+		             "Could not find plugin '%s' factory function.",
+		             pname);
+		g_module_close (plugin);
+		return FALSE;
+	}
 
-		g_object_get (G_OBJECT (plugin),
-		              NM_SETTINGS_PLUGIN_NAME,
-		              &list_pname,
-		              NULL);
-		if (list_pname && !strcmp (pname, list_pname))
-			obj = G_OBJECT (plugin);
+	/* after accessing the plugin we cannot unload it anymore, because the glib
+	 * types cannot be properly unregistered. */
+	g_module_make_resident (plugin);
 
-		g_free (list_pname);
+	obj = (*factory_func) ();
+	if (!obj || !NM_IS_SETTINGS_PLUGIN (obj)) {
+		g_set_error (error, NM_SETTINGS_ERROR, NM_SETTINGS_ERROR_FAILED,
+		             "Plugin '%s' returned invalid system config object.",
+		             pname);
+		return FALSE;
 	}
 
-	return obj;
+	g_object_set_qdata_full (obj, plugin_module_path_quark (), path, g_free);
+	path = NULL;
+	if (add_plugin (self, NM_SETTINGS_PLUGIN (obj)))
+		list = g_slist_append (list, g_steal_pointer (&obj));
+
+	return TRUE;
 }
 
 static void
@@ -689,7 +754,6 @@ load_plugins (NMSettings *self, const char **plugins, GError **error)
 
 	for (iter = plugins; iter && *iter; iter++) {
 		const char *pname = *iter;
-		GObject *obj;
 
 		if (!*pname || strchr (pname, '/')) {
 			_LOGW ("ignore invalid plugin \"%s\"", pname);
@@ -723,84 +787,19 @@ load_plugins (NMSettings *self, const char **plugins, GError **error)
 			continue;
 		}
 
-		if (find_plugin (list, pname))
-			continue;
-
-load_plugin:
-		{
-			GModule *plugin;
-			gs_free char *full_name = NULL;
-			gs_free char *path = NULL;
-			GObject * (*factory_func) (void);
-			struct stat st;
-			int errsv;
-
-			full_name = g_strdup_printf ("nm-settings-plugin-%s", pname);
-			path = g_module_build_path (NMPLUGINDIR, full_name);
-
-			if (stat (path, &st) != 0) {
-				errsv = errno;
-				_LOGW ("could not load plugin '%s' from file '%s': %s", pname, path, strerror (errsv));
-				goto next;
-			}
-			if (!S_ISREG (st.st_mode)) {
-				_LOGW ("could not load plugin '%s' from file '%s': not a file", pname, path);
-				goto next;
-			}
-			if (st.st_uid != 0) {
-				_LOGW ("could not load plugin '%s' from file '%s': file must be owned by root", pname, path);
-				goto next;
-			}
-			if (st.st_mode & (S_IWGRP | S_IWOTH | S_ISUID)) {
-				_LOGW ("could not load plugin '%s' from file '%s': invalid file permissions", pname, path);
-				goto next;
-			}
-
-			plugin = g_module_open (path, G_MODULE_BIND_LOCAL);
-			if (!plugin) {
-				_LOGW ("could not load plugin '%s' from file '%s': %s",
-				     pname, path, g_module_error ());
-				goto next;
-			}
-
-			/* errors after this point are fatal, because we loaded the shared library already. */
-
-			if (!g_module_symbol (plugin, "nm_settings_plugin_factory", (gpointer) (&factory_func))) {
-				g_set_error (error, NM_SETTINGS_ERROR, NM_SETTINGS_ERROR_FAILED,
-				             "Could not find plugin '%s' factory function.",
-				             pname);
-				success = FALSE;
-				g_module_close (plugin);
-				break;
-			}
+		success = load_plugin (self, list, pname, error);
+		if (!success)
+			break;
 
-			/* after accessing the plugin we cannot unload it anymore, because the glib
-			 * types cannot be properly unregistered. */
-			g_module_make_resident (plugin);
-
-			obj = (*factory_func) ();
-			if (!obj || !NM_IS_SETTINGS_PLUGIN (obj)) {
-				g_set_error (error, NM_SETTINGS_ERROR, NM_SETTINGS_ERROR_FAILED,
-				             "Plugin '%s' returned invalid system config object.",
-				             pname);
-				success = FALSE;
-				break;
-			}
-
-			g_object_set_qdata_full (obj, plugin_module_path_quark (), path, g_free);
-			path = NULL;
-			if (add_plugin (self, NM_SETTINGS_PLUGIN (obj)))
-				list = g_slist_append (list, obj);
-			else
-				g_object_unref (obj);
-		}
-next:
 		if (add_ibft && !strcmp (pname, "ifcfg-rh")) {
 			/* The plugin ibft is not explicitly mentioned but we just enabled "ifcfg-rh".
 			 * Enable "ibft" by default after "ifcfg-rh". */
 			pname = "ibft";
 			add_ibft = FALSE;
-			goto load_plugin;
+
+			success = load_plugin (self, list, "ibft", error);
+			if (!success)
+				break;
 		}
 	}
 
@@ -1239,19 +1238,20 @@ void
 nm_settings_add_connection_dbus (NMSettings *self,
                                  NMConnection *connection,
                                  gboolean save_to_disk,
+                                 NMAuthSubject *subject,
                                  GDBusMethodInvocation *context,
                                  NMSettingsAddCallback callback,
                                  gpointer user_data)
 {
 	NMSettingsPrivate *priv = NM_SETTINGS_GET_PRIVATE (self);
 	NMSettingConnection *s_con;
-	NMAuthSubject *subject = NULL;
 	NMAuthChain *chain;
 	GError *error = NULL, *tmp_error = NULL;
 	const char *perm;
 
-	g_return_if_fail (connection != NULL);
-	g_return_if_fail (context != NULL);
+	g_return_if_fail (NM_IS_CONNECTION (connection));
+	g_return_if_fail (NM_IS_AUTH_SUBJECT (subject));
+	g_return_if_fail (G_IS_DBUS_METHOD_INVOCATION (context));
 
 	/* Connection must be valid, of course */
 	if (!nm_connection_verify (connection, &tmp_error)) {
@@ -1275,21 +1275,13 @@ nm_settings_add_connection_dbus (NMSettings *self,
 	}
 
 	/* Do any of the plugins support adding? */
-	if (!get_plugin (self, NM_SETTINGS_PLUGIN_CAP_MODIFY_CONNECTIONS)) {
+	if (!get_plugin (self, TRUE)) {
 		error = g_error_new_literal (NM_SETTINGS_ERROR,
 		                             NM_SETTINGS_ERROR_NOT_SUPPORTED,
 		                             "None of the registered plugins support add.");
 		goto done;
 	}
 
-	subject = nm_auth_subject_new_unix_process_from_context (context);
-	if (!subject) {
-		error = g_error_new_literal (NM_SETTINGS_ERROR,
-		                             NM_SETTINGS_ERROR_PERMISSION_DENIED,
-		                             "Unable to determine UID of request.");
-		goto done;
-	}
-
 	if (!nm_auth_is_subject_in_acl_set_error (connection,
 	                                          subject,
 	                                          NM_SETTINGS_ERROR,
@@ -1318,20 +1310,19 @@ nm_settings_add_connection_dbus (NMSettings *self,
 	}
 
 	priv->auths = g_slist_append (priv->auths, chain);
-	nm_auth_chain_add_call (chain, perm, TRUE);
 	nm_auth_chain_set_data (chain, "perm", (gpointer) perm, NULL);
 	nm_auth_chain_set_data (chain, "connection", g_object_ref (connection), g_object_unref);
 	nm_auth_chain_set_data (chain, "callback", callback, NULL);
 	nm_auth_chain_set_data (chain, "callback-data", user_data, NULL);
 	nm_auth_chain_set_data (chain, "subject", g_object_ref (subject), g_object_unref);
 	nm_auth_chain_set_data (chain, "save-to-disk", GUINT_TO_POINTER (save_to_disk), NULL);
+	nm_auth_chain_add_call (chain, perm, TRUE);
+	return;
 
 done:
-	if (error)
-		callback (self, NULL, error, context, subject, user_data);
-
-	g_clear_error (&error);
-	g_clear_object (&subject);
+	nm_assert (error);
+	callback (self, NULL, error, context, subject, user_data);
+	g_error_free (error);
 }
 
 static void
@@ -1362,6 +1353,7 @@ settings_add_connection_helper (NMSettings *self,
 {
 	gs_unref_object NMConnection *connection = NULL;
 	GError *error = NULL;
+	gs_unref_object NMAuthSubject *subject = NULL;
 
 	connection = _nm_simple_connection_new_from_dbus (settings,
 	                                                    NM_SETTING_PARSE_FLAGS_STRICT
@@ -1374,9 +1366,19 @@ settings_add_connection_helper (NMSettings *self,
 		return;
 	}
 
+	subject = nm_auth_subject_new_unix_process_from_context (context);
+	if (!subject) {
+		g_dbus_method_invocation_return_error_literal (context,
+		                                               NM_SETTINGS_ERROR,
+		                                               NM_SETTINGS_ERROR_PERMISSION_DENIED,
+		                                               "Unable to determine UID of request.");
+		return;
+	}
+
 	nm_settings_add_connection_dbus (self,
 	                                 connection,
 	                                 save_to_disk,
+	                                 subject,
 	                                 context,
 	                                 settings_add_connection_add_cb,
 	                                 NULL);
@@ -1857,7 +1859,7 @@ get_property (GObject *object, guint prop_id,
 		                      : NULL);
 		break;
 	case PROP_CAN_MODIFY:
-		g_value_set_boolean (value, !!get_plugin (self, NM_SETTINGS_PLUGIN_CAP_MODIFY_CONNECTIONS));
+		g_value_set_boolean (value, !!get_plugin (self, TRUE));
 		break;
 	case PROP_CONNECTIONS:
 		if (priv->connections_loaded) {
diff --git a/src/settings/nm-settings.h b/src/settings/nm-settings.h
index 7d56f7b4..021512fd 100644
--- a/src/settings/nm-settings.h
+++ b/src/settings/nm-settings.h
@@ -80,6 +80,7 @@ typedef void (*NMSettingsAddCallback) (NMSettings *settings,
 void nm_settings_add_connection_dbus (NMSettings *self,
                                       NMConnection *connection,
                                       gboolean save_to_disk,
+                                      NMAuthSubject *subject,
                                       GDBusMethodInvocation *context,
                                       NMSettingsAddCallback callback,
                                       gpointer user_data);
diff --git a/src/settings/plugins/ibft/meson.build b/src/settings/plugins/ibft/meson.build
index da9f5566..1b6ff28a 100644
--- a/src/settings/plugins/ibft/meson.build
+++ b/src/settings/plugins/ibft/meson.build
@@ -26,7 +26,7 @@ libnm_settings_plugin_ibft = shared_module(
   link_args: ldflags_linker_script_settings,
   link_depends: linker_script_settings,
   install: true,
-  install_dir: nm_pkglibdir
+  install_dir: nm_plugindir
 )
 
 core_plugins += libnm_settings_plugin_ibft
diff --git a/src/settings/plugins/ibft/nms-ibft-plugin.c b/src/settings/plugins/ibft/nms-ibft-plugin.c
index ea4d1524..77ce208f 100644
--- a/src/settings/plugins/ibft/nms-ibft-plugin.c
+++ b/src/settings/plugins/ibft/nms-ibft-plugin.c
@@ -121,28 +121,6 @@ get_connections (NMSettingsPlugin *config)
 /*****************************************************************************/
 
 static void
-get_property (GObject *object, guint prop_id,
-              GValue *value, GParamSpec *pspec)
-{
-	switch (prop_id) {
-	case NM_SETTINGS_PLUGIN_PROP_NAME:
-		g_value_set_string (value, "iBFT");
-		break;
-	case NM_SETTINGS_PLUGIN_PROP_INFO:
-		g_value_set_string (value, "(c) 2014 Red Hat, Inc.  To report bugs please use the NetworkManager mailing list.");
-		break;
-	case NM_SETTINGS_PLUGIN_PROP_CAPABILITIES:
-		g_value_set_uint (value, NM_SETTINGS_PLUGIN_CAP_NONE);
-		break;
-	default:
-		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
-		break;
-	}
-}
-
-/*****************************************************************************/
-
-static void
 init (NMSettingsPlugin *config)
 {
 }
@@ -175,19 +153,6 @@ nms_ibft_plugin_class_init (NMSIbftPluginClass *req_class)
 	GObjectClass *object_class = G_OBJECT_CLASS (req_class);
 
 	object_class->dispose = dispose;
-	object_class->get_property = get_property;
-
-	g_object_class_override_property (object_class,
-	                                  NM_SETTINGS_PLUGIN_PROP_NAME,
-	                                  NM_SETTINGS_PLUGIN_NAME);
-
-	g_object_class_override_property (object_class,
-	                                  NM_SETTINGS_PLUGIN_PROP_INFO,
-	                                  NM_SETTINGS_PLUGIN_INFO);
-
-	g_object_class_override_property (object_class,
-	                                  NM_SETTINGS_PLUGIN_PROP_CAPABILITIES,
-	                                  NM_SETTINGS_PLUGIN_CAPABILITIES);
 }
 
 static void
diff --git a/src/settings/plugins/ibft/nms-ibft-reader.c b/src/settings/plugins/ibft/nms-ibft-reader.c
index d26c8334..cf849e28 100644
--- a/src/settings/plugins/ibft/nms-ibft-reader.c
+++ b/src/settings/plugins/ibft/nms-ibft-reader.c
@@ -128,7 +128,7 @@ nms_ibft_reader_load_blocks (const char *iscsiadm_path,
 		}
 		g_set_error (error, NM_SETTINGS_ERROR, NM_SETTINGS_ERROR_FAILED,
 		             "iBFT: %s exited with error %d.  Message: '%s'",
-		             iscsiadm_path, WEXITSTATUS (status), err ? err : "(none)");
+		             iscsiadm_path, WEXITSTATUS (status), err ?: "(none)");
 		goto done;
 	}
 
@@ -392,15 +392,15 @@ connection_setting_add (const GPtrArray *block,
 
 	id = g_strdup_printf ("iBFT%s%s %s",
 	                      prefix ? " " : "",
-	                      prefix ? prefix : "",
+	                      prefix ?: "",
 	                      iface);
 
 	uuid = _nm_utils_uuid_generate_from_strings ("ibft",
 	                                             s_hwaddr,
 	                                             s_vlanid ? "V" : "v",
-	                                             s_vlanid ? s_vlanid : "",
+	                                             s_vlanid ?: "",
 	                                             s_ip4addr ? "A" : "DHCP",
-	                                             s_ip4addr ? s_ip4addr : "",
+	                                             s_ip4addr ?: "",
 	                                             NULL);
 
 	s_con = nm_setting_connection_new ();
diff --git a/src/settings/plugins/ibft/tests/meson.build b/src/settings/plugins/ibft/tests/meson.build
index 7a9445dd..59f49c31 100644
--- a/src/settings/plugins/ibft/tests/meson.build
+++ b/src/settings/plugins/ibft/tests/meson.build
@@ -2,16 +2,11 @@ test_unit = 'test-ibft'
 
 test_ibft_dir = meson.current_source_dir()
 
-cflags = [
-  '-DTEST_IBFT_DIR="@0@"'.format(test_ibft_dir),
-  '-DTEST_SCRATCH_DIR="@0@"'.format(test_ibft_dir)
-]
-
 exe = executable(
   test_unit,
   test_unit + '.c',
   dependencies: test_nm_dep,
-  c_args: cflags,
+  c_args: nm_build_cflags,
   link_with: libnms_ibft_core
 )
 
diff --git a/src/settings/plugins/ibft/tests/test-ibft.c b/src/settings/plugins/ibft/tests/test-ibft.c
index fd2ec61b..5e46be2e 100644
--- a/src/settings/plugins/ibft/tests/test-ibft.c
+++ b/src/settings/plugins/ibft/tests/test-ibft.c
@@ -36,6 +36,8 @@
 
 #include "nm-test-utils-core.h"
 
+#define TEST_DIR       NM_BUILD_SRCDIR"/src/settings/plugins/ibft/tests"
+
 static GPtrArray *
 read_block (const char *iscsiadm_path, const char *expected_mac)
 {
@@ -78,7 +80,7 @@ test_read_ibft_dhcp (void)
 	const char *expected_mac_address = "00:33:21:98:b9:f1";
 	GPtrArray *block;
 
-	block = read_block (TEST_IBFT_DIR "/iscsiadm-test-dhcp", expected_mac_address);
+	block = read_block (TEST_DIR "/iscsiadm-test-dhcp", expected_mac_address);
 
 	connection = nms_ibft_reader_get_connection_from_block (block, &error);
 	g_assert_no_error (error);
@@ -125,7 +127,7 @@ test_read_ibft_static (void)
 	NMIPAddress *ip4_addr;
 	GPtrArray *block;
 
-	block = read_block (TEST_IBFT_DIR "/iscsiadm-test-static", expected_mac_address);
+	block = read_block (TEST_DIR "/iscsiadm-test-static", expected_mac_address);
 
 	connection = nms_ibft_reader_get_connection_from_block (block, &error);
 	g_assert_no_error (error);
@@ -227,7 +229,7 @@ test_read_ibft_vlan (void)
 	GError *error = NULL;
 	GPtrArray *block;
 
-	block = read_block (TEST_IBFT_DIR "/iscsiadm-test-vlan", expected_mac_address);
+	block = read_block (TEST_DIR "/iscsiadm-test-vlan", expected_mac_address);
 
 	connection = nms_ibft_reader_get_connection_from_block (block, &error);
 	g_assert_no_error (error);
@@ -280,12 +282,12 @@ int main (int argc, char **argv)
 	g_test_add_func (TPATH "ibft/dhcp", test_read_ibft_dhcp);
 	g_test_add_func (TPATH "ibft/static", test_read_ibft_static);
 	g_test_add_func (TPATH "ibft/vlan", test_read_ibft_vlan);
-	g_test_add_data_func (TPATH "ibft/bad-record-read", TEST_IBFT_DIR "/iscsiadm-test-bad-record", test_read_ibft_malformed);
-	g_test_add_data_func (TPATH "ibft/bad-entry-read", TEST_IBFT_DIR "/iscsiadm-test-bad-entry", test_read_ibft_malformed);
-	g_test_add_data_func (TPATH "ibft/bad-ipaddr-read", TEST_IBFT_DIR "/iscsiadm-test-bad-ipaddr", test_read_ibft_bad_address);
-	g_test_add_data_func (TPATH "ibft/bad-gateway-read", TEST_IBFT_DIR "/iscsiadm-test-bad-gateway", test_read_ibft_bad_address);
-	g_test_add_data_func (TPATH "ibft/bad-dns1-read", TEST_IBFT_DIR "/iscsiadm-test-bad-dns1", test_read_ibft_bad_address);
-	g_test_add_data_func (TPATH "ibft/bad-dns2-read", TEST_IBFT_DIR "/iscsiadm-test-bad-dns2", test_read_ibft_bad_address);
+	g_test_add_data_func (TPATH "ibft/bad-record-read", TEST_DIR "/iscsiadm-test-bad-record", test_read_ibft_malformed);
+	g_test_add_data_func (TPATH "ibft/bad-entry-read", TEST_DIR "/iscsiadm-test-bad-entry", test_read_ibft_malformed);
+	g_test_add_data_func (TPATH "ibft/bad-ipaddr-read", TEST_DIR "/iscsiadm-test-bad-ipaddr", test_read_ibft_bad_address);
+	g_test_add_data_func (TPATH "ibft/bad-gateway-read", TEST_DIR "/iscsiadm-test-bad-gateway", test_read_ibft_bad_address);
+	g_test_add_data_func (TPATH "ibft/bad-dns1-read", TEST_DIR "/iscsiadm-test-bad-dns1", test_read_ibft_bad_address);
+	g_test_add_data_func (TPATH "ibft/bad-dns2-read", TEST_DIR "/iscsiadm-test-bad-dns2", test_read_ibft_bad_address);
 
 	return g_test_run ();
 }
diff --git a/src/settings/plugins/ifcfg-rh/meson.build b/src/settings/plugins/ifcfg-rh/meson.build
index fdf308be..964ce22d 100644
--- a/src/settings/plugins/ifcfg-rh/meson.build
+++ b/src/settings/plugins/ifcfg-rh/meson.build
@@ -55,7 +55,7 @@ libnm_settings_plugin_ifcfg_rh = shared_module(
   link_args: ldflags_linker_script_settings,
   link_depends: linker_script_settings,
   install: true,
-  install_dir: nm_pkglibdir
+  install_dir: nm_plugindir
 )
 
 core_plugins += libnm_settings_plugin_ifcfg_rh
diff --git a/src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-common.h b/src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-common.h
index d850ac4e..eaff2db4 100644
--- a/src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-common.h
+++ b/src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-common.h
@@ -38,9 +38,6 @@
 
 #define IFCFG_DIR SYSCONFDIR "/sysconfig/network-scripts"
 
-#define IFCFG_PLUGIN_NAME "ifcfg-rh"
-#define IFCFG_PLUGIN_INFO "(c) 2007 - 2015 Red Hat, Inc.  To report bugs please use the NetworkManager mailing list."
-
 #define TYPE_ETHERNET   "Ethernet"
 #define TYPE_WIRELESS   "Wireless"
 #define TYPE_INFINIBAND "InfiniBand"
diff --git a/src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-plugin.c b/src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-plugin.c
index c7207297..0fb77b9d 100644
--- a/src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-plugin.c
+++ b/src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-plugin.c
@@ -125,7 +125,6 @@ connection_ifcfg_changed (NMIfcfgConnection *connection, gpointer user_data)
 	path = nm_settings_connection_get_filename (NM_SETTINGS_CONNECTION (connection));
 	g_return_if_fail (path != NULL);
 
-
 	if (!priv->ifcfg_monitor) {
 		_LOGD ("connection_ifcfg_changed("NM_IFCFG_CONNECTION_LOG_FMTD"): %s", NM_IFCFG_CONNECTION_LOG_ARGD (connection), "ignore event");
 		return;
@@ -419,7 +418,7 @@ ifcfg_dir_changed (GFileMonitor *monitor,
 	path = g_file_get_path (file);
 
 	ifcfg_path = utils_detect_ifcfg_path (path, FALSE);
-	_LOGD ("ifcfg_dir_changed(%s) = %d // %s", path, event_type, ifcfg_path ? ifcfg_path : "(none)");
+	_LOGD ("ifcfg_dir_changed(%s) = %d // %s", path, event_type, ifcfg_path ?: "(none)");
 	if (ifcfg_path) {
 		connection = find_by_path (plugin, ifcfg_path);
 		switch (event_type) {
@@ -892,7 +891,7 @@ _dbus_request_name_done (GObject *source_object,
 		}
 	}
 
-	_LOGD ("dbus: aquired D-Bus service %s and exported %s object",
+	_LOGD ("dbus: acquired D-Bus service %s and exported %s object",
 	       IFCFGRH1_BUS_NAME,
 	       IFCFGRH1_OBJECT_PATH);
 }
@@ -999,28 +998,6 @@ config_changed_cb (NMConfig *config,
 /*****************************************************************************/
 
 static void
-get_property (GObject *object, guint prop_id,
-              GValue *value, GParamSpec *pspec)
-{
-	switch (prop_id) {
-	case NM_SETTINGS_PLUGIN_PROP_NAME:
-		g_value_set_string (value, IFCFG_PLUGIN_NAME);
-		break;
-	case NM_SETTINGS_PLUGIN_PROP_INFO:
-		g_value_set_string (value, IFCFG_PLUGIN_INFO);
-		break;
-	case NM_SETTINGS_PLUGIN_PROP_CAPABILITIES:
-		g_value_set_uint (value, NM_SETTINGS_PLUGIN_CAP_MODIFY_CONNECTIONS);
-		break;
-	default:
-		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
-		break;
-	}
-}
-
-/*****************************************************************************/
-
-static void
 init (NMSettingsPlugin *config)
 {
 }
@@ -1088,19 +1065,6 @@ settings_plugin_ifcfg_class_init (SettingsPluginIfcfgClass *req_class)
 
 	object_class->constructed = constructed;
 	object_class->dispose = dispose;
-	object_class->get_property = get_property;
-
-	g_object_class_override_property (object_class,
-	                                  NM_SETTINGS_PLUGIN_PROP_NAME,
-	                                  NM_SETTINGS_PLUGIN_NAME);
-
-	g_object_class_override_property (object_class,
-	                                  NM_SETTINGS_PLUGIN_PROP_INFO,
-	                                  NM_SETTINGS_PLUGIN_INFO);
-
-	g_object_class_override_property (object_class,
-	                                  NM_SETTINGS_PLUGIN_PROP_CAPABILITIES,
-	                                  NM_SETTINGS_PLUGIN_CAPABILITIES);
 }
 
 static void
diff --git a/src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-reader.c b/src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-reader.c
index 6ef3f660..722d4e36 100644
--- a/src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-reader.c
+++ b/src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-reader.c
@@ -256,7 +256,6 @@ make_connection_setting (const char *file,
 		}
 	}
 
-
 	nm_clear_g_free (&value);
 	v = svGetValueStr (ifcfg, "ZONE", &value);
 	g_object_set (s_con, NM_SETTING_CONNECTION_ZONE, v, NULL);
@@ -387,7 +386,7 @@ is_any_ip4_address_defined (shvarFile *ifcfg, int *idx)
 {
 	int i, ignore, *ret_idx;
 
-	ret_idx = idx ? idx : &ignore;
+	ret_idx = idx ?: &ignore;
 
 	for (i = -1; i <= 2; i++) {
 		gs_free char *value = NULL;
@@ -503,7 +502,7 @@ parse_route_line_is_comment (const char *line)
 	 *
 	 * initscripts compares: "$line" =~ '^[[:space:]]*(\#.*)?$'
 	 */
-	while (NM_IN_SET (line[0], ' ', '\t'))
+	while (nm_utils_is_separator (line[0]))
 		line++;
 	if (NM_IN_SET (line[0], '\0', '#'))
 		return TRUE;
@@ -1848,8 +1847,8 @@ make_ip6_setting (shvarFile *ifcfg,
 	ipv6addr_secondaries = svGetValueStr_cp (ifcfg, "IPV6ADDR_SECONDARIES");
 
 	value = g_strjoin (ipv6addr && ipv6addr_secondaries ? " " : NULL,
-	                   ipv6addr ? ipv6addr : "",
-	                   ipv6addr_secondaries ? ipv6addr_secondaries : "",
+	                   ipv6addr ?: "",
+	                   ipv6addr_secondaries ?: "",
 	                   NULL);
 	g_free (ipv6addr);
 	g_free (ipv6addr_secondaries);
@@ -4420,7 +4419,6 @@ parse_infiniband_p_key (shvarFile *ifcfg,
 	return ret;
 }
 
-
 static NMSetting *
 make_infiniband_setting (shvarFile *ifcfg,
                          const char *file,
@@ -4526,9 +4524,9 @@ handle_bond_option (NMSettingBond *s_bond,
 		}
 	}
 
-	if (!nm_setting_bond_add_option (s_bond, key, sanitized ? sanitized : value))
+	if (!nm_setting_bond_add_option (s_bond, key, sanitized ?: value))
 		PARSE_WARNING ("invalid bonding option '%s' = %s",
-		               key, sanitized ? sanitized : value);
+		               key, sanitized ?: value);
 	g_free (sanitized);
 }
 
diff --git a/src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-writer.c b/src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-writer.c
index 8584772e..bdad7389 100644
--- a/src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-writer.c
+++ b/src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-writer.c
@@ -777,7 +777,6 @@ write_wireless_security_setting (NMConnection *connection,
 	            "WPA_PSK_FLAGS",
 	            wpa ? nm_setting_wireless_security_get_psk_flags (s_wsec) : NM_SETTING_SECRET_FLAG_NONE);
 
-
 	if (nm_setting_wireless_security_get_pmf (s_wsec) == NM_SETTING_WIRELESS_SECURITY_PMF_DEFAULT)
 		svUnsetValue (ifcfg, "PMF");
 	else {
@@ -2164,7 +2163,6 @@ write_tc_setting (NMConnection *connection, shvarFile *ifcfg, GError **error)
 		n++;
 	}
 
-
 	num = nm_setting_tc_config_get_num_tfilters (s_tc);
 	for (n = 1, i = 0; i < num; i++) {
 		NMTCTfilter *tfilter;
diff --git a/src/settings/plugins/ifcfg-rh/tests/meson.build b/src/settings/plugins/ifcfg-rh/tests/meson.build
index 3596b642..3d72d892 100644
--- a/src/settings/plugins/ifcfg-rh/tests/meson.build
+++ b/src/settings/plugins/ifcfg-rh/tests/meson.build
@@ -2,16 +2,11 @@ test_unit = 'test-ifcfg-rh'
 
 test_ifcfg_dir = meson.current_source_dir()
 
-cflags = [
-  '-DTEST_IFCFG_DIR="@0@"'.format(test_ifcfg_dir),
-  '-DTEST_SCRATCH_DIR="@0@"'.format(test_ifcfg_dir)
-]
-
 exe = executable(
   test_unit,
   test_unit + '.c',
   dependencies: test_nm_dep,
-  c_args: cflags,
+  c_args: nm_build_cflags,
   link_with: libnms_ifcfg_rh_core
 )
 
diff --git a/src/settings/plugins/ifcfg-rh/tests/test-ifcfg-rh.c b/src/settings/plugins/ifcfg-rh/tests/test-ifcfg-rh.c
index 57bd96e9..1331391d 100644
--- a/src/settings/plugins/ifcfg-rh/tests/test-ifcfg-rh.c
+++ b/src/settings/plugins/ifcfg-rh/tests/test-ifcfg-rh.c
@@ -59,7 +59,11 @@
 
 #include "nm-test-utils-core.h"
 
-#define TEST_SCRATCH_DIR_TMP TEST_SCRATCH_DIR"/network-scripts/tmp"
+#define TEST_IFCFG_DIR          NM_BUILD_SRCDIR"/src/settings/plugins/ifcfg-rh/tests/network-scripts"
+#define TEST_SCRATCH_DIR        NM_BUILD_BUILDDIR"/src/settings/plugins/ifcfg-rh/tests/network-scripts"
+#define TEST_SCRATCH_DIR_TMP    TEST_SCRATCH_DIR"/tmp"
+
+#define TEST_SCRATCH_ALIAS_BASE TEST_SCRATCH_DIR"/ifcfg-alias0"
 
 /*****************************************************************************/
 
@@ -411,7 +415,7 @@ test_read_netmask_1 (void)
 	NMSettingConnection *s_con;
 	NMSettingIPConfig *s_ip4;
 	NMIPAddress *ip4_addr;
-	const char *FILENAME = TEST_IFCFG_DIR "/network-scripts/ifcfg-netmask-1";
+	const char *FILENAME = TEST_IFCFG_DIR"/ifcfg-netmask-1";
 
 	connection = _connection_from_file (FILENAME, NULL, TYPE_ETHERNET, NULL);
 
@@ -431,14 +435,14 @@ test_read_netmask_1 (void)
 
 	content = nmtst_file_get_contents (FILENAME);
 
-	testfile = g_strdup (TEST_SCRATCH_DIR "/network-scripts/ifcfg-netmask-1.copy");
+	testfile = g_strdup (TEST_SCRATCH_DIR"/ifcfg-netmask-1.copy");
 
 	nmtst_file_set_contents (testfile, content);
 
 	_writer_update_connection (connection,
-	                           TEST_SCRATCH_DIR "/network-scripts/",
+	                           TEST_SCRATCH_DIR,
 	                           testfile,
-	                           TEST_IFCFG_DIR "/network-scripts/ifcfg-netmask-1.cexpected");
+	                           TEST_IFCFG_DIR"/ifcfg-netmask-1.cexpected");
 }
 
 /*****************************************************************************/
@@ -542,7 +546,6 @@ verify_cert_or_key (NMSetting8021x *s_compare,
 	return TRUE;
 }
 
-
 static void
 test_read_basic (void)
 {
@@ -554,7 +557,7 @@ test_read_basic (void)
 	const char *mac;
 	char expected_mac_address[ETH_ALEN] = { 0x00, 0x16, 0x41, 0x11, 0x22, 0x33 };
 
-	connection = _connection_from_file (TEST_IFCFG_DIR "/network-scripts/ifcfg-test-minimal",
+	connection = _connection_from_file (TEST_IFCFG_DIR"/ifcfg-test-minimal",
 	                                    NULL, TYPE_ETHERNET, NULL);
 
 	/* ===== CONNECTION SETTING ===== */
@@ -607,7 +610,7 @@ test_read_miscellaneous_variables (void)
 	guint64 expected_timestamp = 0;
 
 	NMTST_EXPECT_NM_WARN ("*invalid MAC in HWADDR_BLACKLIST 'XX:aa:invalid'*");
-	connection = _connection_from_file (TEST_IFCFG_DIR"/network-scripts/ifcfg-test-misc-variables",
+	connection = _connection_from_file (TEST_IFCFG_DIR"/ifcfg-test-misc-variables",
 	                                    NULL, TYPE_ETHERNET, NULL);
 	g_test_assert_expected_messages ();
 
@@ -648,7 +651,7 @@ test_read_variables_corner_cases (void)
 	const char *mac;
 	char expected_mac_address[ETH_ALEN] = { 0x00, 0x16, 0x41, 0x11, 0x22, 0x33 };
 
-	connection = _connection_from_file (TEST_IFCFG_DIR"/network-scripts/ifcfg-test-variables-corner-cases-1",
+	connection = _connection_from_file (TEST_IFCFG_DIR"/ifcfg-test-variables-corner-cases-1",
 	                                    NULL, TYPE_ETHERNET, NULL);
 
 	/* ===== CONNECTION SETTING ===== */
@@ -686,7 +689,7 @@ test_read_unmanaged (void)
 	char *unhandled_spec = NULL;
 	guint64 expected_timestamp = 0;
 
-	connection = _connection_from_file (TEST_IFCFG_DIR "/network-scripts/ifcfg-test-nm-controlled",
+	connection = _connection_from_file (TEST_IFCFG_DIR"/ifcfg-test-nm-controlled",
 	                                    NULL, TYPE_ETHERNET,
 	                                    &unhandled_spec);
 	g_assert_cmpstr (unhandled_spec, ==, "unmanaged:mac:00:11:22:33:f8:9f");
@@ -710,7 +713,7 @@ test_read_unmanaged_unrecognized (void)
 	gs_free char *unhandled_spec = NULL;
 	guint64 expected_timestamp = 0;
 
-	connection = _connection_from_file (TEST_IFCFG_DIR "/network-scripts/ifcfg-test-nm-controlled-unrecognized",
+	connection = _connection_from_file (TEST_IFCFG_DIR"/ifcfg-test-nm-controlled-unrecognized",
 	                                    NULL, NULL,
 	                                    &unhandled_spec);
 	g_assert_cmpstr (unhandled_spec, ==, "unmanaged:interface-name:ipoac0");
@@ -732,7 +735,7 @@ test_read_unrecognized (void)
 	gs_free char *unhandled_spec = NULL;
 	guint64 expected_timestamp = 0;
 
-	connection = _connection_from_file (TEST_IFCFG_DIR "/network-scripts/ifcfg-test-unrecognized",
+	connection = _connection_from_file (TEST_IFCFG_DIR"/ifcfg-test-unrecognized",
 	                                    NULL, NULL,
 	                                    &unhandled_spec);
 	g_assert_cmpstr (unhandled_spec, ==, "unrecognized:mac:00:11:22:33");
@@ -856,7 +859,7 @@ test_read_wired_static_no_prefix (gconstpointer user_data)
 	NMIPAddress *ip4_addr;
 	char *file, *expected_id;
 
-	file = g_strdup_printf (TEST_IFCFG_DIR "/network-scripts/ifcfg-test-wired-static-no-prefix-%u", expected_prefix);
+	file = g_strdup_printf (TEST_IFCFG_DIR"/ifcfg-test-wired-static-no-prefix-%u", expected_prefix);
 	expected_id = g_strdup_printf ("System test-wired-static-no-prefix-%u", expected_prefix);
 
 	NMTST_EXPECT_NM_WARN ("*missing PREFIX, assuming*");
@@ -897,7 +900,7 @@ test_read_wired_dhcp (void)
 	char expected_mac_address[ETH_ALEN] = { 0x00, 0x11, 0x22, 0x33, 0x44, 0xee };
 	const char *mac;
 
-	connection = _connection_from_file (TEST_IFCFG_DIR "/network-scripts/ifcfg-test-wired-dhcp",
+	connection = _connection_from_file (TEST_IFCFG_DIR"/ifcfg-test-wired-dhcp",
 	                                    NULL, TYPE_ETHERNET,
 	                                    &unmanaged);
 	g_assert (unmanaged == NULL);
@@ -940,7 +943,7 @@ test_read_wired_dhcp_plus_ip (void)
 	NMIPAddress *ip4_addr;
 	NMIPAddress *ip6_addr;
 
-	connection = _connection_from_file (TEST_IFCFG_DIR"/network-scripts/ifcfg-test-wired-dhcp-plus-ip",
+	connection = _connection_from_file (TEST_IFCFG_DIR"/ifcfg-test-wired-dhcp-plus-ip",
 	                                    NULL, TYPE_ETHERNET, NULL);
 
 	/* ===== IPv4 SETTING ===== */
@@ -1007,7 +1010,7 @@ test_read_wired_shared_plus_ip (void)
 	NMSettingIPConfig *s_ip4;
 	NMIPAddress *ip4_addr;
 
-	connection = _connection_from_file (TEST_IFCFG_DIR"/network-scripts/ifcfg-test-wired-shared-plus-ip",
+	connection = _connection_from_file (TEST_IFCFG_DIR"/ifcfg-test-wired-shared-plus-ip",
 	                                    NULL, TYPE_ETHERNET, NULL);
 
 	/* ===== IPv4 SETTING ===== */
@@ -1039,8 +1042,8 @@ test_read_wired_global_gateway (void)
 	NMIPAddress *ip4_addr;
 	char *unmanaged = NULL;
 
-	connection = _connection_from_file (TEST_IFCFG_DIR"/network-scripts/ifcfg-test-wired-global-gateway",
-	                                    TEST_IFCFG_DIR"/network-scripts/network-test-wired-global-gateway",
+	connection = _connection_from_file (TEST_IFCFG_DIR"/ifcfg-test-wired-global-gateway",
+	                                    TEST_IFCFG_DIR"/network-test-wired-global-gateway",
 	                                    TYPE_ETHERNET, &unmanaged);
 	g_assert (unmanaged == NULL);
 
@@ -1081,8 +1084,8 @@ test_read_wired_global_gateway_ignore (void)
 	char *unmanaged = NULL;
 
 	NMTST_EXPECT_NM_WARN ("*ignoring GATEWAY (/etc/sysconfig/network) for * because the connection has no static addresses");
-	connection = _connection_from_file (TEST_IFCFG_DIR"/network-scripts/ifcfg-test-wired-global-gateway-ignore",
-	                                    TEST_IFCFG_DIR"/network-scripts/network-test-wired-global-gateway-ignore",
+	connection = _connection_from_file (TEST_IFCFG_DIR"/ifcfg-test-wired-global-gateway-ignore",
+	                                    TEST_IFCFG_DIR"/network-test-wired-global-gateway-ignore",
 	                                    TYPE_ETHERNET, &unmanaged);
 	g_test_assert_expected_messages ();
 	g_assert (unmanaged == NULL);
@@ -1117,7 +1120,7 @@ test_read_wired_obsolete_gateway_n (void)
 	NMSettingIPConfig *s_ip4;
 	NMIPAddress *ip4_addr;
 
-	connection = _connection_from_file (TEST_IFCFG_DIR"/network-scripts/ifcfg-test-wired-obsolete-gateway-n",
+	connection = _connection_from_file (TEST_IFCFG_DIR"/ifcfg-test-wired-obsolete-gateway-n",
 	                                    NULL, TYPE_ETHERNET, NULL);
 
 	/* ===== IPv4 SETTING ===== */
@@ -1185,8 +1188,8 @@ test_user_1 (void)
 	nm_connection_add_setting (connection, NM_SETTING (s_user));
 
 	_writer_new_connec_exp (connection,
-	                        TEST_SCRATCH_DIR "/network-scripts/",
-	                        TEST_IFCFG_DIR "/network-scripts/ifcfg-Test_User_1.cexpected",
+	                        TEST_SCRATCH_DIR,
+	                        TEST_IFCFG_DIR"/ifcfg-Test_User_1.cexpected",
 	                        &testfile);
 
 	reread = _connection_from_file (testfile, NULL, TYPE_ETHERNET, NULL);
@@ -1201,8 +1204,8 @@ test_read_wired_never_default (void)
 	NMSettingIPConfig *s_ip4;
 	NMSettingIPConfig *s_ip6;
 
-	connection = _connection_from_file (TEST_IFCFG_DIR"/network-scripts/ifcfg-test-wired-never-default",
-	                                    TEST_IFCFG_DIR"/network-scripts/network-test-wired-never-default",
+	connection = _connection_from_file (TEST_IFCFG_DIR"/ifcfg-test-wired-never-default",
+	                                    TEST_IFCFG_DIR"/network-test-wired-never-default",
 	                                    TYPE_ETHERNET, NULL);
 
 	/* ===== WIRED SETTING ===== */
@@ -1233,7 +1236,7 @@ test_read_wired_defroute_no (void)
 	NMSettingIPConfig *s_ip6;
 	char *unmanaged = NULL;
 
-	connection = _connection_from_file (TEST_IFCFG_DIR"/network-scripts/ifcfg-test-wired-defroute-no",
+	connection = _connection_from_file (TEST_IFCFG_DIR"/ifcfg-test-wired-defroute-no",
 	                                    NULL, TYPE_ETHERNET, &unmanaged);
 	g_assert (unmanaged == NULL);
 
@@ -1265,8 +1268,8 @@ test_read_wired_defroute_no_gatewaydev_yes (void)
 	NMSettingIPConfig *s_ip6;
 	char *unmanaged = NULL;
 
-	connection = _connection_from_file (TEST_IFCFG_DIR"/network-scripts/ifcfg-test-wired-defroute-no-gatewaydev-yes",
-	                                    TEST_IFCFG_DIR"/network-scripts/network-test-wired-defroute-no-gatewaydev-yes",
+	connection = _connection_from_file (TEST_IFCFG_DIR"/ifcfg-test-wired-defroute-no-gatewaydev-yes",
+	                                    TEST_IFCFG_DIR"/network-test-wired-defroute-no-gatewaydev-yes",
 	                                    TYPE_ETHERNET,
 	                                    &unmanaged);
 
@@ -1298,7 +1301,7 @@ test_read_wired_static_routes (void)
 	NMSettingIPConfig *s_ip4;
 	NMIPRoute *ip4_route;
 
-	connection = _connection_from_file (TEST_IFCFG_DIR"/network-scripts/ifcfg-test-wired-static-routes",
+	connection = _connection_from_file (TEST_IFCFG_DIR"/ifcfg-test-wired-static-routes",
 	                                    NULL, TYPE_ETHERNET, NULL);
 
 	/* ===== CONNECTION SETTING ===== */
@@ -1371,7 +1374,7 @@ test_read_wired_static_routes_legacy (void)
 	char *unmanaged = NULL;
 	NMIPRoute *ip4_route;
 
-	connection = _connection_from_file (TEST_IFCFG_DIR"/network-scripts/ifcfg-test-wired-static-routes-legacy",
+	connection = _connection_from_file (TEST_IFCFG_DIR"/ifcfg-test-wired-static-routes-legacy",
 	                                    NULL, TYPE_ETHERNET, &unmanaged);
 	g_assert (!unmanaged);
 
@@ -1513,7 +1516,7 @@ test_read_wired_ipv6_manual (void)
 	NMIPRoute *ip6_route;
 
 	NMTST_EXPECT_NM_WARN ("*ignoring manual default route*");
-	connection = _connection_from_file (TEST_IFCFG_DIR"/network-scripts/ifcfg-test-wired-ipv6-manual",
+	connection = _connection_from_file (TEST_IFCFG_DIR"/ifcfg-test-wired-ipv6-manual",
 	                                    NULL, TYPE_ETHERNET, &unmanaged);
 	g_test_assert_expected_messages ();
 	g_assert (!unmanaged);
@@ -1689,7 +1692,7 @@ test_read_wired_dhcp6_only (void)
 	char *unmanaged = NULL;
 	const char *method;
 
-	connection = _connection_from_file (TEST_IFCFG_DIR"/network-scripts/ifcfg-test-wired-dhcp6-only", NULL, TYPE_ETHERNET, &unmanaged);
+	connection = _connection_from_file (TEST_IFCFG_DIR"/ifcfg-test-wired-dhcp6-only", NULL, TYPE_ETHERNET, &unmanaged);
 	g_assert (!unmanaged);
 
 	/* ===== CONNECTION SETTING ===== */
@@ -1727,7 +1730,7 @@ test_read_wired_autoip (void)
 	NMSettingIPConfig *s_ip4;
 	char *unmanaged = NULL;
 
-	connection = _connection_from_file (TEST_IFCFG_DIR "/network-scripts/ifcfg-test-wired-autoip",
+	connection = _connection_from_file (TEST_IFCFG_DIR"/ifcfg-test-wired-autoip",
 	                                    NULL, TYPE_ETHERNET,
 	                                    &unmanaged);
 	g_assert (unmanaged == NULL);
@@ -1746,7 +1749,7 @@ test_read_onboot_no (void)
 	NMSettingConnection *s_con;
 	char *unmanaged = NULL;
 
-	connection = _connection_from_file (TEST_IFCFG_DIR"/network-scripts/ifcfg-test-onboot-no", NULL, TYPE_ETHERNET, &unmanaged);
+	connection = _connection_from_file (TEST_IFCFG_DIR"/ifcfg-test-onboot-no", NULL, TYPE_ETHERNET, &unmanaged);
 	g_assert (!unmanaged);
 
 	s_con = nm_connection_get_setting_connection (connection);
@@ -1764,7 +1767,7 @@ test_read_noip (void)
 	NMSettingIPConfig *s_ip4;
 	NMSettingIPConfig *s_ip6;
 
-	connection = _connection_from_file (TEST_IFCFG_DIR"/network-scripts/ifcfg-test-noip", NULL, TYPE_ETHERNET, NULL);
+	connection = _connection_from_file (TEST_IFCFG_DIR"/ifcfg-test-noip", NULL, TYPE_ETHERNET, NULL);
 
 	s_ip4 = nm_connection_get_setting_ip4_config (connection);
 	g_assert (s_ip4);
@@ -1779,7 +1782,7 @@ test_read_noip (void)
 	g_object_unref (connection);
 }
 
-#define TEST_IFCFG_WIRED_8021x_PEAP_MSCHAPV2_CA_CERT TEST_IFCFG_DIR "/network-scripts/test_ca_cert.pem"
+#define TEST_IFCFG_WIRED_8021x_PEAP_MSCHAPV2_CA_CERT TEST_IFCFG_DIR"/test_ca_cert.pem"
 
 static void
 test_read_wired_8021x_peap_mschapv2 (void)
@@ -1795,7 +1798,7 @@ test_read_wired_8021x_peap_mschapv2 (void)
 	const char *expected_ca_cert_path;
 	const char *read_ca_cert_path;
 
-	connection = _connection_from_file (TEST_IFCFG_DIR "/network-scripts/ifcfg-test-wired-8021x-peap-mschapv2",
+	connection = _connection_from_file (TEST_IFCFG_DIR"/ifcfg-test-wired-8021x-peap-mschapv2",
 	                                    NULL, TYPE_ETHERNET, &unmanaged);
 	g_assert (!unmanaged);
 
@@ -1896,7 +1899,7 @@ test_read_write_802_1X_subj_matches (void)
 	NMSetting8021x *s_8021x;
 
 	NMTST_EXPECT_NM_WARN ("*missing IEEE_8021X_CA_CERT*peap*");
-	connection = _connection_from_file (TEST_IFCFG_DIR"/network-scripts/ifcfg-test-wired-802-1X-subj-matches",
+	connection = _connection_from_file (TEST_IFCFG_DIR"/ifcfg-test-wired-802-1X-subj-matches",
 	                                    NULL, TYPE_ETHERNET, NULL);
 	g_test_assert_expected_messages ();
 
@@ -1918,8 +1921,8 @@ test_read_write_802_1X_subj_matches (void)
 
 	NMTST_EXPECT_NM_WARN ("*missing IEEE_8021X_CA_CERT for EAP method 'peap'; this is insecure!");
 	_writer_new_connec_exp (connection,
-	                        TEST_SCRATCH_DIR "/network-scripts/",
-	                        TEST_IFCFG_DIR "/network-scripts/ifcfg-System_test-wired-802-1X-subj-matches.cexpected",
+	                        TEST_SCRATCH_DIR,
+	                        TEST_IFCFG_DIR"/ifcfg-System_test-wired-802-1X-subj-matches.cexpected",
 	                        &testfile);
 	g_test_assert_expected_messages ();
 
@@ -1956,7 +1959,7 @@ test_read_802_1x_ttls_eapgtc (void)
 	 * NMSetting8021x::autheap property.
 	 */
 
-	connection = _connection_from_file (TEST_IFCFG_DIR"/network-scripts/ifcfg-test-wired-802-1x-ttls-eapgtc",
+	connection = _connection_from_file (TEST_IFCFG_DIR"/ifcfg-test-wired-802-1x-ttls-eapgtc",
 	                                    NULL, TYPE_WIRELESS, NULL);
 
 	/* ===== 802.1x SETTING ===== */
@@ -1988,7 +1991,7 @@ test_read_write_802_1x_password_raw (void)
 
 	/* Test that the 802-1x.password-raw is correctly read and written. */
 
-	connection = _connection_from_file (TEST_IFCFG_DIR"/network-scripts/ifcfg-test-wired-802-1x-password-raw",
+	connection = _connection_from_file (TEST_IFCFG_DIR"/ifcfg-test-wired-802-1x-password-raw",
 	                                    NULL, TYPE_ETHERNET, NULL);
 
 	/* ===== 802.1x SETTING ===== */
@@ -2005,7 +2008,7 @@ test_read_write_802_1x_password_raw (void)
 	                 NM_SETTING_SECRET_FLAG_NONE);
 
 	_writer_new_connection (connection,
-	                        TEST_SCRATCH_DIR "/network-scripts/",
+	                        TEST_SCRATCH_DIR,
 	                        &testfile);
 	reread = _connection_from_file (testfile, NULL, TYPE_ETHERNET, NULL);
 	keyfile = utils_get_keys_path (testfile);
@@ -2035,7 +2038,7 @@ test_read_wired_aliases_good (gconstpointer test_data)
 	expected_label   = N == 0 ? expected_label_0   : expected_label_3;
 	expected_num_addresses = g_strv_length ((char **) expected_address);
 
-	nm_sprintf_buf (path, TEST_IFCFG_DIR "/network-scripts/ifcfg-aliasem%d", N);
+	nm_sprintf_buf (path, TEST_IFCFG_DIR"/ifcfg-aliasem%d", N);
 
 	connection = _connection_from_file (path, NULL, TYPE_ETHERNET, NULL);
 
@@ -2138,14 +2141,14 @@ static void
 test_read_wired_aliases_bad_1 (void)
 {
 	NMTST_EXPECT_NM_WARN ("*aliasem1:1*has no DEVICE*");
-	test_read_wired_aliases_bad (TEST_IFCFG_DIR "/network-scripts/ifcfg-aliasem1", "System aliasem1");
+	test_read_wired_aliases_bad (TEST_IFCFG_DIR"/ifcfg-aliasem1", "System aliasem1");
 }
 
 static void
 test_read_wired_aliases_bad_2 (void)
 {
 	NMTST_EXPECT_NM_WARN ("*aliasem2:1*has invalid DEVICE*");
-	test_read_wired_aliases_bad (TEST_IFCFG_DIR "/network-scripts/ifcfg-aliasem2", "System aliasem2");
+	test_read_wired_aliases_bad (TEST_IFCFG_DIR"/ifcfg-aliasem2", "System aliasem2");
 }
 
 static void
@@ -2159,7 +2162,7 @@ test_read_dns_options (void)
 	const char *options6[] = { "inet6" };
 	guint32 i, num;
 
-	connection = _connection_from_file (TEST_IFCFG_DIR "/network-scripts/ifcfg-test-dns-options",
+	connection = _connection_from_file (TEST_IFCFG_DIR"/ifcfg-test-dns-options",
 	                                    NULL, TYPE_ETHERNET, &unmanaged);
 	g_assert_cmpstr (unmanaged, ==, NULL);
 
@@ -2199,7 +2202,7 @@ test_clear_master (void)
 	shvarFile *f;
 
 	/* 1. load the bridge slave connection from disk */
-	connection = _connection_from_file (TEST_IFCFG_DIR "/network-scripts/ifcfg-test-bridge-component",
+	connection = _connection_from_file (TEST_IFCFG_DIR"/ifcfg-test-bridge-component",
 	                                    NULL, TYPE_ETHERNET, &unmanaged);
 	g_assert_cmpstr (unmanaged, ==, NULL);
 
@@ -2211,8 +2214,8 @@ test_clear_master (void)
 
 	/* 2. write the connection to a new file */
 	_writer_new_connec_exp (connection,
-	                        TEST_SCRATCH_DIR "/network-scripts/",
-	                        TEST_IFCFG_DIR "/network-scripts/ifcfg-System_test-bridge-component-a.cexpected",
+	                        TEST_SCRATCH_DIR,
+	                        TEST_IFCFG_DIR"/ifcfg-System_test-bridge-component-a.cexpected",
 	                        &testfile);
 
 	/* 3. clear master and slave-type */
@@ -2228,9 +2231,9 @@ test_clear_master (void)
 
 	/* 4. update the connection on disk */
 	_writer_update_connection (connection,
-	                           TEST_SCRATCH_DIR "/network-scripts/",
+	                           TEST_SCRATCH_DIR,
 	                           testfile,
-	                           TEST_IFCFG_DIR "/network-scripts/ifcfg-System_test-bridge-component-b.cexpected");
+	                           TEST_IFCFG_DIR"/ifcfg-System_test-bridge-component-b.cexpected");
 	keyfile = utils_get_keys_path (testfile);
 	g_assert (!g_file_test (keyfile, G_FILE_TEST_EXISTS));
 
@@ -2315,7 +2318,7 @@ test_write_dns_options (void)
 	nmtst_assert_connection_verifies (connection);
 
 	_writer_new_connection (connection,
-	                        TEST_SCRATCH_DIR "/network-scripts/",
+	                        TEST_SCRATCH_DIR,
 	                        &testfile);
 
 	reread = _connection_from_file (testfile, NULL, TYPE_ETHERNET, NULL);
@@ -2336,7 +2339,7 @@ test_read_wifi_open (void)
 	char expected_mac_address[ETH_ALEN] = { 0x00, 0x16, 0x41, 0x11, 0x22, 0x33 };
 	const char *expected_ssid = "blahblah";
 
-	connection = _connection_from_file (TEST_IFCFG_DIR "/network-scripts/ifcfg-test-wifi-open",
+	connection = _connection_from_file (TEST_IFCFG_DIR"/ifcfg-test-wifi-open",
 	                                    NULL, TYPE_WIRELESS, NULL);
 
 	/* ===== CONNECTION SETTING ===== */
@@ -2399,7 +2402,7 @@ test_read_wifi_open_auto (void)
 	NMSettingConnection *s_con;
 	NMSettingWireless *s_wireless;
 
-	connection = _connection_from_file (TEST_IFCFG_DIR "/network-scripts/ifcfg-test-wifi-open-auto",
+	connection = _connection_from_file (TEST_IFCFG_DIR"/ifcfg-test-wifi-open-auto",
 	                                    NULL, TYPE_WIRELESS, NULL);
 
 	/* ===== CONNECTION SETTING ===== */
@@ -2424,7 +2427,7 @@ test_read_wifi_open_ssid_hex (void)
 	GBytes *ssid;
 	const char *expected_ssid = "blahblah";
 
-	connection = _connection_from_file (TEST_IFCFG_DIR "/network-scripts/ifcfg-test-wifi-open-ssid-hex",
+	connection = _connection_from_file (TEST_IFCFG_DIR"/ifcfg-test-wifi-open-ssid-hex",
 	                                    NULL, TYPE_WIRELESS, NULL);
 
 	/* ===== CONNECTION SETTING ===== */
@@ -2454,7 +2457,7 @@ test_read_wifi_open_ssid_hex_bad (void)
 	GBytes *ssid;
 	const char *expected_ssid = "0x626cxx";
 
-	connection = _connection_from_file (TEST_IFCFG_DIR"/network-scripts/ifcfg-test-wifi-open-ssid-bad-hex",
+	connection = _connection_from_file (TEST_IFCFG_DIR"/ifcfg-test-wifi-open-ssid-bad-hex",
 	                                    NULL, TYPE_WIRELESS, NULL);
 
 	s_con = nm_connection_get_setting_connection (connection);
@@ -2484,7 +2487,7 @@ test_read_wifi_open_ssid_quoted (void)
 	GBytes *ssid;
 	const char *expected_ssid = "foo\"bar\\";
 
-	connection = _connection_from_file (TEST_IFCFG_DIR "/network-scripts/ifcfg-test-wifi-open-ssid-quoted",
+	connection = _connection_from_file (TEST_IFCFG_DIR"/ifcfg-test-wifi-open-ssid-quoted",
 	                                    NULL, TYPE_WIRELESS, NULL);
 
 	/* ===== CONNECTION SETTING ===== */
@@ -2519,7 +2522,7 @@ test_read_wifi_wep (void)
 	const char *expected_ssid = "blahblah";
 	NMWepKeyType key_type;
 
-	connection = _connection_from_file (TEST_IFCFG_DIR "/network-scripts/ifcfg-test-wifi-wep",
+	connection = _connection_from_file (TEST_IFCFG_DIR"/ifcfg-test-wifi-wep",
 	                                    NULL, TYPE_WIRELESS, NULL);
 
 	/* ===== CONNECTION SETTING ===== */
@@ -2593,7 +2596,7 @@ test_read_wifi_wep_adhoc (void)
 	GBytes *ssid;
 	const char *expected_ssid = "blahblah";
 
-	connection = _connection_from_file (TEST_IFCFG_DIR "/network-scripts/ifcfg-test-wifi-wep-adhoc",
+	connection = _connection_from_file (TEST_IFCFG_DIR"/ifcfg-test-wifi-wep-adhoc",
 	                                    NULL, TYPE_WIRELESS, NULL);
 
 	/* ===== CONNECTION SETTING ===== */
@@ -2660,7 +2663,7 @@ test_read_wifi_wep_passphrase (void)
 	NMSettingWireless *s_wireless;
 	NMSettingWirelessSecurity *s_wsec;
 
-	connection = _connection_from_file (TEST_IFCFG_DIR "/network-scripts/ifcfg-test-wifi-wep-passphrase",
+	connection = _connection_from_file (TEST_IFCFG_DIR"/ifcfg-test-wifi-wep-passphrase",
 	                                    NULL, TYPE_WIRELESS, NULL);
 
 	/* ===== CONNECTION SETTING ===== */
@@ -2697,7 +2700,7 @@ test_read_wifi_wep_40_ascii (void)
 	NMSettingWirelessSecurity *s_wsec;
 	NMWepKeyType key_type;
 
-	connection = _connection_from_file (TEST_IFCFG_DIR "/network-scripts/ifcfg-test-wifi-wep-40-ascii",
+	connection = _connection_from_file (TEST_IFCFG_DIR"/ifcfg-test-wifi-wep-40-ascii",
 	                                    NULL, TYPE_WIRELESS, NULL);
 
 	/* ===== CONNECTION SETTING ===== */
@@ -2737,7 +2740,7 @@ test_read_wifi_wep_104_ascii (void)
 	NMSettingWirelessSecurity *s_wsec;
 	NMWepKeyType key_type;
 
-	connection = _connection_from_file (TEST_IFCFG_DIR "/network-scripts/ifcfg-test-wifi-wep-104-ascii",
+	connection = _connection_from_file (TEST_IFCFG_DIR"/ifcfg-test-wifi-wep-104-ascii",
 	                                    NULL, TYPE_WIRELESS, NULL);
 
 	/* ===== CONNECTION SETTING ===== */
@@ -2776,7 +2779,7 @@ test_read_wifi_leap (void)
 	NMSettingWireless *s_wireless;
 	NMSettingWirelessSecurity *s_wsec;
 
-	connection = _connection_from_file (TEST_IFCFG_DIR "/network-scripts/ifcfg-test-wifi-leap",
+	connection = _connection_from_file (TEST_IFCFG_DIR"/ifcfg-test-wifi-leap",
 	                                    NULL, TYPE_WIRELESS, NULL);
 
 	/* ===== CONNECTION SETTING ===== */
@@ -2838,7 +2841,7 @@ test_ifcfg_no_trailing_newline (void)
 {
 	shvarFile *sv;
 
-	sv = _svOpenFile (TEST_IFCFG_DIR "/network-scripts/ifcfg-test-wifi-wpa-psk");
+	sv = _svOpenFile (TEST_IFCFG_DIR"/ifcfg-test-wifi-wpa-psk");
 	_svGetValue_check (sv, "LAST_ENTRY", "no-newline");
 	svCloseFile (sv);
 }
@@ -2865,7 +2868,7 @@ test_read_wifi_wpa_psk (void)
 	gboolean found_proto_wpa = FALSE;
 	gboolean found_proto_rsn = FALSE;
 
-	connection = _connection_from_file (TEST_IFCFG_DIR "/network-scripts/ifcfg-test-wifi-wpa-psk",
+	connection = _connection_from_file (TEST_IFCFG_DIR"/ifcfg-test-wifi-wpa-psk",
 	                                    NULL, TYPE_WIRELESS, NULL);
 
 	/* ===== CONNECTION SETTING ===== */
@@ -2974,7 +2977,7 @@ test_read_wifi_wpa_psk_2 (void)
 	NMSettingWireless *s_wireless;
 	NMSettingWirelessSecurity *s_wsec;
 
-	connection = _connection_from_file (TEST_IFCFG_DIR "/network-scripts/ifcfg-test-wifi-wpa-psk-2",
+	connection = _connection_from_file (TEST_IFCFG_DIR"/ifcfg-test-wifi-wpa-psk-2",
 	                                    NULL, TYPE_WIRELESS, NULL);
 
 	/* ===== CONNECTION SETTING ===== */
@@ -3005,7 +3008,7 @@ test_read_wifi_wpa_psk_unquoted (void)
 	NMSettingWireless *s_wireless;
 	NMSettingWirelessSecurity *s_wsec;
 
-	connection = _connection_from_file (TEST_IFCFG_DIR "/network-scripts/ifcfg-test-wifi-wpa-psk-unquoted",
+	connection = _connection_from_file (TEST_IFCFG_DIR"/ifcfg-test-wifi-wpa-psk-unquoted",
 	                                    NULL, TYPE_WIRELESS, NULL);
 
 	/* ===== CONNECTION SETTING ===== */
@@ -3033,7 +3036,7 @@ test_read_wifi_wpa_psk_unquoted2 (void)
 {
 	gs_unref_object NMConnection *connection = NULL;
 
-	connection = _connection_from_file (TEST_IFCFG_DIR "/network-scripts/ifcfg-test-wifi-wpa-psk-unquoted2",
+	connection = _connection_from_file (TEST_IFCFG_DIR"/ifcfg-test-wifi-wpa-psk-unquoted2",
 	                                    NULL, TYPE_WIRELESS, NULL);
 }
 
@@ -3046,7 +3049,7 @@ test_read_wifi_wpa_psk_adhoc (void)
 	NMSettingWirelessSecurity *s_wsec;
 	NMSettingIPConfig *s_ip4;
 
-	connection = _connection_from_file(TEST_IFCFG_DIR "/network-scripts/ifcfg-test-wifi-wpa-psk-adhoc",
+	connection = _connection_from_file(TEST_IFCFG_DIR"/ifcfg-test-wifi-wpa-psk-adhoc",
 	                                   NULL, TYPE_WIRELESS, NULL);
 
 	/* ===== CONNECTION SETTING ===== */
@@ -3098,7 +3101,7 @@ test_read_wifi_wpa_psk_hex (void)
 	GBytes *ssid;
 	const char *expected_ssid = "blahblah";
 
-	connection = _connection_from_file (TEST_IFCFG_DIR "/network-scripts/ifcfg-test-wifi-wpa-psk-hex",
+	connection = _connection_from_file (TEST_IFCFG_DIR"/ifcfg-test-wifi-wpa-psk-hex",
 	                                    NULL, TYPE_WIRELESS, NULL);
 
 	/* ===== CONNECTION SETTING ===== */
@@ -3133,9 +3136,9 @@ test_read_wifi_wpa_psk_hex (void)
 	g_object_unref (connection);
 }
 
-#define TEST_IFCFG_WIFI_WPA_EAP_TLS_CA_CERT TEST_IFCFG_DIR "/network-scripts/test_ca_cert.pem"
-#define TEST_IFCFG_WIFI_WPA_EAP_TLS_CLIENT_CERT TEST_IFCFG_DIR "/network-scripts/test1_key_and_cert.pem"
-#define TEST_IFCFG_WIFI_WPA_EAP_TLS_PRIVATE_KEY TEST_IFCFG_DIR "/network-scripts/test1_key_and_cert.pem"
+#define TEST_IFCFG_WIFI_WPA_EAP_TLS_CA_CERT TEST_IFCFG_DIR"/test_ca_cert.pem"
+#define TEST_IFCFG_WIFI_WPA_EAP_TLS_CLIENT_CERT TEST_IFCFG_DIR"/test1_key_and_cert.pem"
+#define TEST_IFCFG_WIFI_WPA_EAP_TLS_PRIVATE_KEY TEST_IFCFG_DIR"/test1_key_and_cert.pem"
 
 static void
 test_read_wifi_wpa_eap_tls (void)
@@ -3147,7 +3150,7 @@ test_read_wifi_wpa_eap_tls (void)
 	char *unmanaged = NULL;
 	const char *expected_privkey_password = "test1";
 
-	connection = _connection_from_file (TEST_IFCFG_DIR "/network-scripts/ifcfg-test-wifi-wpa-eap-tls",
+	connection = _connection_from_file (TEST_IFCFG_DIR"/ifcfg-test-wifi-wpa-eap-tls",
 	                                    NULL, TYPE_ETHERNET, &unmanaged);
 	g_assert (!unmanaged);
 
@@ -3205,7 +3208,7 @@ test_read_wifi_wpa_eap_ttls_tls (void)
 	char *unmanaged = NULL;
 	const char *expected_privkey_password = "test1";
 
-	connection = _connection_from_file (TEST_IFCFG_DIR "/network-scripts/ifcfg-test-wifi-wpa-eap-ttls-tls",
+	connection = _connection_from_file (TEST_IFCFG_DIR"/ifcfg-test-wifi-wpa-eap-ttls-tls",
 	                                    NULL, TYPE_WIRELESS, &unmanaged);
 	g_assert (!unmanaged);
 
@@ -3229,7 +3232,7 @@ test_read_wifi_wpa_eap_ttls_tls (void)
 
 	/* CA Cert */
 	verify_cert_or_key (s_8021x,
-	                    TEST_IFCFG_DIR "/network-scripts/test_ca_cert.pem",
+	                    TEST_IFCFG_DIR"/test_ca_cert.pem",
 	                    NULL,
 	                    NM_SETTING_802_1X_CA_CERT);
 
@@ -3268,7 +3271,7 @@ test_read_wifi_dynamic_wep_leap (void)
 	NMSettingWirelessSecurity *s_wsec;
 	NMSetting8021x *s_8021x;
 
-	connection = _connection_from_file (TEST_IFCFG_DIR "/network-scripts/ifcfg-test-wifi-dynamic-wep-leap",
+	connection = _connection_from_file (TEST_IFCFG_DIR"/ifcfg-test-wifi-dynamic-wep-leap",
 	                                    NULL, TYPE_WIRELESS, NULL);
 
 	/* ===== WIRELESS SETTING ===== */
@@ -3317,7 +3320,7 @@ test_read_wifi_wep_eap_ttls_chap (void)
 	NMSetting8021x *s_8021x;
 	char *unmanaged = NULL;
 
-	connection = _connection_from_file (TEST_IFCFG_DIR "/network-scripts/ifcfg-test-wifi-wep-eap-ttls-chap",
+	connection = _connection_from_file (TEST_IFCFG_DIR"/ifcfg-test-wifi-wep-eap-ttls-chap",
 	                                    NULL, TYPE_WIRELESS, &unmanaged);
 	g_assert (!unmanaged);
 
@@ -3347,7 +3350,7 @@ test_read_wifi_wep_eap_ttls_chap (void)
 
 	/* CA Cert */
 	verify_cert_or_key (s_8021x,
-	                    TEST_IFCFG_DIR "/network-scripts/test_ca_cert.pem",
+	                    TEST_IFCFG_DIR"/test_ca_cert.pem",
 	                    NULL,
 	                    NM_SETTING_802_1X_CA_CERT);
 
@@ -3365,7 +3368,7 @@ test_read_wired_wake_on_lan (void)
 	NMSettingConnection *s_con;
 	NMSettingWired *s_wired;
 
-	connection = _connection_from_file (TEST_IFCFG_DIR"/network-scripts/ifcfg-test-wired-wake-on-lan",
+	connection = _connection_from_file (TEST_IFCFG_DIR"/ifcfg-test-wired-wake-on-lan",
 	                                    NULL, TYPE_WIRELESS, NULL);
 
 	s_con = nm_connection_get_setting_connection (connection);
@@ -3394,7 +3397,7 @@ test_read_wired_auto_negotiate_off (void)
 	NMSettingConnection *s_con;
 	NMSettingWired *s_wired;
 
-	connection = _connection_from_file (TEST_IFCFG_DIR"/network-scripts/ifcfg-test-wired-wake-on-lan",
+	connection = _connection_from_file (TEST_IFCFG_DIR"/ifcfg-test-wired-wake-on-lan",
 	                                    NULL, TYPE_ETHERNET, NULL);
 
 	s_con = nm_connection_get_setting_connection (connection);
@@ -3416,7 +3419,7 @@ test_read_wired_auto_negotiate_on (void)
 	NMSettingConnection *s_con;
 	NMSettingWired *s_wired;
 
-	connection = _connection_from_file (TEST_IFCFG_DIR"/network-scripts/ifcfg-test-wired-auto-negotiate-on",
+	connection = _connection_from_file (TEST_IFCFG_DIR"/ifcfg-test-wired-auto-negotiate-on",
 	                                    NULL, TYPE_ETHERNET, NULL);
 
 	s_con = nm_connection_get_setting_connection (connection);
@@ -3438,7 +3441,7 @@ test_read_wired_unknown_ethtool_opt (void)
 	NMSettingConnection *s_con;
 	NMSettingWired *s_wired;
 
-	connection = _connection_from_file (TEST_IFCFG_DIR"/network-scripts/ifcfg-test-wired-unknown-ethtool-opt",
+	connection = _connection_from_file (TEST_IFCFG_DIR"/ifcfg-test-wired-unknown-ethtool-opt",
 	                                    NULL, TYPE_ETHERNET, NULL);
 
 	s_con = nm_connection_get_setting_connection (connection);
@@ -3469,7 +3472,7 @@ test_read_wifi_hidden (void)
 	NMSettingConnection *s_con;
 	NMSettingWireless *s_wifi;
 
-	connection = _connection_from_file (TEST_IFCFG_DIR"/network-scripts/ifcfg-test-wifi-hidden",
+	connection = _connection_from_file (TEST_IFCFG_DIR"/ifcfg-test-wifi-hidden",
 	                                    NULL, TYPE_WIRELESS, NULL);
 
 	s_con = nm_connection_get_setting_connection (connection);
@@ -3523,8 +3526,8 @@ test_write_wifi_hidden (void)
 	nmtst_assert_connection_verifies (connection);
 
 	_writer_new_connec_exp (connection,
-	                        TEST_SCRATCH_DIR "/network-scripts/",
-	                        TEST_IFCFG_DIR "/network-scripts/ifcfg-Test_Write_WiFi_Hidden.cexpected",
+	                        TEST_SCRATCH_DIR,
+	                        TEST_IFCFG_DIR"/ifcfg-Test_Write_WiFi_Hidden.cexpected",
 	                        &testfile);
 
 	f = _svOpenFile (testfile);
@@ -3549,7 +3552,7 @@ test_read_wifi_mac_random (gconstpointer user_data)
 	nmtst_test_data_unpack (user_data, &name, &value_p);
 	value = GPOINTER_TO_INT (value_p);
 
-	path = g_strdup_printf (TEST_IFCFG_DIR"/network-scripts/ifcfg-test-wifi-mac-random-%s", name);
+	path = g_strdup_printf (TEST_IFCFG_DIR"/ifcfg-test-wifi-mac-random-%s", name);
 	connection = _connection_from_file (path, NULL, TYPE_WIRELESS, NULL);
 
 	s_wifi = nm_connection_get_setting_wireless (connection);
@@ -3608,8 +3611,8 @@ test_write_wifi_mac_random (gconstpointer user_data)
 	nmtst_assert_connection_verifies (connection);
 
 	_writer_new_connec_exp (connection,
-	                        TEST_SCRATCH_DIR "/network-scripts/",
-	                        nm_sprintf_buf (cexpected, TEST_IFCFG_DIR"/network-scripts/ifcfg-Test_Write_WiFi_MAC_%s.cexpected", name),
+	                        TEST_SCRATCH_DIR,
+	                        nm_sprintf_buf (cexpected, TEST_IFCFG_DIR"/ifcfg-Test_Write_WiFi_MAC_%s.cexpected", name),
 	                        &testfile);
 
 	f = _svOpenFile (testfile);
@@ -3661,8 +3664,8 @@ test_write_wired_wake_on_lan (void)
 	nmtst_assert_connection_verifies (connection);
 
 	_writer_new_connec_exp (connection,
-	                        TEST_SCRATCH_DIR "/network-scripts/",
-	                        TEST_IFCFG_DIR "/network-scripts/ifcfg-Test_Write_Wired_Wake-on-LAN.cexpected",
+	                        TEST_SCRATCH_DIR,
+	                        TEST_IFCFG_DIR"/ifcfg-Test_Write_Wired_Wake-on-LAN.cexpected",
 	                        &testfile);
 
 	f = _svOpenFile (testfile);
@@ -3697,8 +3700,8 @@ test_write_wired_auto_negotiate_off (void)
 	              NULL);
 
 	_writer_new_connec_exp (connection,
-	                        TEST_SCRATCH_DIR "/network-scripts/",
-	                        TEST_IFCFG_DIR "/network-scripts/ifcfg-Test_Write_Wired_Auto-Negotiate.cexpected",
+	                        TEST_SCRATCH_DIR,
+	                        TEST_IFCFG_DIR"/ifcfg-Test_Write_Wired_Auto-Negotiate.cexpected",
 	                        &testfile);
 
 	f = _svOpenFile (testfile);
@@ -3732,7 +3735,7 @@ test_write_wired_auto_negotiate_on (void)
 	              NULL);
 
 	_writer_new_connection (connection,
-	                        TEST_SCRATCH_DIR "/network-scripts/",
+	                        TEST_SCRATCH_DIR,
 	                        &testfile);
 
 	f = _svOpenFile (testfile);
@@ -3756,7 +3759,7 @@ test_read_wifi_band_a (void)
 	NMSettingConnection *s_con;
 	NMSettingWireless *s_wifi;
 
-	connection = _connection_from_file (TEST_IFCFG_DIR"/network-scripts/ifcfg-test-wifi-band-a",
+	connection = _connection_from_file (TEST_IFCFG_DIR"/ifcfg-test-wifi-band-a",
 	                                    NULL, TYPE_WIRELESS, NULL);
 
 	s_con = nm_connection_get_setting_connection (connection);
@@ -3811,8 +3814,8 @@ test_write_wifi_band_a (void)
 	nmtst_assert_connection_verifies (connection);
 
 	_writer_new_connec_exp (connection,
-	                        TEST_SCRATCH_DIR "/network-scripts/",
-	                        TEST_IFCFG_DIR "/network-scripts/ifcfg-Test_Write_WiFi_Band_A.cexpected",
+	                        TEST_SCRATCH_DIR,
+	                        TEST_IFCFG_DIR"/ifcfg-Test_Write_WiFi_Band_A.cexpected",
 	                        &testfile);
 
 	f = _svOpenFile (testfile);
@@ -3829,7 +3832,7 @@ test_read_wifi_band_a_channel_mismatch (void)
 {
 	gs_free_error GError *error = NULL;
 
-	_connection_from_file_fail (TEST_IFCFG_DIR"/network-scripts/ifcfg-test-wifi-band-a-channel-mismatch",
+	_connection_from_file_fail (TEST_IFCFG_DIR"/ifcfg-test-wifi-band-a-channel-mismatch",
 	                            NULL, TYPE_WIRELESS, &error);
 	g_assert_error (error, NM_SETTINGS_ERROR, NM_SETTINGS_ERROR_INVALID_CONNECTION);
 }
@@ -3839,7 +3842,7 @@ test_read_wifi_band_bg_channel_mismatch (void)
 {
 	gs_free_error GError *error = NULL;
 
-	_connection_from_file_fail (TEST_IFCFG_DIR"/network-scripts/ifcfg-test-wifi-band-bg-channel-mismatch",
+	_connection_from_file_fail (TEST_IFCFG_DIR"/ifcfg-test-wifi-band-bg-channel-mismatch",
 	                            NULL, TYPE_WIRELESS, &error);
 	g_assert_error (error, NM_SETTINGS_ERROR, NM_SETTINGS_ERROR_INVALID_CONNECTION);
 }
@@ -3854,7 +3857,7 @@ test_read_wired_qeth_static (void)
 	char *unmanaged = NULL;
 	const char * const *subchannels;
 
-	connection = _connection_from_file (TEST_IFCFG_DIR "/network-scripts/ifcfg-test-wired-qeth-static",
+	connection = _connection_from_file (TEST_IFCFG_DIR"/ifcfg-test-wired-qeth-static",
 	                                    NULL, TYPE_ETHERNET, &unmanaged);
 	g_assert (!unmanaged);
 
@@ -3903,7 +3906,7 @@ test_read_wired_ctc_static (void)
 	char *unmanaged = NULL;
 	const char * const *subchannels;
 
-	connection = _connection_from_file (TEST_IFCFG_DIR "/network-scripts/ifcfg-test-wired-ctc-static",
+	connection = _connection_from_file (TEST_IFCFG_DIR"/ifcfg-test-wired-ctc-static",
 	                                    NULL, TYPE_ETHERNET, &unmanaged);
 	g_assert (unmanaged == NULL);
 
@@ -3941,7 +3944,7 @@ test_read_wifi_wep_no_keys (void)
 	NMSettingWirelessSecurity *s_wsec;
 	NMWepKeyType key_type;
 
-	connection = _connection_from_file (TEST_IFCFG_DIR "/network-scripts/ifcfg-test-wifi-wep-no-keys",
+	connection = _connection_from_file (TEST_IFCFG_DIR"/ifcfg-test-wifi-wep-no-keys",
 	                                    NULL, TYPE_WIRELESS, NULL);
 
 	/* ===== CONNECTION SETTING ===== */
@@ -3990,7 +3993,7 @@ test_read_permissions (void)
 	guint32 num;
 	const char *tmp;
 
-	connection = _connection_from_file (TEST_IFCFG_DIR "/network-scripts/ifcfg-test-permissions",
+	connection = _connection_from_file (TEST_IFCFG_DIR"/ifcfg-test-permissions",
 	                                    NULL, TYPE_ETHERNET, NULL);
 
 	/* ===== CONNECTION SETTING ===== */
@@ -4029,7 +4032,7 @@ test_read_wifi_wep_agent_keys (void)
 	NMWepKeyType key_type;
 	NMSettingSecretFlags flags;
 
-	connection = _connection_from_file (TEST_IFCFG_DIR "/network-scripts/ifcfg-test-wifi-wep-agent-keys",
+	connection = _connection_from_file (TEST_IFCFG_DIR"/ifcfg-test-wifi-wep-agent-keys",
 	                                    NULL, TYPE_WIRELESS, NULL);
 
 	/* Ensure the connection is still marked for wifi security even though
@@ -4180,7 +4183,7 @@ test_write_wired_static (void)
 	nmtst_assert_connection_verifies (connection);
 
 	_writer_new_connection (connection,
-	                        TEST_SCRATCH_DIR "/network-scripts/",
+	                        TEST_SCRATCH_DIR,
 	                        &testfile);
 	route6file = utils_get_route6_path (testfile);
 
@@ -4320,7 +4323,7 @@ test_write_wired_static_with_generic (void)
 	nmtst_assert_connection_verifies (connection);
 
 	_writer_new_connection_FIXME (connection,
-	                              TEST_SCRATCH_DIR "/network-scripts/",
+	                              TEST_SCRATCH_DIR,
 	                              &testfile);
 	route6file = utils_get_route6_path (testfile);
 
@@ -4405,7 +4408,7 @@ test_write_wired_dhcp (void)
 	              NULL);
 
 	_writer_new_connection (connection,
-	                        TEST_SCRATCH_DIR "/network-scripts/",
+	                        TEST_SCRATCH_DIR,
 	                        &testfile);
 
 	reread = _connection_from_file (testfile, NULL, TYPE_ETHERNET, NULL);
@@ -4420,11 +4423,11 @@ test_write_wired_dhcp_plus_ip (void)
 	gs_unref_object NMConnection *connection = NULL;
 	gs_unref_object NMConnection *reread = NULL;
 
-	connection = _connection_from_file (TEST_IFCFG_DIR"/network-scripts/ifcfg-test-wired-dhcp-plus-ip",
+	connection = _connection_from_file (TEST_IFCFG_DIR"/ifcfg-test-wired-dhcp-plus-ip",
 	                                    NULL, TYPE_ETHERNET, NULL);
 
 	_writer_new_connection (connection,
-	                        TEST_SCRATCH_DIR "/network-scripts/",
+	                        TEST_SCRATCH_DIR,
 	                        &testfile);
 
 	reread = _connection_from_file (testfile, NULL, TYPE_ETHERNET, NULL);
@@ -4442,7 +4445,7 @@ test_read_write_wired_dhcp_send_hostname (void)
 	NMSettingIPConfig *s_ip6;
 	const char * dhcp_hostname = "kamil-patka";
 
-	connection = _connection_from_file (TEST_IFCFG_DIR"/network-scripts/ifcfg-test-wired-dhcp-send-hostname",
+	connection = _connection_from_file (TEST_IFCFG_DIR"/ifcfg-test-wired-dhcp-send-hostname",
 	                                    NULL, TYPE_ETHERNET, NULL);
 
 	/* Check dhcp-hostname and dhcp-send-hostname */
@@ -4460,7 +4463,7 @@ test_read_write_wired_dhcp_send_hostname (void)
 	g_object_set (s_ip6, NM_SETTING_IP_CONFIG_DHCP_HOSTNAME, dhcp_hostname, NULL);
 
 	_writer_new_connection (connection,
-	                        TEST_SCRATCH_DIR "/network-scripts/",
+	                        TEST_SCRATCH_DIR,
 	                        &testfile);
 
 	reread = _connection_from_file (testfile, NULL, TYPE_ETHERNET, NULL);
@@ -4483,7 +4486,7 @@ test_read_wired_dhcpv6_hostname_fallback (void)
 	gs_unref_object NMConnection *connection = NULL;
 	NMSettingIPConfig *s_ip6;
 
-	connection = _connection_from_file (TEST_IFCFG_DIR"/network-scripts/ifcfg-test-wired-dhcpv6-hostname-fallback",
+	connection = _connection_from_file (TEST_IFCFG_DIR"/ifcfg-test-wired-dhcpv6-hostname-fallback",
 	                                    NULL, TYPE_ETHERNET, NULL);
 
 	s_ip6 = nm_connection_get_setting_ip6_config (connection);
@@ -4552,7 +4555,7 @@ test_write_wired_static_ip6_only (void)
 	nmtst_assert_connection_verifies (connection);
 
 	_writer_new_connection (connection,
-	                        TEST_SCRATCH_DIR "/network-scripts/",
+	                        TEST_SCRATCH_DIR,
 	                        &testfile);
 
 	reread = _connection_from_file (testfile, NULL, TYPE_ETHERNET, NULL);
@@ -4591,7 +4594,7 @@ test_write_wired_static_ip6_only_gw (gconstpointer user_data)
 	s_con = (NMSettingConnection *) nm_setting_connection_new ();
 	nm_connection_add_setting (connection, NM_SETTING (s_con));
 
-	id = g_strdup_printf ("Test Write Wired Static IP6 Only With Gateway %s", gateway6 ? gateway6 : "NULL");
+	id = g_strdup_printf ("Test Write Wired Static IP6 Only With Gateway %s", gateway6 ?: "NULL");
 	g_object_set (s_con,
 	              NM_SETTING_CONNECTION_ID, id,
 	              NM_SETTING_CONNECTION_UUID, nm_utils_uuid_generate_a (),
@@ -4635,7 +4638,7 @@ test_write_wired_static_ip6_only_gw (gconstpointer user_data)
 	nmtst_assert_connection_verifies (connection);
 
 	_writer_new_connection (connection,
-	                        TEST_SCRATCH_DIR "/network-scripts/",
+	                        TEST_SCRATCH_DIR,
 	                        &testfile);
 
 	reread = _connection_from_file (testfile, NULL, TYPE_ETHERNET, NULL);
@@ -4676,7 +4679,7 @@ test_read_write_static_routes_legacy (void)
 	NMSettingIPConfig *s_ip4;
 	const char *tmp;
 
-	connection = _connection_from_file (TEST_IFCFG_DIR "/network-scripts/ifcfg-test-static-routes-legacy",
+	connection = _connection_from_file (TEST_IFCFG_DIR"/ifcfg-test-static-routes-legacy",
 	                                    NULL, TYPE_ETHERNET, NULL);
 
 	/* ===== CONNECTION SETTING ===== */
@@ -4710,7 +4713,7 @@ test_read_write_static_routes_legacy (void)
 	 */
 	_writer_new_connec_exp (connection,
 	                        TEST_SCRATCH_DIR_TMP,
-	                        TEST_IFCFG_DIR "/network-scripts/ifcfg-test-static-routes-legacy.cexpected",
+	                        TEST_IFCFG_DIR"/ifcfg-test-static-routes-legacy.cexpected",
 	                        &testfile);
 
 	reread = _connection_from_file (testfile, NULL, TYPE_ETHERNET, NULL);
@@ -4812,9 +4815,9 @@ test_write_wired_static_routes (void)
 	nmtst_assert_connection_verifies (connection);
 
 	_writer_new_connection_reread (connection,
-	                               TEST_SCRATCH_DIR "/network-scripts/",
+	                               TEST_SCRATCH_DIR,
 	                               &testfile,
-	                               TEST_IFCFG_DIR "/network-scripts/ifcfg-Test_Write_Wired_Static_Routes.cexpected",
+	                               TEST_IFCFG_DIR"/ifcfg-Test_Write_Wired_Static_Routes.cexpected",
 	                               &reread,
 	                               &reread_same);
 	/* ifcfg does not support setting onlink=0. It gets lost during write+re-read.
@@ -4907,7 +4910,7 @@ test_write_wired_dhcp_8021x_peap_mschapv2 (void)
 	nmtst_assert_connection_verifies (connection);
 
 	_writer_new_connection (connection,
-	                        TEST_SCRATCH_DIR "/network-scripts/",
+	                        TEST_SCRATCH_DIR,
 	                        &testfile);
 
 	reread = _connection_from_file (testfile, NULL, TYPE_ETHERNET, NULL);
@@ -4981,7 +4984,7 @@ test_write_wired_8021x_tls (gconstpointer test_data)
 
 	/* CA cert */
 	success = nm_setting_802_1x_set_ca_cert (s_8021x,
-	                                         TEST_IFCFG_DIR "/network-scripts/test_ca_cert.pem",
+	                                         TEST_IFCFG_DIR"/test_ca_cert.pem",
 	                                         scheme,
 	                                         &format,
 	                                         &error);
@@ -4992,7 +4995,7 @@ test_write_wired_8021x_tls (gconstpointer test_data)
 	/* Client cert */
 	format = NM_SETTING_802_1X_CK_FORMAT_UNKNOWN;
 	success = nm_setting_802_1x_set_client_cert (s_8021x,
-	                                             TEST_IFCFG_DIR "/network-scripts/test1_key_and_cert.pem",
+	                                             TEST_IFCFG_DIR"/test1_key_and_cert.pem",
 	                                             scheme,
 	                                             &format,
 	                                             &error);
@@ -5003,7 +5006,7 @@ test_write_wired_8021x_tls (gconstpointer test_data)
 	/* Private key */
 	format = NM_SETTING_802_1X_CK_FORMAT_UNKNOWN;
 	success = nm_setting_802_1x_set_private_key (s_8021x,
-	                                             TEST_IFCFG_DIR "/network-scripts/test1_key_and_cert.pem",
+	                                             TEST_IFCFG_DIR"/test1_key_and_cert.pem",
 	                                             "test1",
 	                                             scheme,
 	                                             &format,
@@ -5018,7 +5021,7 @@ test_write_wired_8021x_tls (gconstpointer test_data)
 	nmtst_assert_connection_verifies (connection);
 
 	_writer_new_connection_FIXME (connection,
-	                              TEST_SCRATCH_DIR "/network-scripts/",
+	                              TEST_SCRATCH_DIR,
 	                              &testfile);
 
 	reread = _connection_from_file (testfile, NULL, TYPE_WIRELESS, NULL);
@@ -5080,8 +5083,6 @@ test_write_wired_8021x_tls (gconstpointer test_data)
 	g_free (tmp);
 }
 
-#define TEST_SCRATCH_ALIAS_BASE TEST_SCRATCH_DIR "/network-scripts/ifcfg-alias0"
-
 static void
 test_write_wired_aliases (void)
 {
@@ -5157,7 +5158,7 @@ test_write_wired_aliases (void)
 	g_assert (g_file_test (TEST_SCRATCH_ALIAS_BASE ":5", G_FILE_TEST_EXISTS));
 
 	_writer_new_connection_FIXME (connection,
-	                              TEST_SCRATCH_DIR "/network-scripts/",
+	                              TEST_SCRATCH_DIR,
 	                              &testfile);
 
 	/* Re-check the alias files */
@@ -5259,7 +5260,7 @@ test_write_gateway (void)
 	nmtst_assert_connection_verifies (connection);
 
 	_writer_new_connection (connection,
-	                        TEST_SCRATCH_DIR "/network-scripts/",
+	                        TEST_SCRATCH_DIR,
 	                        &testfile);
 
 	f = _svOpenFile (testfile);
@@ -5279,7 +5280,6 @@ test_write_gateway (void)
 	nmtst_assert_connection_equals (connection, TRUE, reread, FALSE);
 }
 
-
 static void
 test_write_wifi_open (void)
 {
@@ -5343,7 +5343,7 @@ test_write_wifi_open (void)
 	nmtst_assert_connection_verifies (connection);
 
 	_writer_new_connection (connection,
-	                        TEST_SCRATCH_DIR "/network-scripts/",
+	                        TEST_SCRATCH_DIR,
 	                        &testfile);
 
 	reread = _connection_from_file (testfile, NULL, TYPE_WIRELESS, NULL);
@@ -5412,7 +5412,7 @@ test_write_wifi_open_hex_ssid (void)
 	nmtst_assert_connection_verifies (connection);
 
 	_writer_new_connection (connection,
-	                        TEST_SCRATCH_DIR "/network-scripts/",
+	                        TEST_SCRATCH_DIR,
 	                        &testfile);
 
 	reread = _connection_from_file (testfile, NULL, TYPE_WIRELESS, NULL);
@@ -5494,7 +5494,7 @@ test_write_wifi_wep (void)
 	nmtst_assert_connection_verifies (connection);
 
 	_writer_new_connection (connection,
-	                        TEST_SCRATCH_DIR "/network-scripts/",
+	                        TEST_SCRATCH_DIR,
 	                        &testfile);
 
 	reread = _connection_from_file (testfile, NULL, TYPE_WIRELESS, NULL);
@@ -5587,7 +5587,7 @@ test_write_wifi_wep_adhoc (void)
 	nmtst_assert_connection_verifies (connection);
 
 	_writer_new_connection (connection,
-	                        TEST_SCRATCH_DIR "/network-scripts/",
+	                        TEST_SCRATCH_DIR,
 	                        &testfile);
 
 	reread = _connection_from_file (testfile, NULL, TYPE_WIRELESS, NULL);
@@ -5672,7 +5672,7 @@ test_write_wifi_wep_passphrase (void)
 	nmtst_assert_connection_verifies (connection);
 
 	_writer_new_connection (connection,
-	                        TEST_SCRATCH_DIR "/network-scripts/",
+	                        TEST_SCRATCH_DIR,
 	                        &testfile);
 
 	reread = _connection_from_file (testfile, NULL, TYPE_WIRELESS, NULL);
@@ -5760,7 +5760,7 @@ test_write_wifi_wep_40_ascii (void)
 	nmtst_assert_connection_verifies (connection);
 
 	_writer_new_connection (connection,
-	                        TEST_SCRATCH_DIR "/network-scripts/",
+	                        TEST_SCRATCH_DIR,
 	                        &testfile);
 
 	reread = _connection_from_file (testfile, NULL, TYPE_WIRELESS, NULL);
@@ -5848,8 +5848,8 @@ test_write_wifi_wep_104_ascii (void)
 	nmtst_assert_connection_verifies (connection);
 
 	_writer_new_connec_exp (connection,
-	                        TEST_SCRATCH_DIR "/network-scripts/",
-	                        TEST_IFCFG_DIR "/network-scripts/ifcfg-Test_Write_Wifi_WEP_104_ASCII.cexpected",
+	                        TEST_SCRATCH_DIR,
+	                        TEST_IFCFG_DIR"/ifcfg-Test_Write_Wifi_WEP_104_ASCII.cexpected",
 	                        &testfile);
 
 	reread = _connection_from_file (testfile, NULL, TYPE_WIRELESS, NULL);
@@ -5933,8 +5933,8 @@ test_write_wifi_leap (void)
 	nmtst_assert_connection_verifies (connection);
 
 	_writer_new_connec_exp (connection,
-	                        TEST_SCRATCH_DIR "/network-scripts/",
-	                        TEST_IFCFG_DIR "/network-scripts/ifcfg-Test_Write_Wifi_LEAP.cexpected",
+	                        TEST_SCRATCH_DIR,
+	                        TEST_IFCFG_DIR"/ifcfg-Test_Write_Wifi_LEAP.cexpected",
 	                        &testfile);
 
 	reread = _connection_from_file (testfile, NULL, TYPE_WIRELESS, NULL);
@@ -6016,7 +6016,7 @@ test_write_wifi_leap_secret_flags (gconstpointer data)
 	nmtst_assert_connection_verifies (connection);
 
 	_writer_new_connection_FIXME (connection,
-	                              TEST_SCRATCH_DIR "/network-scripts/",
+	                              TEST_SCRATCH_DIR,
 	                              &testfile);
 
 	reread = _connection_from_file (testfile, NULL, TYPE_WIRELESS, NULL);
@@ -6124,7 +6124,7 @@ test_write_wifi_wpa_psk (gconstpointer test_data)
 	nmtst_assert_connection_verifies (connection);
 
 	_writer_new_connection (connection,
-	                        TEST_SCRATCH_DIR "/network-scripts/",
+	                        TEST_SCRATCH_DIR,
 	                        &testfile);
 
 	reread = _connection_from_file (testfile, NULL, TYPE_WIRELESS, NULL);
@@ -6220,7 +6220,7 @@ test_write_wifi_wpa_psk_adhoc (void)
 	nmtst_assert_connection_verifies (connection);
 
 	_writer_new_connection (connection,
-	                        TEST_SCRATCH_DIR "/network-scripts/",
+	                        TEST_SCRATCH_DIR,
 	                        &testfile);
 
 	reread = _connection_from_file (testfile, NULL, TYPE_WIRELESS, NULL);
@@ -6338,7 +6338,7 @@ test_write_wifi_wpa_eap_tls (void)
 	nmtst_assert_connection_verifies (connection);
 
 	_writer_new_connection (connection,
-	                        TEST_SCRATCH_DIR "/network-scripts/",
+	                        TEST_SCRATCH_DIR,
 	                        &testfile);
 
 	reread = _connection_from_file (testfile, NULL, TYPE_WIRELESS, NULL);
@@ -6465,7 +6465,7 @@ test_write_wifi_wpa_eap_ttls_tls (void)
 	nmtst_assert_connection_verifies (connection);
 
 	_writer_new_connection (connection,
-	                        TEST_SCRATCH_DIR "/network-scripts/",
+	                        TEST_SCRATCH_DIR,
 	                        &testfile);
 
 	reread = _connection_from_file (testfile, NULL, TYPE_WIRELESS, NULL);
@@ -6569,7 +6569,7 @@ test_write_wifi_wpa_eap_ttls_mschapv2 (void)
 	nmtst_assert_connection_verifies (connection);
 
 	_writer_new_connection (connection,
-	                        TEST_SCRATCH_DIR "/network-scripts/",
+	                        TEST_SCRATCH_DIR,
 	                        &testfile);
 
 	reread = _connection_from_file (testfile, NULL, TYPE_WIRELESS, NULL);
@@ -6657,7 +6657,7 @@ test_write_wifi_wpa_then_open (void)
 	nmtst_assert_connection_verifies (connection);
 
 	_writer_new_connection (connection,
-	                        TEST_SCRATCH_DIR "/network-scripts/",
+	                        TEST_SCRATCH_DIR,
 	                        &testfile);
 
 	reread = _connection_from_file (testfile, NULL, TYPE_WIRELESS, NULL);
@@ -6673,9 +6673,9 @@ test_write_wifi_wpa_then_open (void)
 
 	/* Write it back out */
 	_writer_update_connection (connection,
-	                           TEST_SCRATCH_DIR "/network-scripts/",
+	                           TEST_SCRATCH_DIR,
 	                           testfile,
-	                           TEST_IFCFG_DIR "/network-scripts/ifcfg-random_wifi_connection.cexpected");
+	                           TEST_IFCFG_DIR"/ifcfg-random_wifi_connection.cexpected");
 	keyfile = utils_get_keys_path (testfile);
 	g_assert (!g_file_test (keyfile, G_FILE_TEST_EXISTS));
 
@@ -6771,7 +6771,7 @@ test_write_wifi_wpa_then_wep_with_perms (void)
 	nmtst_assert_connection_verifies (connection);
 
 	_writer_new_connection (connection,
-	                        TEST_SCRATCH_DIR "/network-scripts/",
+	                        TEST_SCRATCH_DIR,
 	                        &testfile);
 
 	reread = _connection_from_file (testfile, NULL, TYPE_WIRELESS, NULL);
@@ -6793,9 +6793,9 @@ test_write_wifi_wpa_then_wep_with_perms (void)
 
 	/* Write it back out */
 	_writer_update_connection (connection,
-	                           TEST_SCRATCH_DIR "/network-scripts/",
+	                           TEST_SCRATCH_DIR,
 	                           testfile,
-	                           TEST_IFCFG_DIR "/network-scripts/ifcfg-random_wifi_connection_2.cexpected");
+	                           TEST_IFCFG_DIR"/ifcfg-random_wifi_connection_2.cexpected");
 
 	reread = _connection_from_file (testfile, NULL, TYPE_WIRELESS, NULL);
 
@@ -6883,7 +6883,7 @@ test_write_wifi_dynamic_wep_leap (void)
 	nmtst_assert_connection_verifies (connection);
 
 	_writer_new_connection (connection,
-	                        TEST_SCRATCH_DIR "/network-scripts/",
+	                        TEST_SCRATCH_DIR,
 	                        &testfile);
 
 	reread = _connection_from_file (testfile, NULL, TYPE_WIRELESS, NULL);
@@ -6963,7 +6963,7 @@ test_write_wired_qeth_dhcp (void)
 	nmtst_assert_connection_verifies (connection);
 
 	_writer_new_connection (connection,
-	                        TEST_SCRATCH_DIR "/network-scripts/",
+	                        TEST_SCRATCH_DIR,
 	                        &testfile);
 
 	reread = _connection_from_file (testfile, NULL, TYPE_ETHERNET, NULL);
@@ -7025,7 +7025,7 @@ test_write_wired_ctc_dhcp (void)
 	nmtst_assert_connection_verifies (connection);
 
 	_writer_new_connection (connection,
-	                        TEST_SCRATCH_DIR "/network-scripts/",
+	                        TEST_SCRATCH_DIR,
 	                        &testfile);
 
 	/* Ensure the CTCPROT item gets written out as its own option */
@@ -7095,8 +7095,8 @@ test_write_permissions (void)
 	nmtst_assert_connection_verifies (connection);
 
 	_writer_new_connec_exp (connection,
-	                        TEST_SCRATCH_DIR "/network-scripts/",
-	                        TEST_IFCFG_DIR "/network-scripts/ifcfg-Test_Write_Permissions.cexpected",
+	                        TEST_SCRATCH_DIR,
+	                        TEST_IFCFG_DIR"/ifcfg-Test_Write_Permissions.cexpected",
 	                        &testfile);
 
 	reread = _connection_from_file (testfile, NULL, TYPE_ETHERNET, NULL);
@@ -7170,7 +7170,7 @@ test_write_wifi_wep_agent_keys (void)
 	nmtst_assert_connection_verifies (connection);
 
 	_writer_new_connection_FIXME (connection,
-	                              TEST_SCRATCH_DIR "/network-scripts/",
+	                              TEST_SCRATCH_DIR,
 	                              &testfile);
 
 	reread = _connection_from_file (testfile, NULL, TYPE_WIRELESS, NULL);
@@ -7241,7 +7241,7 @@ test_write_wired_pppoe (void)
 	nmtst_assert_connection_verifies (connection);
 
 	_writer_new_connection_fail (connection,
-	                             TEST_SCRATCH_DIR "/network-scripts/",
+	                             TEST_SCRATCH_DIR,
 	                             NULL);
 
 	g_object_unref (connection);
@@ -7293,7 +7293,7 @@ test_write_vpn (void)
 	nmtst_assert_connection_verifies (connection);
 
 	_writer_new_connection_fail (connection,
-	                             TEST_SCRATCH_DIR "/network-scripts/",
+	                             TEST_SCRATCH_DIR,
 	                             NULL);
 
 	g_object_unref (connection);
@@ -7366,7 +7366,7 @@ test_write_mobile_broadband (gconstpointer data)
 	nmtst_assert_connection_verifies (connection);
 
 	_writer_new_connection_fail (connection,
-	                             TEST_SCRATCH_DIR "/network-scripts/",
+	                             TEST_SCRATCH_DIR,
 	                             NULL);
 
 	g_object_unref (connection);
@@ -7382,7 +7382,7 @@ test_read_bridge_main (void)
 	const char *mac;
 	char expected_mac_address[ETH_ALEN] = { 0x00, 0x16, 0x41, 0x11, 0x22, 0x33 };
 
-	connection = _connection_from_file (TEST_IFCFG_DIR "/network-scripts/ifcfg-test-bridge-main",
+	connection = _connection_from_file (TEST_IFCFG_DIR"/ifcfg-test-bridge-main",
 	                                    NULL, TYPE_ETHERNET, NULL);
 
 	g_assert_cmpstr (nm_connection_get_interface_name (connection), ==, "br0");
@@ -7480,7 +7480,7 @@ test_write_bridge_main (void)
 	nmtst_assert_connection_verifies_without_normalization (connection);
 
 	_writer_new_connection (connection,
-	                        TEST_SCRATCH_DIR "/network-scripts/",
+	                        TEST_SCRATCH_DIR,
 	                        &testfile);
 
 	reread = _connection_from_file (testfile, NULL, TYPE_BRIDGE, NULL);
@@ -7495,7 +7495,7 @@ test_read_bridge_component (void)
 	NMSettingConnection *s_con;
 	NMSettingBridgePort *s_port;
 
-	connection = _connection_from_file (TEST_IFCFG_DIR "/network-scripts/ifcfg-test-bridge-component",
+	connection = _connection_from_file (TEST_IFCFG_DIR"/ifcfg-test-bridge-component",
 	                                    NULL, TYPE_ETHERNET, NULL);
 
 	s_con = nm_connection_get_setting_connection (connection);
@@ -7560,8 +7560,8 @@ test_write_bridge_component (void)
 	nmtst_assert_connection_verifies (connection);
 
 	_writer_new_connec_exp (connection,
-	                        TEST_SCRATCH_DIR "/network-scripts/",
-	                        TEST_IFCFG_DIR "/network-scripts/ifcfg-Test_Write_Bridge_Component.cexpected",
+	                        TEST_SCRATCH_DIR,
+	                        TEST_IFCFG_DIR"/ifcfg-Test_Write_Bridge_Component.cexpected",
 	                        &testfile);
 
 	reread = _connection_from_file (testfile, NULL, TYPE_ETHERNET, NULL);
@@ -7575,7 +7575,7 @@ test_read_bridge_missing_stp (void)
 	NMConnection *connection;
 	NMSettingBridge *s_bridge;
 
-	connection = _connection_from_file (TEST_IFCFG_DIR"/network-scripts/ifcfg-test-bridge-missing-stp",
+	connection = _connection_from_file (TEST_IFCFG_DIR"/ifcfg-test-bridge-missing-stp",
 	                                    NULL, TYPE_BRIDGE, NULL);
 
 	g_assert_cmpstr (nm_connection_get_interface_name (connection), ==, "br0");
@@ -7589,7 +7589,7 @@ test_read_bridge_missing_stp (void)
 	g_object_unref (connection);
 }
 
-#define TEST_IFCFG_VLAN_INTERFACE TEST_IFCFG_DIR"/network-scripts/ifcfg-test-vlan-interface"
+#define TEST_IFCFG_VLAN_INTERFACE TEST_IFCFG_DIR"/ifcfg-test-vlan-interface"
 
 static void
 test_read_vlan_interface (void)
@@ -7640,7 +7640,7 @@ test_read_vlan_interface (void)
 	g_object_unref (connection);
 }
 
-#define TEST_IFCFG_VLAN_ONLY_VLANID TEST_IFCFG_DIR"/network-scripts/ifcfg-test-vlan-only-vlanid"
+#define TEST_IFCFG_VLAN_ONLY_VLANID TEST_IFCFG_DIR"/ifcfg-test-vlan-only-vlanid"
 
 static void
 test_read_vlan_only_vlan_id (void)
@@ -7668,7 +7668,7 @@ test_read_vlan_only_device (void)
 	NMConnection *connection;
 	NMSettingVlan *s_vlan;
 
-	connection = _connection_from_file (TEST_IFCFG_DIR "/network-scripts/ifcfg-test-vlan-only-device",
+	connection = _connection_from_file (TEST_IFCFG_DIR"/ifcfg-test-vlan-only-device",
 	                                    NULL, TYPE_ETHERNET, NULL);
 
 	g_assert_cmpstr (nm_connection_get_interface_name (connection), ==, "eth0.9");
@@ -7688,7 +7688,7 @@ test_read_vlan_physdev (void)
 	NMConnection *connection;
 	NMSettingVlan *s_vlan;
 
-	connection = _connection_from_file (TEST_IFCFG_DIR"/network-scripts/ifcfg-test-vlan-physdev",
+	connection = _connection_from_file (TEST_IFCFG_DIR"/ifcfg-test-vlan-physdev",
 	                                    NULL, TYPE_ETHERNET, NULL);
 
 	g_assert_cmpstr (nm_connection_get_interface_name (connection), ==, "vlan0.3");
@@ -7709,7 +7709,7 @@ test_read_vlan_reorder_hdr_1 (void)
 	NMSettingVlan *s_vlan;
 
 	NMTST_EXPECT_NM_WARN ("*REORDER_HDR key is deprecated, use VLAN_FLAGS*");
-	connection = _connection_from_file (TEST_IFCFG_DIR"/network-scripts/ifcfg-test-vlan-reorder-hdr-1",
+	connection = _connection_from_file (TEST_IFCFG_DIR"/ifcfg-test-vlan-reorder-hdr-1",
 	                                        NULL, TYPE_ETHERNET, NULL);
 	g_test_assert_expected_messages ();
 
@@ -7732,7 +7732,7 @@ test_read_vlan_reorder_hdr_2 (void)
 	NMConnection *connection;
 	NMSettingVlan *s_vlan;
 
-	connection = _connection_from_file (TEST_IFCFG_DIR"/network-scripts/ifcfg-test-vlan-reorder-hdr-2",
+	connection = _connection_from_file (TEST_IFCFG_DIR"/ifcfg-test-vlan-reorder-hdr-2",
 	                                    NULL, TYPE_ETHERNET, NULL);
 
 	g_assert_cmpstr (nm_connection_get_interface_name (connection), ==, "vlan0.3");
@@ -7754,7 +7754,7 @@ test_read_vlan_flags_1 (void)
 	NMConnection *connection;
 	NMSettingVlan *s_vlan;
 
-	connection = _connection_from_file (TEST_IFCFG_DIR"/network-scripts/ifcfg-test-vlan-flags-1",
+	connection = _connection_from_file (TEST_IFCFG_DIR"/ifcfg-test-vlan-flags-1",
 	                                    NULL, TYPE_ETHERNET, NULL);
 
 	g_assert_cmpstr (nm_connection_get_interface_name (connection), ==, "super-vlan");
@@ -7777,7 +7777,7 @@ test_read_vlan_flags_2 (void)
 	NMConnection *connection;
 	NMSettingVlan *s_vlan;
 
-	connection = _connection_from_file (TEST_IFCFG_DIR"/network-scripts/ifcfg-test-vlan-flags-2",
+	connection = _connection_from_file (TEST_IFCFG_DIR"/ifcfg-test-vlan-flags-2",
 	                                    NULL, TYPE_ETHERNET, NULL);
 
 	g_assert_cmpstr (nm_connection_get_interface_name (connection), ==, "super-vlan");
@@ -7805,8 +7805,8 @@ test_write_vlan (void)
 	                                    NULL, TYPE_VLAN, NULL);
 
 	_writer_new_connec_exp (connection,
-	                        TEST_SCRATCH_DIR "/network-scripts/",
-	                        TEST_IFCFG_DIR "/network-scripts/ifcfg-Vlan_test-vlan-interface.cexpected",
+	                        TEST_SCRATCH_DIR,
+	                        TEST_IFCFG_DIR"/ifcfg-Vlan_test-vlan-interface.cexpected",
 	                        &testfile);
 }
 
@@ -7817,11 +7817,11 @@ test_write_vlan_flags (void)
 	gs_unref_object NMConnection *connection = NULL;
 	gs_unref_object NMConnection *reread = NULL;
 
-	connection = _connection_from_file (TEST_IFCFG_DIR"/network-scripts/ifcfg-test-vlan-flags-2",
+	connection = _connection_from_file (TEST_IFCFG_DIR"/ifcfg-test-vlan-flags-2",
 	                                    NULL, TYPE_VLAN, NULL);
 
 	_writer_new_connection (connection,
-	                        TEST_SCRATCH_DIR "/network-scripts/",
+	                        TEST_SCRATCH_DIR,
 	                        &testfile);
 
 	reread = _connection_from_file (testfile, NULL, TYPE_ETHERNET, NULL);
@@ -7840,7 +7840,7 @@ test_write_vlan_only_vlanid (void)
 	                                    NULL, TYPE_VLAN, NULL);
 
 	_writer_new_connection (connection,
-	                        TEST_SCRATCH_DIR "/network-scripts/",
+	                        TEST_SCRATCH_DIR,
 	                        &testfile);
 
 	reread = _connection_from_file (testfile, NULL, TYPE_ETHERNET, NULL);
@@ -7886,8 +7886,8 @@ test_write_vlan_reorder_hdr (void)
 	              NULL);
 
 	_writer_new_connec_exp (connection,
-	                        TEST_SCRATCH_DIR "/network-scripts/",
-	                        TEST_IFCFG_DIR "/network-scripts/ifcfg-Test_Write_VLAN_reorder_hdr.cexpected",
+	                        TEST_SCRATCH_DIR,
+	                        TEST_IFCFG_DIR"/ifcfg-Test_Write_VLAN_reorder_hdr.cexpected",
 	                        &testfile);
 
 	reread = _connection_from_file (testfile, NULL, TYPE_ETHERNET, NULL);
@@ -7942,7 +7942,7 @@ test_write_ethernet_missing_ipv6 (void)
 	nmtst_assert_connection_verifies (connection);
 
 	_writer_new_connection (connection,
-	                        TEST_SCRATCH_DIR "/network-scripts/",
+	                        TEST_SCRATCH_DIR,
 	                        &testfile);
 
 	reread = _connection_from_file (testfile, NULL, TYPE_ETHERNET, NULL);
@@ -7955,7 +7955,7 @@ test_read_ibft_ignored (void)
 {
 	gs_free_error GError *error = NULL;
 
-	_connection_from_file_fail (TEST_IFCFG_DIR"/network-scripts/ifcfg-test-ibft",
+	_connection_from_file_fail (TEST_IFCFG_DIR"/ifcfg-test-ibft",
 	                            NULL, TYPE_ETHERNET, &error);
 	g_assert_error (error, NM_SETTINGS_ERROR, NM_SETTINGS_ERROR_INVALID_CONNECTION);
 }
@@ -7966,7 +7966,7 @@ test_read_bond_main (void)
 	NMConnection *connection;
 	NMSettingBond *s_bond;
 
-	connection = _connection_from_file (TEST_IFCFG_DIR "/network-scripts/ifcfg-test-bond-main",
+	connection = _connection_from_file (TEST_IFCFG_DIR"/ifcfg-test-bond-main",
 	                                    NULL, TYPE_ETHERNET,NULL);
 
 	g_assert_cmpstr (nm_connection_get_interface_name (connection), ==, "bond0");
@@ -7987,7 +7987,7 @@ test_read_bond_eth_type (void)
 	NMConnection *connection;
 	NMSettingBond *s_bond;
 
-	connection = _connection_from_file (TEST_IFCFG_DIR "/network-scripts/ifcfg-test-bond-eth-type",
+	connection = _connection_from_file (TEST_IFCFG_DIR"/ifcfg-test-bond-eth-type",
 	                                    NULL, TYPE_ETHERNET,NULL);
 
 	g_assert_cmpstr (nm_connection_get_interface_name (connection), ==, "bond0");
@@ -8071,8 +8071,8 @@ test_write_bond_main (void)
 	nmtst_assert_connection_verifies_without_normalization (connection);
 
 	_writer_new_connec_exp (connection,
-	                        TEST_SCRATCH_DIR "/network-scripts/",
-	                        TEST_IFCFG_DIR "/network-scripts/ifcfg-Test_Write_Bond_Main.cexpected",
+	                        TEST_SCRATCH_DIR,
+	                        TEST_IFCFG_DIR"/ifcfg-Test_Write_Bond_Main.cexpected",
 	                        &testfile);
 
 	reread = _connection_from_file (testfile, NULL, TYPE_BOND, NULL);
@@ -8086,7 +8086,7 @@ test_read_bond_slave (void)
 	NMConnection *connection;
 	NMSettingConnection *s_con;
 
-	connection = _connection_from_file (TEST_IFCFG_DIR "/network-scripts/ifcfg-test-bond-slave",
+	connection = _connection_from_file (TEST_IFCFG_DIR"/ifcfg-test-bond-slave",
 	                                    NULL, TYPE_ETHERNET, NULL);
 	g_test_assert_expected_messages ();
 
@@ -8138,7 +8138,7 @@ test_write_bond_slave (void)
 	nmtst_assert_connection_verifies (connection);
 
 	_writer_new_connection (connection,
-	                        TEST_SCRATCH_DIR "/network-scripts/",
+	                        TEST_SCRATCH_DIR,
 	                        &testfile);
 
 	reread = _connection_from_file (testfile, NULL, TYPE_ETHERNET, NULL);
@@ -8156,7 +8156,7 @@ test_read_infiniband (void)
 	char expected_mac_address[INFINIBAND_ALEN] = { 0x80, 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff, 0x00, 0x11, 0x22 };
 	const char *transport_mode;
 
-	connection = _connection_from_file (TEST_IFCFG_DIR "/network-scripts/ifcfg-test-infiniband",
+	connection = _connection_from_file (TEST_IFCFG_DIR"/ifcfg-test-infiniband",
 	                                    NULL, TYPE_INFINIBAND, &unmanaged);
 	g_assert (!unmanaged);
 
@@ -8242,7 +8242,7 @@ test_write_infiniband (void)
 	nmtst_assert_connection_verifies (connection);
 
 	_writer_new_connection (connection,
-	                        TEST_SCRATCH_DIR "/network-scripts/",
+	                        TEST_SCRATCH_DIR,
 	                        &testfile);
 
 	reread = _connection_from_file (testfile, NULL, TYPE_INFINIBAND, NULL);
@@ -8256,7 +8256,7 @@ test_read_bond_slave_ib (void)
 	gs_unref_object NMConnection *connection = NULL;
 	NMSettingConnection *s_con;
 
-	connection = _connection_from_file (TEST_IFCFG_DIR "/network-scripts/ifcfg-test-bond-slave-ib",
+	connection = _connection_from_file (TEST_IFCFG_DIR"/ifcfg-test-bond-slave-ib",
 	                                    NULL, NULL, NULL);
 
 	s_con = nm_connection_get_setting_connection (connection);
@@ -8304,7 +8304,7 @@ test_write_bond_slave_ib (void)
 	nmtst_assert_connection_verifies (connection);
 
 	_writer_new_connection (connection,
-	                        TEST_SCRATCH_DIR "/network-scripts/",
+	                        TEST_SCRATCH_DIR,
 	                        &testfile);
 
 	reread = _connection_from_file (testfile, NULL, NULL, NULL);
@@ -8319,7 +8319,7 @@ test_read_bond_opts_mode_numeric (void)
 	NMSettingConnection *s_con;
 	NMSettingBond *s_bond;
 
-	connection = _connection_from_file (TEST_IFCFG_DIR "/network-scripts/ifcfg-test-bond-mode-numeric",
+	connection = _connection_from_file (TEST_IFCFG_DIR"/ifcfg-test-bond-mode-numeric",
 	                                    NULL, TYPE_ETHERNET, NULL);
 
 	g_assert_cmpstr (nm_connection_get_interface_name (connection), ==, "bond0");
@@ -8352,7 +8352,7 @@ test_read_dcb_basic (void)
 	guint expected_traffic_classes[8] = { 7, 6, 5, 4, 3, 2, 1, 0 };
 	gboolean expected_pfcs[8] = { TRUE, FALSE, FALSE, TRUE, TRUE, FALSE, TRUE, FALSE };
 
-	connection = _connection_from_file (TEST_IFCFG_DIR "/network-scripts/ifcfg-test-dcb",
+	connection = _connection_from_file (TEST_IFCFG_DIR"/ifcfg-test-dcb",
 	                                    NULL, TYPE_ETHERNET, NULL);
 
 	s_dcb = nm_connection_get_setting_dcb (connection);
@@ -8466,8 +8466,8 @@ test_write_dcb_basic (void)
 	nmtst_assert_connection_verifies (connection);
 
 	_writer_new_connec_exp (connection,
-	                        TEST_SCRATCH_DIR "/network-scripts/",
-	                        TEST_IFCFG_DIR "/network-scripts//ifcfg-dcb-test.cexpected",
+	                        TEST_SCRATCH_DIR,
+	                        TEST_IFCFG_DIR"//ifcfg-dcb-test.cexpected",
 	                        &testfile);
 
 	reread = _connection_from_file (testfile, NULL, TYPE_ETHERNET, NULL);
@@ -8481,7 +8481,7 @@ test_read_dcb_default_app_priorities (void)
 	gs_unref_object NMConnection *connection = NULL;
 	NMSettingDcb *s_dcb;
 
-	connection = _connection_from_file (TEST_IFCFG_DIR "/network-scripts/ifcfg-test-dcb-default-app-priorities",
+	connection = _connection_from_file (TEST_IFCFG_DIR"/ifcfg-test-dcb-default-app-priorities",
 	                                    NULL, TYPE_ETHERNET, NULL);
 
 	s_dcb = nm_connection_get_setting_dcb (connection);
@@ -8503,7 +8503,7 @@ test_read_dcb_bad_booleans (void)
 	gs_free_error GError *error = NULL;
 
 	NMTST_EXPECT_NM_WARN ("*invalid DCB_PG_STRICT value*not all 0s and 1s*");
-	_connection_from_file_fail (TEST_IFCFG_DIR "/network-scripts/ifcfg-test-dcb-bad-booleans",
+	_connection_from_file_fail (TEST_IFCFG_DIR"/ifcfg-test-dcb-bad-booleans",
 	                            NULL, TYPE_ETHERNET, &error);
 	g_test_assert_expected_messages ();
 
@@ -8517,7 +8517,7 @@ test_read_dcb_short_booleans (void)
 	gs_free_error GError *error = NULL;
 
 	NMTST_EXPECT_NM_WARN ("*DCB_PG_STRICT value*8 characters*");
-	_connection_from_file_fail (TEST_IFCFG_DIR "/network-scripts/ifcfg-test-dcb-short-booleans",
+	_connection_from_file_fail (TEST_IFCFG_DIR"/ifcfg-test-dcb-short-booleans",
 	                            NULL, TYPE_ETHERNET, &error);
 	g_test_assert_expected_messages ();
 
@@ -8531,7 +8531,7 @@ test_read_dcb_bad_uints (void)
 	gs_free_error GError *error = NULL;
 
 	NMTST_EXPECT_NM_WARN ("*invalid DCB_PG_UP2TC value*not 0 - 7*");
-	_connection_from_file_fail (TEST_IFCFG_DIR "/network-scripts/ifcfg-test-dcb-bad-uints",
+	_connection_from_file_fail (TEST_IFCFG_DIR"/ifcfg-test-dcb-bad-uints",
 	                            NULL, TYPE_ETHERNET, &error);
 	g_test_assert_expected_messages ();
 
@@ -8545,7 +8545,7 @@ test_read_dcb_short_uints (void)
 	gs_free_error GError *error = NULL;
 
 	NMTST_EXPECT_NM_WARN ("*DCB_PG_UP2TC value*8 characters*");
-	_connection_from_file_fail (TEST_IFCFG_DIR "/network-scripts/ifcfg-test-dcb-short-uints",
+	_connection_from_file_fail (TEST_IFCFG_DIR"/ifcfg-test-dcb-short-uints",
 	                            NULL, TYPE_ETHERNET, &error);
 	g_test_assert_expected_messages ();
 
@@ -8559,7 +8559,7 @@ test_read_dcb_bad_percent (void)
 	gs_free_error GError *error = NULL;
 
 	NMTST_EXPECT_NM_WARN ("*invalid DCB_PG_PCT percentage value*");
-	_connection_from_file_fail (TEST_IFCFG_DIR "/network-scripts/ifcfg-test-dcb-bad-percent",
+	_connection_from_file_fail (TEST_IFCFG_DIR"/ifcfg-test-dcb-bad-percent",
 	                            NULL, TYPE_ETHERNET, &error);
 	g_test_assert_expected_messages ();
 
@@ -8573,7 +8573,7 @@ test_read_dcb_short_percent (void)
 	gs_free_error GError *error = NULL;
 
 	NMTST_EXPECT_NM_WARN ("*invalid DCB_PG_PCT percentage list value*");
-	_connection_from_file_fail (TEST_IFCFG_DIR "/network-scripts/ifcfg-test-dcb-short-percent",
+	_connection_from_file_fail (TEST_IFCFG_DIR"/ifcfg-test-dcb-short-percent",
 	                            NULL, TYPE_ETHERNET, &error);
 	g_test_assert_expected_messages ();
 
@@ -8587,7 +8587,7 @@ test_read_dcb_pgpct_not_100 (void)
 	gs_free_error GError *error = NULL;
 
 	NMTST_EXPECT_NM_WARN ("*DCB_PG_PCT percentages do not equal 100*");
-	_connection_from_file_fail (TEST_IFCFG_DIR "/network-scripts/ifcfg-test-dcb-pgpct-not-100",
+	_connection_from_file_fail (TEST_IFCFG_DIR"/ifcfg-test-dcb-pgpct-not-100",
 	                            NULL, TYPE_ETHERNET, &error);
 	g_test_assert_expected_messages ();
 
@@ -8603,7 +8603,7 @@ test_read_fcoe_mode (gconstpointer user_data)
 	const char *expected_mode = user_data;
 	NMSettingDcb *s_dcb;
 
-	file = g_strdup_printf (TEST_IFCFG_DIR "/network-scripts/ifcfg-test-fcoe-%s", expected_mode);
+	file = g_strdup_printf (TEST_IFCFG_DIR"/ifcfg-test-fcoe-%s", expected_mode);
 	connection = _connection_from_file (file, NULL, TYPE_ETHERNET, NULL);
 
 	s_dcb = nm_connection_get_setting_dcb (connection);
@@ -8663,7 +8663,7 @@ test_write_fcoe_mode (gconstpointer user_data)
 	nmtst_assert_connection_verifies (connection);
 
 	_writer_new_connection (connection,
-	                        TEST_SCRATCH_DIR "/network-scripts/",
+	                        TEST_SCRATCH_DIR,
 	                        &testfile);
 
 	ifcfg = _svOpenFile (testfile);
@@ -8784,7 +8784,7 @@ test_write_team_master (void)
 	nmtst_assert_connection_verifies_without_normalization (connection);
 
 	_writer_new_connection (connection,
-	                        TEST_SCRATCH_DIR "/network-scripts/",
+	                        TEST_SCRATCH_DIR,
 	                        &testfile);
 
 	f = _svOpenFile (testfile);
@@ -8858,8 +8858,8 @@ test_write_team_port (void)
 	nmtst_assert_connection_verifies (connection);
 
 	_writer_new_connec_exp (connection,
-	                        TEST_SCRATCH_DIR "/network-scripts/",
-	                        TEST_IFCFG_DIR "/network-scripts/ifcfg-Test_Write_Team_Port.cexpected",
+	                        TEST_SCRATCH_DIR,
+	                        TEST_IFCFG_DIR"/ifcfg-Test_Write_Team_Port.cexpected",
 	                        &testfile);
 
 	f = _svOpenFile (testfile);
@@ -8915,8 +8915,8 @@ test_write_team_infiniband_port (void)
 	nmtst_assert_connection_verifies (connection);
 
 	_writer_new_connec_exp (connection,
-	                        TEST_SCRATCH_DIR "/network-scripts/",
-	                        TEST_IFCFG_DIR "/network-scripts/ifcfg-Test_Write_Team_Infiniband_Port.cexpected",
+	                        TEST_SCRATCH_DIR,
+	                        TEST_IFCFG_DIR"/ifcfg-Test_Write_Team_Infiniband_Port.cexpected",
 	                        &testfile);
 
 	f = _svOpenFile (testfile);
@@ -8938,7 +8938,7 @@ test_read_team_port_empty_config (void)
 	NMConnection *connection;
 	NMSettingConnection *s_con;
 
-	connection = _connection_from_file (TEST_IFCFG_DIR"/network-scripts/ifcfg-test-team-port-empty-config",
+	connection = _connection_from_file (TEST_IFCFG_DIR"/ifcfg-test-team-port-empty-config",
 	                                    NULL, TYPE_ETHERNET, NULL);
 
 	s_con = nm_connection_get_setting_connection (connection);
@@ -9003,9 +9003,9 @@ test_team_reread_slave (void)
 	nmtst_assert_connection_equals (connection_1, FALSE, connection_2, FALSE);
 
 	_writer_new_connection_reread ((nmtst_get_rand_int () % 2) ? connection_1 : connection_2,
-	                               TEST_SCRATCH_DIR "/network-scripts/",
+	                               TEST_SCRATCH_DIR,
 	                               &testfile,
-	                               TEST_IFCFG_DIR "/network-scripts/ifcfg-team-slave-enp31s0f1-142.cexpected",
+	                               TEST_IFCFG_DIR"/ifcfg-team-slave-enp31s0f1-142.cexpected",
 	                               &reread,
 	                               &reread_same);
 	_assert_reread_same ((nmtst_get_rand_int () % 2) ? connection_1 : connection_2, reread);
@@ -9026,7 +9026,7 @@ test_read_proxy_basic (void)
 
 	/* Test basic proxy configuration */
 
-	connection = _connection_from_file (TEST_IFCFG_DIR"/network-scripts/ifcfg-test-read-proxy-basic",
+	connection = _connection_from_file (TEST_IFCFG_DIR"/ifcfg-test-read-proxy-basic",
 	                                    NULL, TYPE_ETHERNET, NULL);
 
 	/* ===== Proxy setting ===== */
@@ -9078,8 +9078,8 @@ test_write_proxy_basic (void)
 	nmtst_assert_connection_verifies (connection);
 
 	_writer_new_connec_exp (connection,
-	                        TEST_SCRATCH_DIR "/network-scripts/",
-	                        TEST_IFCFG_DIR "/network-scripts/ifcfg-Test_Write_Proxy_Basic.cexpected",
+	                        TEST_SCRATCH_DIR,
+	                        TEST_IFCFG_DIR"/ifcfg-Test_Write_Proxy_Basic.cexpected",
 	                        &testfile);
 
 	f = _svOpenFile (testfile);
@@ -9474,7 +9474,7 @@ test_write_unknown (gconstpointer test_data)
 static void
 test_read_vlan_trailing_spaces (void)
 {
-	const char *testfile = TEST_IFCFG_DIR"/network-scripts/ifcfg-test-vlan-trailing-spaces";
+	const char *testfile = TEST_IFCFG_DIR"/ifcfg-test-vlan-trailing-spaces";
 	NMConnection *connection;
 	gboolean success;
 	GError *error = NULL;
@@ -9512,7 +9512,7 @@ test_sit_read_ignore (void)
 {
 	gs_free_error GError *error = NULL;
 
-	_connection_from_file_fail (TEST_IFCFG_DIR "/network-scripts/ifcfg-test-sit-ignore",
+	_connection_from_file_fail (TEST_IFCFG_DIR"/ifcfg-test-sit-ignore",
 	                            NULL, TYPE_ETHERNET, &error);
 	nmtst_assert_error (error, 0, 0, "*Ignoring unsupported connection due to IPV6TUNNELIPV4*");
 }
@@ -9641,7 +9641,7 @@ test_tc_read (void)
 	NMTCTfilter *filter;
 	char *str;
 
-	connection = _connection_from_file (TEST_IFCFG_DIR "/network-scripts/ifcfg-test-tc",
+	connection = _connection_from_file (TEST_IFCFG_DIR"/ifcfg-test-tc",
 	                                    NULL, TYPE_ETHERNET,NULL);
 
 	g_assert_cmpstr (nm_connection_get_interface_name (connection), ==, "eth0");
@@ -9742,8 +9742,8 @@ test_tc_write (void)
 	nmtst_assert_connection_verifies_without_normalization (connection);
 
 	_writer_new_connec_exp (connection,
-	                        TEST_SCRATCH_DIR "/network-scripts/",
-	                        TEST_IFCFG_DIR "/network-scripts/ifcfg-test-tc-write.cexpected",
+	                        TEST_SCRATCH_DIR,
+	                        TEST_IFCFG_DIR"/ifcfg-test-tc-write.cexpected",
 	                        &testfile);
 
 	reread = _connection_from_file (testfile, NULL, TYPE_BOND, NULL);
@@ -9755,8 +9755,8 @@ test_tc_write (void)
 
 #define TPATH "/settings/plugins/ifcfg-rh/"
 
-#define TEST_IFCFG_WIFI_OPEN_SSID_LONG_QUOTED TEST_IFCFG_DIR"/network-scripts/ifcfg-test-wifi-open-ssid-long-quoted"
-#define TEST_IFCFG_WIFI_OPEN_SSID_LONG_HEX TEST_IFCFG_DIR"/network-scripts/ifcfg-test-wifi-open-ssid-long-hex"
+#define TEST_IFCFG_WIFI_OPEN_SSID_LONG_QUOTED TEST_IFCFG_DIR"/ifcfg-test-wifi-open-ssid-long-quoted"
+#define TEST_IFCFG_WIFI_OPEN_SSID_LONG_HEX TEST_IFCFG_DIR"/ifcfg-test-wifi-open-ssid-long-hex"
 
 #define DEFAULT_HEX_PSK "7d308b11df1b4243b0f78e5f3fc68cdbb9a264ed0edf4c188edf329ff5b467f0"
 
@@ -9771,10 +9771,10 @@ int main (int argc, char **argv)
 
 	g_test_add_func (TPATH "svUnescape", test_svUnescape);
 
-	g_test_add_data_func (TPATH "write-unknown/1", TEST_IFCFG_DIR"/network-scripts/ifcfg-test-write-unknown-1", test_write_unknown);
-	g_test_add_data_func (TPATH "write-unknown/2", TEST_IFCFG_DIR"/network-scripts/ifcfg-test-write-unknown-2", test_write_unknown);
-	g_test_add_data_func (TPATH "write-unknown/3", TEST_IFCFG_DIR"/network-scripts/ifcfg-test-write-unknown-3", test_write_unknown);
-	g_test_add_data_func (TPATH "write-unknown/4", TEST_IFCFG_DIR"/network-scripts/ifcfg-test-write-unknown-4", test_write_unknown);
+	g_test_add_data_func (TPATH "write-unknown/1", TEST_IFCFG_DIR"/ifcfg-test-write-unknown-1", test_write_unknown);
+	g_test_add_data_func (TPATH "write-unknown/2", TEST_IFCFG_DIR"/ifcfg-test-write-unknown-2", test_write_unknown);
+	g_test_add_data_func (TPATH "write-unknown/3", TEST_IFCFG_DIR"/ifcfg-test-write-unknown-3", test_write_unknown);
+	g_test_add_data_func (TPATH "write-unknown/4", TEST_IFCFG_DIR"/ifcfg-test-write-unknown-4", test_write_unknown);
 
 	g_test_add_func (TPATH "vlan-trailing-spaces", test_read_vlan_trailing_spaces);
 
@@ -9794,8 +9794,8 @@ int main (int argc, char **argv)
 	g_test_add_func (TPATH "read-dns-options", test_read_dns_options);
 	g_test_add_func (TPATH "clear-master", test_clear_master);
 
-	nmtst_add_test_func (TPATH "read-static",           test_read_wired_static, TEST_IFCFG_DIR"/network-scripts/ifcfg-test-wired-static",           "System test-wired-static",           GINT_TO_POINTER (TRUE));
-	nmtst_add_test_func (TPATH "read-static-bootproto", test_read_wired_static, TEST_IFCFG_DIR"/network-scripts/ifcfg-test-wired-static-bootproto", "System test-wired-static-bootproto", GINT_TO_POINTER (FALSE));
+	nmtst_add_test_func (TPATH "read-static",           test_read_wired_static, TEST_IFCFG_DIR"/ifcfg-test-wired-static",           "System test-wired-static",           GINT_TO_POINTER (TRUE));
+	nmtst_add_test_func (TPATH "read-static-bootproto", test_read_wired_static, TEST_IFCFG_DIR"/ifcfg-test-wired-static-bootproto", "System test-wired-static-bootproto", GINT_TO_POINTER (FALSE));
 
 	g_test_add_func (TPATH "read-netmask-1", test_read_netmask_1);
 
@@ -9813,17 +9813,17 @@ int main (int argc, char **argv)
 	g_test_add_func (TPATH "routes/read-static", test_read_wired_static_routes);
 	g_test_add_func (TPATH "routes/read-static-legacy", test_read_wired_static_routes_legacy);
 
-	nmtst_add_test_func (TPATH "wired/read/manual/1", test_read_wired_ipv4_manual, TEST_IFCFG_DIR "/network-scripts/ifcfg-test-wired-ipv4-manual-1", "System test-wired-ipv4-manual-1");
-	nmtst_add_test_func (TPATH "wired/read/manual/2", test_read_wired_ipv4_manual, TEST_IFCFG_DIR "/network-scripts/ifcfg-test-wired-ipv4-manual-2", "System test-wired-ipv4-manual-2");
-	nmtst_add_test_func (TPATH "wired/read/manual/3", test_read_wired_ipv4_manual, TEST_IFCFG_DIR "/network-scripts/ifcfg-test-wired-ipv4-manual-3", "System test-wired-ipv4-manual-3");
-	nmtst_add_test_func (TPATH "wired/read/manual/4", test_read_wired_ipv4_manual, TEST_IFCFG_DIR "/network-scripts/ifcfg-test-wired-ipv4-manual-4", "System test-wired-ipv4-manual-4");
+	nmtst_add_test_func (TPATH "wired/read/manual/1", test_read_wired_ipv4_manual, TEST_IFCFG_DIR"/ifcfg-test-wired-ipv4-manual-1", "System test-wired-ipv4-manual-1");
+	nmtst_add_test_func (TPATH "wired/read/manual/2", test_read_wired_ipv4_manual, TEST_IFCFG_DIR"/ifcfg-test-wired-ipv4-manual-2", "System test-wired-ipv4-manual-2");
+	nmtst_add_test_func (TPATH "wired/read/manual/3", test_read_wired_ipv4_manual, TEST_IFCFG_DIR"/ifcfg-test-wired-ipv4-manual-3", "System test-wired-ipv4-manual-3");
+	nmtst_add_test_func (TPATH "wired/read/manual/4", test_read_wired_ipv4_manual, TEST_IFCFG_DIR"/ifcfg-test-wired-ipv4-manual-4", "System test-wired-ipv4-manual-4");
 
 	g_test_add_func (TPATH "user/1", test_user_1);
 
 	g_test_add_func (TPATH "wired/ipv6-manual", test_read_wired_ipv6_manual);
 
-	nmtst_add_test_func (TPATH "wired-ipv6-only/0", test_read_wired_ipv6_only, TEST_IFCFG_DIR"/network-scripts/ifcfg-test-wired-ipv6-only",   "System test-wired-ipv6-only");
-	nmtst_add_test_func (TPATH "wired-ipv6-only/1", test_read_wired_ipv6_only, TEST_IFCFG_DIR"/network-scripts/ifcfg-test-wired-ipv6-only-1", "System test-wired-ipv6-only-1");
+	nmtst_add_test_func (TPATH "wired-ipv6-only/0", test_read_wired_ipv6_only, TEST_IFCFG_DIR"/ifcfg-test-wired-ipv6-only",   "System test-wired-ipv6-only");
+	nmtst_add_test_func (TPATH "wired-ipv6-only/1", test_read_wired_ipv6_only, TEST_IFCFG_DIR"/ifcfg-test-wired-ipv6-only-1", "System test-wired-ipv6-only-1");
 
 	g_test_add_func (TPATH "wired/dhcpv6-only", test_read_wired_dhcp6_only);
 	g_test_add_func (TPATH "wired/autoip", test_read_wired_autoip);
@@ -9831,8 +9831,8 @@ int main (int argc, char **argv)
 	g_test_add_func (TPATH "wired/no-ip", test_read_noip);
 	g_test_add_func (TPATH "802-1x/peap/mschapv2", test_read_wired_8021x_peap_mschapv2);
 
-	nmtst_add_test_func (TPATH "test-wired-8021x-tls/agent",  test_read_wired_8021x_tls_secret_flags, TEST_IFCFG_DIR"/network-scripts/ifcfg-test-wired-8021x-tls-agent", GINT_TO_POINTER (NM_SETTING_SECRET_FLAG_AGENT_OWNED));
-	nmtst_add_test_func (TPATH "test-wired-8021x-tls/always", test_read_wired_8021x_tls_secret_flags, TEST_IFCFG_DIR"/network-scripts/ifcfg-test-wired-8021x-tls-always", GINT_TO_POINTER (NM_SETTING_SECRET_FLAG_AGENT_OWNED | NM_SETTING_SECRET_FLAG_NOT_SAVED));
+	nmtst_add_test_func (TPATH "test-wired-8021x-tls/agent",  test_read_wired_8021x_tls_secret_flags, TEST_IFCFG_DIR"/ifcfg-test-wired-8021x-tls-agent", GINT_TO_POINTER (NM_SETTING_SECRET_FLAG_AGENT_OWNED));
+	nmtst_add_test_func (TPATH "test-wired-8021x-tls/always", test_read_wired_8021x_tls_secret_flags, TEST_IFCFG_DIR"/ifcfg-test-wired-8021x-tls-always", GINT_TO_POINTER (NM_SETTING_SECRET_FLAG_AGENT_OWNED | NM_SETTING_SECRET_FLAG_NOT_SAVED));
 
 	g_test_add_func (TPATH "802-1x/subj-matches", test_read_write_802_1X_subj_matches);
 	g_test_add_func (TPATH "802-1x/ttls-eapgtc", test_read_802_1x_ttls_eapgtc);
@@ -9855,8 +9855,8 @@ int main (int argc, char **argv)
 	g_test_add_func (TPATH "wifi/read/wep/104-ascii", test_read_wifi_wep_104_ascii);
 	g_test_add_func (TPATH "wifi/read/leap", test_read_wifi_leap);
 
-	nmtst_add_test_func (TPATH "wifi-leap-secret-flags/agent", test_read_wifi_leap_secret_flags, TEST_IFCFG_DIR "/network-scripts/ifcfg-test-wifi-leap-agent",      GINT_TO_POINTER (NM_SETTING_SECRET_FLAG_AGENT_OWNED));
-	nmtst_add_test_func (TPATH "wifi-leap-secret-flags/ask",   test_read_wifi_leap_secret_flags, TEST_IFCFG_DIR "/network-scripts/ifcfg-test-wifi-leap-always-ask", GINT_TO_POINTER (NM_SETTING_SECRET_FLAG_AGENT_OWNED | NM_SETTING_SECRET_FLAG_NOT_SAVED));
+	nmtst_add_test_func (TPATH "wifi-leap-secret-flags/agent", test_read_wifi_leap_secret_flags, TEST_IFCFG_DIR"/ifcfg-test-wifi-leap-agent",      GINT_TO_POINTER (NM_SETTING_SECRET_FLAG_AGENT_OWNED));
+	nmtst_add_test_func (TPATH "wifi-leap-secret-flags/ask",   test_read_wifi_leap_secret_flags, TEST_IFCFG_DIR"/ifcfg-test-wifi-leap-always-ask", GINT_TO_POINTER (NM_SETTING_SECRET_FLAG_AGENT_OWNED | NM_SETTING_SECRET_FLAG_NOT_SAVED));
 
 	g_test_add_func (TPATH "wifi/read/wpa-psk", test_read_wifi_wpa_psk);
 	g_test_add_func (TPATH "wifi/read/wpa-psk/2", test_read_wifi_wpa_psk_2);
@@ -10005,12 +10005,12 @@ int main (int argc, char **argv)
 	g_test_add_func (TPATH "bridge/write-component", test_write_bridge_component);
 	g_test_add_func (TPATH "bridge/read-missing-stp", test_read_bridge_missing_stp);
 
-	g_test_add_data_func (TPATH "team/read-master-1", TEST_IFCFG_DIR"/network-scripts/ifcfg-test-team-master-1", test_read_team_master);
-	g_test_add_data_func (TPATH "team/read-master-2", TEST_IFCFG_DIR"/network-scripts/ifcfg-test-team-master-2", test_read_team_master);
-	g_test_add_data_func (TPATH "team/read-master-invalid", TEST_IFCFG_DIR"/network-scripts/ifcfg-test-team-master-invalid", test_read_team_master_invalid);
+	g_test_add_data_func (TPATH "team/read-master-1", TEST_IFCFG_DIR"/ifcfg-test-team-master-1", test_read_team_master);
+	g_test_add_data_func (TPATH "team/read-master-2", TEST_IFCFG_DIR"/ifcfg-test-team-master-2", test_read_team_master);
+	g_test_add_data_func (TPATH "team/read-master-invalid", TEST_IFCFG_DIR"/ifcfg-test-team-master-invalid", test_read_team_master_invalid);
 	g_test_add_func (TPATH "team/write-master", test_write_team_master);
-	g_test_add_data_func (TPATH "team/read-port-1", TEST_IFCFG_DIR"/network-scripts/ifcfg-test-team-port-1", test_read_team_port);
-	g_test_add_data_func (TPATH "team/read-port-2", TEST_IFCFG_DIR"/network-scripts/ifcfg-test-team-port-2", test_read_team_port);
+	g_test_add_data_func (TPATH "team/read-port-1", TEST_IFCFG_DIR"/ifcfg-test-team-port-1", test_read_team_port);
+	g_test_add_data_func (TPATH "team/read-port-2", TEST_IFCFG_DIR"/ifcfg-test-team-port-2", test_read_team_port);
 	g_test_add_func (TPATH "team/write-port", test_write_team_port);
 	g_test_add_func (TPATH "team/write-infiniband-port", test_write_team_infiniband_port);
 	g_test_add_func (TPATH "team/read-port-empty-config", test_read_team_port_empty_config);
diff --git a/src/settings/plugins/ifupdown/meson.build b/src/settings/plugins/ifupdown/meson.build
index 87b5bea2..fd028f4d 100644
--- a/src/settings/plugins/ifupdown/meson.build
+++ b/src/settings/plugins/ifupdown/meson.build
@@ -31,7 +31,7 @@ libnm_settings_plugin_ifupdown = shared_module(
   link_args: ldflags_linker_script_settings,
   link_depends: linker_script_settings,
   install: true,
-  install_dir: nm_pkglibdir
+  install_dir: nm_plugindir
 )
 
 core_plugins += libnm_settings_plugin_ifupdown
diff --git a/src/settings/plugins/ifupdown/nms-ifupdown-interface-parser.c b/src/settings/plugins/ifupdown/nms-ifupdown-interface-parser.c
index 014998a6..94a65ecb 100644
--- a/src/settings/plugins/ifupdown/nms-ifupdown-interface-parser.c
+++ b/src/settings/plugins/ifupdown/nms-ifupdown-interface-parser.c
@@ -126,7 +126,6 @@ _recursive_ifparser (const char *eni_file, int quiet)
 	if (!quiet)
 		nm_log_info (LOGD_SETTINGS, "      interface-parser: parsing file %s\n", eni_file);
 
-
 	while (!feof(inp))
 	{
 		char *token[128]; /* 255 chars can only be split into 127 tokens */
diff --git a/src/settings/plugins/ifupdown/nms-ifupdown-interface-parser.h b/src/settings/plugins/ifupdown/nms-ifupdown-interface-parser.h
index bf9c4465..7e6c8e34 100644
--- a/src/settings/plugins/ifupdown/nms-ifupdown-interface-parser.h
+++ b/src/settings/plugins/ifupdown/nms-ifupdown-interface-parser.h
@@ -20,7 +20,6 @@
  * (C) Copyright 2004 Tom Parker
  */
 
-
 #ifndef _INTERFACE_PARSER_H
 #define _INTERFACE_PARSER_H
 
diff --git a/src/settings/plugins/ifupdown/nms-ifupdown-parser.c b/src/settings/plugins/ifupdown/nms-ifupdown-parser.c
index 99879c92..884c6591 100644
--- a/src/settings/plugins/ifupdown/nms-ifupdown-parser.c
+++ b/src/settings/plugins/ifupdown/nms-ifupdown-parser.c
@@ -37,7 +37,6 @@
 #include "nms-ifupdown-plugin.h"
 #include "nms-ifupdown-parser.h"
 
-
 static const gchar*
 _ifupdownplugin_guess_connection_type (if_block *block)
 {
@@ -63,7 +62,6 @@ _ifupdownplugin_guess_connection_type (if_block *block)
 	return ret_type;
 }
 
-
 struct _Mapping {
 	const gchar *domain;
 	const gpointer target;
@@ -340,7 +338,7 @@ update_wireless_security_setting_from_if_block(NMConnection *connection,
 			}
 
 			g_object_set(wireless_security_setting,
-					   newkey, typed_property_value ? typed_property_value : property_value,
+					   newkey, typed_property_value ?: property_value,
 					   NULL);
 			security = TRUE;
 
@@ -388,7 +386,7 @@ update_wireless_security_setting_from_if_block(NMConnection *connection,
 			}
 
 			g_object_set(wireless_security_setting,
-					   newkey, typed_property_value ? typed_property_value : property_value,
+					   newkey, typed_property_value ?: property_value,
 					   NULL);
 			security = TRUE;
 
@@ -401,7 +399,6 @@ update_wireless_security_setting_from_if_block(NMConnection *connection,
 		curr = curr->next;
 	}
 
-
 	if (security)
 		nm_connection_add_setting (connection, NM_SETTING (wireless_security_setting));
 }
diff --git a/src/settings/plugins/ifupdown/nms-ifupdown-plugin.c b/src/settings/plugins/ifupdown/nms-ifupdown-plugin.c
index bfad9d15..8bd72d02 100644
--- a/src/settings/plugins/ifupdown/nms-ifupdown-plugin.c
+++ b/src/settings/plugins/ifupdown/nms-ifupdown-plugin.c
@@ -50,9 +50,6 @@
 
 #define ENI_INTERFACES_FILE "/etc/network/interfaces"
 
-#define IFUPDOWN_PLUGIN_NAME "ifupdown"
-#define IFUPDOWN_PLUGIN_INFO "(C) 2008 Canonical Ltd.  To report bugs please use the NetworkManager mailing list."
-
 #define IFUPDOWN_UNMANAGE_WELL_KNOWN_DEFAULT TRUE
 
 /* #define ALWAYS_UNMANAGE TRUE */
@@ -303,28 +300,6 @@ get_unmanaged_specs (NMSettingsPlugin *config)
 /*****************************************************************************/
 
 static void
-get_property (GObject *object, guint prop_id,
-              GValue *value, GParamSpec *pspec)
-{
-	switch (prop_id) {
-	case NM_SETTINGS_PLUGIN_PROP_NAME:
-		g_value_set_string (value, IFUPDOWN_PLUGIN_NAME);
-		break;
-	case NM_SETTINGS_PLUGIN_PROP_INFO:
-		g_value_set_string (value, IFUPDOWN_PLUGIN_INFO);
-		break;
-	case NM_SETTINGS_PLUGIN_PROP_CAPABILITIES:
-		g_value_set_uint (value, NM_SETTINGS_PLUGIN_CAP_NONE);
-		break;
-	default:
-		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
-		break;
-	}
-}
-
-/*****************************************************************************/
-
-static void
 _udev_device_unref (gpointer ptr)
 {
 	udev_device_unref (ptr);
@@ -513,19 +488,6 @@ settings_plugin_ifupdown_class_init (SettingsPluginIfupdownClass *req_class)
 	GObjectClass *object_class = G_OBJECT_CLASS (req_class);
 
 	object_class->dispose = dispose;
-	object_class->get_property = get_property;
-
-	g_object_class_override_property (object_class,
-	                                  NM_SETTINGS_PLUGIN_PROP_NAME,
-	                                  NM_SETTINGS_PLUGIN_NAME);
-
-	g_object_class_override_property (object_class,
-	                                  NM_SETTINGS_PLUGIN_PROP_INFO,
-	                                  NM_SETTINGS_PLUGIN_INFO);
-
-	g_object_class_override_property (object_class,
-	                                  NM_SETTINGS_PLUGIN_PROP_CAPABILITIES,
-	                                  NM_SETTINGS_PLUGIN_CAPABILITIES);
 }
 
 static void
diff --git a/src/settings/plugins/ifupdown/tests/meson.build b/src/settings/plugins/ifupdown/tests/meson.build
index 7f210034..ee3b6a34 100644
--- a/src/settings/plugins/ifupdown/tests/meson.build
+++ b/src/settings/plugins/ifupdown/tests/meson.build
@@ -1,12 +1,10 @@
 test_unit = 'test-ifupdown'
 
-cflags = '-DTEST_ENI_DIR="@0@"'.format(meson.current_source_dir())
-
 exe = executable(
   test_unit,
   test_unit + '.c',
   dependencies: test_nm_dep,
-  c_args: cflags,
+  c_args: nm_build_cflags,
   link_with: libnms_ifupdown_core
 )
 
diff --git a/src/settings/plugins/ifupdown/tests/test-ifupdown.c b/src/settings/plugins/ifupdown/tests/test-ifupdown.c
index 56515438..18bad65e 100644
--- a/src/settings/plugins/ifupdown/tests/test-ifupdown.c
+++ b/src/settings/plugins/ifupdown/tests/test-ifupdown.c
@@ -29,6 +29,10 @@
 
 #include "nm-test-utils-core.h"
 
+#define TEST_DIR       NM_BUILD_SRCDIR"/src/settings/plugins/ifupdown/tests"
+
+/*****************************************************************************/
+
 typedef struct {
 	char *key;
 	char *data;
@@ -659,45 +663,45 @@ main (int argc, char **argv)
 	if (0)
 		dump_blocks ();
 
-	g_test_add_data_func ("/ifupdate/ignore_line_before_first_block", TEST_ENI_DIR,
+	g_test_add_data_func ("/ifupdate/ignore_line_before_first_block", TEST_DIR,
 	                      (GTestDataFunc) test1_ignore_line_before_first_block);
-	g_test_add_data_func ("/ifupdate/wrapped_line", TEST_ENI_DIR,
+	g_test_add_data_func ("/ifupdate/wrapped_line", TEST_DIR,
 	                      (GTestDataFunc) test2_wrapped_line);
-	g_test_add_data_func ("/ifupdate/wrapped_multiline_multiarg", TEST_ENI_DIR,
+	g_test_add_data_func ("/ifupdate/wrapped_multiline_multiarg", TEST_DIR,
 	                      (GTestDataFunc) test3_wrapped_multiline_multiarg);
-	g_test_add_data_func ("/ifupdate/allow_auto_is_auto", TEST_ENI_DIR,
+	g_test_add_data_func ("/ifupdate/allow_auto_is_auto", TEST_DIR,
 	                      (GTestDataFunc) test4_allow_auto_is_auto);
-	g_test_add_data_func ("/ifupdate/allow_auto_multiarg", TEST_ENI_DIR,
+	g_test_add_data_func ("/ifupdate/allow_auto_multiarg", TEST_DIR,
 	                      (GTestDataFunc) test5_allow_auto_multiarg);
-	g_test_add_data_func ("/ifupdate/mixed_whitespace", TEST_ENI_DIR,
+	g_test_add_data_func ("/ifupdate/mixed_whitespace", TEST_DIR,
 	                      (GTestDataFunc) test6_mixed_whitespace);
-	g_test_add_data_func ("/ifupdate/long_line", TEST_ENI_DIR,
+	g_test_add_data_func ("/ifupdate/long_line", TEST_DIR,
 	                      (GTestDataFunc) test7_long_line);
-	g_test_add_data_func ("/ifupdate/long_line_wrapped", TEST_ENI_DIR,
+	g_test_add_data_func ("/ifupdate/long_line_wrapped", TEST_DIR,
 	                      (GTestDataFunc) test8_long_line_wrapped);
-	g_test_add_data_func ("/ifupdate/wrapped_lines_in_block", TEST_ENI_DIR,
+	g_test_add_data_func ("/ifupdate/wrapped_lines_in_block", TEST_DIR,
 	                      (GTestDataFunc) test9_wrapped_lines_in_block);
-	g_test_add_data_func ("/ifupdate/complex_wrap", TEST_ENI_DIR,
+	g_test_add_data_func ("/ifupdate/complex_wrap", TEST_DIR,
 	                      (GTestDataFunc) test11_complex_wrap);
-	g_test_add_data_func ("/ifupdate/complex_wrap_split_word", TEST_ENI_DIR,
+	g_test_add_data_func ("/ifupdate/complex_wrap_split_word", TEST_DIR,
 	                      (GTestDataFunc) test12_complex_wrap_split_word);
-	g_test_add_data_func ("/ifupdate/more_mixed_whitespace", TEST_ENI_DIR,
+	g_test_add_data_func ("/ifupdate/more_mixed_whitespace", TEST_DIR,
 	                      (GTestDataFunc) test13_more_mixed_whitespace);
-	g_test_add_data_func ("/ifupdate/mixed_whitespace_block_start", TEST_ENI_DIR,
+	g_test_add_data_func ("/ifupdate/mixed_whitespace_block_start", TEST_DIR,
 	                      (GTestDataFunc) test14_mixed_whitespace_block_start);
-	g_test_add_data_func ("/ifupdate/trailing_space", TEST_ENI_DIR,
+	g_test_add_data_func ("/ifupdate/trailing_space", TEST_DIR,
 	                      (GTestDataFunc) test15_trailing_space);
-	g_test_add_data_func ("/ifupdate/missing_newline", TEST_ENI_DIR,
+	g_test_add_data_func ("/ifupdate/missing_newline", TEST_DIR,
 	                      (GTestDataFunc) test16_missing_newline);
-	g_test_add_data_func ("/ifupdate/read_static_ipv4", TEST_ENI_DIR,
+	g_test_add_data_func ("/ifupdate/read_static_ipv4", TEST_DIR,
 	                      (GTestDataFunc) test17_read_static_ipv4);
-	g_test_add_data_func ("/ifupdate/read_static_ipv6", TEST_ENI_DIR,
+	g_test_add_data_func ("/ifupdate/read_static_ipv6", TEST_DIR,
 	                      (GTestDataFunc) test18_read_static_ipv6);
-	g_test_add_data_func ("/ifupdate/read_static_ipv4_plen", TEST_ENI_DIR,
+	g_test_add_data_func ("/ifupdate/read_static_ipv4_plen", TEST_DIR,
 	                      (GTestDataFunc) test19_read_static_ipv4_plen);
-	g_test_add_data_func ("/ifupdate/source_stanza", TEST_ENI_DIR,
+	g_test_add_data_func ("/ifupdate/source_stanza", TEST_DIR,
 	                      (GTestDataFunc) test20_source_stanza);
-	g_test_add_data_func ("/ifupdate/source_dir_stanza", TEST_ENI_DIR,
+	g_test_add_data_func ("/ifupdate/source_dir_stanza", TEST_DIR,
 	                      (GTestDataFunc) test21_source_dir_stanza);
 
 	return g_test_run ();
diff --git a/src/settings/plugins/keyfile/nms-keyfile-plugin.c b/src/settings/plugins/keyfile/nms-keyfile-plugin.c
index df2c05b7..3723db94 100644
--- a/src/settings/plugins/keyfile/nms-keyfile-plugin.c
+++ b/src/settings/plugins/keyfile/nms-keyfile-plugin.c
@@ -562,28 +562,6 @@ get_unmanaged_specs (NMSettingsPlugin *config)
 /*****************************************************************************/
 
 static void
-get_property (GObject *object, guint prop_id,
-            GValue *value, GParamSpec *pspec)
-{
-	switch (prop_id) {
-	case NM_SETTINGS_PLUGIN_PROP_NAME:
-		g_value_set_string (value, NMS_KEYFILE_PLUGIN_NAME);
-		break;
-	case NM_SETTINGS_PLUGIN_PROP_INFO:
-		g_value_set_string (value, NMS_KEYFILE_PLUGIN_INFO);
-		break;
-	case NM_SETTINGS_PLUGIN_PROP_CAPABILITIES:
-		g_value_set_uint (value, NM_SETTINGS_PLUGIN_CAP_MODIFY_CONNECTIONS);
-		break;
-	default:
-		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
-		break;
-	}
-}
-
-/*****************************************************************************/
-
-static void
 nms_keyfile_plugin_init (NMSKeyfilePlugin *plugin)
 {
 	NMSKeyfilePluginPrivate *priv = NMS_KEYFILE_PLUGIN_GET_PRIVATE (plugin);
@@ -644,19 +622,6 @@ nms_keyfile_plugin_class_init (NMSKeyfilePluginClass *req_class)
 
 	object_class->constructed = constructed;
 	object_class->dispose = dispose;
-	object_class->get_property = get_property;
-
-	g_object_class_override_property (object_class,
-	                                  NM_SETTINGS_PLUGIN_PROP_NAME,
-	                                  NM_SETTINGS_PLUGIN_NAME);
-
-	g_object_class_override_property (object_class,
-	                                  NM_SETTINGS_PLUGIN_PROP_INFO,
-	                                  NM_SETTINGS_PLUGIN_INFO);
-
-	g_object_class_override_property (object_class,
-	                                  NM_SETTINGS_PLUGIN_PROP_CAPABILITIES,
-	                                  NM_SETTINGS_PLUGIN_CAPABILITIES);
 }
 
 static void
diff --git a/src/settings/plugins/keyfile/nms-keyfile-utils.h b/src/settings/plugins/keyfile/nms-keyfile-utils.h
index be7d668a..cd3f42b9 100644
--- a/src/settings/plugins/keyfile/nms-keyfile-utils.h
+++ b/src/settings/plugins/keyfile/nms-keyfile-utils.h
@@ -23,9 +23,6 @@
 
 #include "NetworkManagerUtils.h"
 
-#define NMS_KEYFILE_PLUGIN_NAME "keyfile"
-#define NMS_KEYFILE_PLUGIN_INFO "(c) 2007 - 2016 Red Hat, Inc.  To report bugs please use the NetworkManager mailing list."
-
 #define NMS_KEYFILE_CONNECTION_LOG_PATH(path)  ((path) ?: "in-memory")
 #define NMS_KEYFILE_CONNECTION_LOG_FMT         "%s (%s,\"%s\")"
 #define NMS_KEYFILE_CONNECTION_LOG_ARG(con)    NMS_KEYFILE_CONNECTION_LOG_PATH (nm_settings_connection_get_filename ((NMSettingsConnection *) (con))), nm_connection_get_uuid ((NMConnection *) (con)), nm_connection_get_id ((NMConnection *) (con))
diff --git a/src/settings/plugins/keyfile/tests/meson.build b/src/settings/plugins/keyfile/tests/meson.build
index 54b4ee0d..33aaa264 100644
--- a/src/settings/plugins/keyfile/tests/meson.build
+++ b/src/settings/plugins/keyfile/tests/meson.build
@@ -2,16 +2,11 @@ test_unit = 'test-keyfile'
 
 test_keyfiles_dir = join_paths(meson.current_source_dir(), 'keyfiles')
 
-cflags = [
-  '-DTEST_KEYFILES_DIR="@0@"'.format(test_keyfiles_dir),
-  '-DTEST_SCRATCH_DIR="@0@"'.format(test_keyfiles_dir)
-]
-
 exe = executable(
   test_unit,
   test_unit + '.c',
   dependencies: test_nm_dep,
-  c_args: cflags
+  c_args: nm_build_cflags,
 )
 
 test(
diff --git a/src/settings/plugins/keyfile/tests/test-keyfile.c b/src/settings/plugins/keyfile/tests/test-keyfile.c
index b46475e8..a3045f7d 100644
--- a/src/settings/plugins/keyfile/tests/test-keyfile.c
+++ b/src/settings/plugins/keyfile/tests/test-keyfile.c
@@ -37,6 +37,9 @@
 
 #include "nm-test-utils-core.h"
 
+#define TEST_KEYFILES_DIR       NM_BUILD_SRCDIR"/src/settings/plugins/keyfile/tests/keyfiles"
+#define TEST_SCRATCH_DIR        NM_BUILD_BUILDDIR"/src/settings/plugins/keyfile/tests/keyfiles"
+
 /*****************************************************************************/
 
 static void
@@ -400,7 +403,6 @@ add_one_ip_route (NMSettingIPConfig *s_ip,
 	nm_ip_route_unref (route);
 }
 
-
 static void
 test_write_wired_connection (void)
 {
@@ -2415,7 +2417,6 @@ test_read_minimal (void)
 	                                                 &s_con);
 	nmtst_connection_normalize (con_archetype);
 
-
 	connection = keyfile_read_connection_from_file (TEST_KEYFILES_DIR"/Test_minimal_1");
 	g_object_set (s_con,
 	              NM_SETTING_CONNECTION_ID, nm_connection_get_id (connection),
@@ -2424,7 +2425,6 @@ test_read_minimal (void)
 	nmtst_assert_connection_equals (con_archetype, FALSE, connection, FALSE);
 	g_clear_object (&connection);
 
-
 	connection = keyfile_read_connection_from_file (TEST_KEYFILES_DIR"/Test_minimal_2");
 	g_object_set (s_con,
 	              NM_SETTING_CONNECTION_ID, nm_connection_get_id (connection),
@@ -2451,7 +2451,6 @@ test_read_minimal_slave (void)
 	              NULL);
 	nmtst_connection_normalize (con_archetype);
 
-
 	connection = keyfile_read_connection_from_file (TEST_KEYFILES_DIR"/Test_minimal_slave_1");
 	g_object_set (s_con,
 	              NM_SETTING_CONNECTION_ID, nm_connection_get_id (connection),
@@ -2460,7 +2459,6 @@ test_read_minimal_slave (void)
 	nmtst_assert_connection_equals (con_archetype, FALSE, connection, FALSE);
 	g_clear_object (&connection);
 
-
 	connection = keyfile_read_connection_from_file (TEST_KEYFILES_DIR"/Test_minimal_slave_2");
 	g_object_set (s_con,
 	              NM_SETTING_CONNECTION_ID, nm_connection_get_id (connection),