summary refs log tree commit diff
path: root/src/settings/plugins/ifcfg-rh/tests
diff options
context:
space:
mode:
Diffstat (limited to 'src/settings/plugins/ifcfg-rh/tests')
-rw-r--r--src/settings/plugins/ifcfg-rh/tests/Makefile.am56
-rw-r--r--src/settings/plugins/ifcfg-rh/tests/Makefile.in1371
-rw-r--r--src/settings/plugins/ifcfg-rh/tests/network-scripts/Makefile.am170
-rw-r--r--src/settings/plugins/ifcfg-rh/tests/network-scripts/Makefile.in776
-rw-r--r--src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-misc-variables1
-rw-r--r--src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-read-proxy-basic15
-rw-r--r--src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-wifi-wpa-psk2
-rw-r--r--src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-wired-auto-negotiate-on22
-rw-r--r--src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-wired-dhcpv6-hostname-fallback12
-rw-r--r--src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-wired-unknown-ethtool-opt22
-rw-r--r--src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-write-unknown-18
-rw-r--r--src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-write-unknown-1.expected12
-rw-r--r--src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-write-unknown-23
-rw-r--r--src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-write-unknown-2.expected4
-rw-r--r--src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-write-unknown-33
-rw-r--r--src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-write-unknown-3.expected5
-rw-r--r--src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-write-unknown-436
-rw-r--r--src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-write-unknown-4.expected31
-rw-r--r--src/settings/plugins/ifcfg-rh/tests/network-scripts/keys-test-wifi-wpa-psk-22
-rw-r--r--src/settings/plugins/ifcfg-rh/tests/test-ifcfg-rh-utils.c155
-rw-r--r--src/settings/plugins/ifcfg-rh/tests/test-ifcfg-rh.c2254
21 files changed, 1333 insertions, 3627 deletions
diff --git a/src/settings/plugins/ifcfg-rh/tests/Makefile.am b/src/settings/plugins/ifcfg-rh/tests/Makefile.am
deleted file mode 100644
index fedbd93f..00000000
--- a/src/settings/plugins/ifcfg-rh/tests/Makefile.am
+++ /dev/null
@@ -1,56 +0,0 @@
-if ENABLE_TESTS
-
-SUBDIRS=network-scripts
-
-@GNOME_CODE_COVERAGE_RULES@
-
-AM_CPPFLAGS = \
-	$(GLIB_CFLAGS) \
-	$(CODE_COVERAGE_CFLAGS) \
-	-I$(top_srcdir)/shared \
-	-I$(top_builddir)/shared \
-	-I$(top_srcdir)/libnm-core \
-	-I$(top_builddir)/libnm-core \
-	-I$(top_srcdir)/src/ \
-	-I$(top_srcdir)/src/platform \
-	-I$(top_srcdir)/src/settings \
-	-I$(srcdir)/../ \
-	-DG_LOG_DOMAIN=\""NetworkManager-ifcfg-rh"\" \
-	-DNETWORKMANAGER_COMPILATION=NM_NETWORKMANAGER_COMPILATION_INSIDE_DAEMON \
-	-DTEST_IFCFG_DIR=\"$(abs_srcdir)\" \
-	-DTEST_SCRATCH_DIR=\"$(abs_builddir)/\" \
-	-DSYSCONFDIR=\"nonexistent\" \
-	-DSBINDIR=\"nonexistent\"
-
-AM_LDFLAGS = \
-	$(GLIB_LIBS) \
-	$(CODE_COVERAGE_LDFLAGS)
-
-noinst_PROGRAMS = test-ifcfg-rh test-ifcfg-rh-utils
-
-test_ifcfg_rh_SOURCES = \
-	test-ifcfg-rh.c \
-	../reader.c \
-	../shvar.c \
-	../utils.c \
-	../writer.c
-
-test_ifcfg_rh_LDADD = \
-	$(top_builddir)/src/libNetworkManager.la
-
-test_ifcfg_rh_utils_SOURCES = \
-	test-ifcfg-rh-utils.c \
-	../utils.c \
-	../shvar.c
-
-test_ifcfg_rh_utils_LDADD = \
-	$(top_builddir)/src/libNetworkManager.la
-
-@VALGRIND_RULES@
-TESTS = test-ifcfg-rh-utils test-ifcfg-rh
-
-check-local:
-	LD_BIND_NOW=1 LD_PRELOAD=$(builddir)/../.libs/libnm-settings-plugin-ifcfg-rh.so $(top_builddir)/src/NetworkManager --version >/dev/null
-
-endif
-
diff --git a/src/settings/plugins/ifcfg-rh/tests/Makefile.in b/src/settings/plugins/ifcfg-rh/tests/Makefile.in
deleted file mode 100644
index f2ce157b..00000000
--- a/src/settings/plugins/ifcfg-rh/tests/Makefile.in
+++ /dev/null
@@ -1,1371 +0,0 @@
-# Makefile.in generated by automake 1.15 from Makefile.am.
-# @configure_input@
-
-# Copyright (C) 1994-2014 Free Software Foundation, Inc.
-
-# This Makefile.in is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
-@SET_MAKE@
-
-VPATH = @srcdir@
-am__is_gnu_make = { \
-  if test -z '$(MAKELEVEL)'; then \
-    false; \
-  elif test -n '$(MAKE_HOST)'; then \
-    true; \
-  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
-    true; \
-  else \
-    false; \
-  fi; \
-}
-am__make_running_with_option = \
-  case $${target_option-} in \
-      ?) ;; \
-      *) echo "am__make_running_with_option: internal error: invalid" \
-              "target option '$${target_option-}' specified" >&2; \
-         exit 1;; \
-  esac; \
-  has_opt=no; \
-  sane_makeflags=$$MAKEFLAGS; \
-  if $(am__is_gnu_make); then \
-    sane_makeflags=$$MFLAGS; \
-  else \
-    case $$MAKEFLAGS in \
-      *\\[\ \	]*) \
-        bs=\\; \
-        sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
-          | sed "s/$$bs$$bs[$$bs $$bs	]*//g"`;; \
-    esac; \
-  fi; \
-  skip_next=no; \
-  strip_trailopt () \
-  { \
-    flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
-  }; \
-  for flg in $$sane_makeflags; do \
-    test $$skip_next = yes && { skip_next=no; continue; }; \
-    case $$flg in \
-      *=*|--*) continue;; \
-        -*I) strip_trailopt 'I'; skip_next=yes;; \
-      -*I?*) strip_trailopt 'I';; \
-        -*O) strip_trailopt 'O'; skip_next=yes;; \
-      -*O?*) strip_trailopt 'O';; \
-        -*l) strip_trailopt 'l'; skip_next=yes;; \
-      -*l?*) strip_trailopt 'l';; \
-      -[dEDm]) skip_next=yes;; \
-      -[JT]) skip_next=yes;; \
-    esac; \
-    case $$flg in \
-      *$$target_option*) has_opt=yes; break;; \
-    esac; \
-  done; \
-  test $$has_opt = yes
-am__make_dryrun = (target_option=n; $(am__make_running_with_option))
-am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
-pkgdatadir = $(datadir)/@PACKAGE@
-pkgincludedir = $(includedir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
-pkglibexecdir = $(libexecdir)/@PACKAGE@
-am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-install_sh_DATA = $(install_sh) -c -m 644
-install_sh_PROGRAM = $(install_sh) -c
-install_sh_SCRIPT = $(install_sh) -c
-INSTALL_HEADER = $(INSTALL_DATA)
-transform = $(program_transform_name)
-NORMAL_INSTALL = :
-PRE_INSTALL = :
-POST_INSTALL = :
-NORMAL_UNINSTALL = :
-PRE_UNINSTALL = :
-POST_UNINSTALL = :
-build_triplet = @build@
-host_triplet = @host@
-@ENABLE_TESTS_TRUE@noinst_PROGRAMS = test-ifcfg-rh$(EXEEXT) \
-@ENABLE_TESTS_TRUE@	test-ifcfg-rh-utils$(EXEEXT)
-@ENABLE_TESTS_TRUE@TESTS = test-ifcfg-rh-utils$(EXEEXT) \
-@ENABLE_TESTS_TRUE@	test-ifcfg-rh$(EXEEXT)
-subdir = src/settings/plugins/ifcfg-rh/tests
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/m4/attributes.m4 \
-	$(top_srcdir)/m4/ax_lib_readline.m4 \
-	$(top_srcdir)/m4/compiler_options.m4 \
-	$(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/git-sha-record.m4 \
-	$(top_srcdir)/m4/gnome-code-coverage.m4 \
-	$(top_srcdir)/m4/gtk-doc.m4 $(top_srcdir)/m4/iconv.m4 \
-	$(top_srcdir)/m4/intlmacosx.m4 $(top_srcdir)/m4/intltool.m4 \
-	$(top_srcdir)/m4/introspection.m4 $(top_srcdir)/m4/lib-ld.m4 \
-	$(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \
-	$(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
-	$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
-	$(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \
-	$(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \
-	$(top_srcdir)/m4/vapigen.m4 $(top_srcdir)/configure.ac
-am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
-	$(ACLOCAL_M4)
-DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
-mkinstalldirs = $(install_sh) -d
-CONFIG_HEADER = $(top_builddir)/config.h
-CONFIG_CLEAN_FILES =
-CONFIG_CLEAN_VPATH_FILES =
-PROGRAMS = $(noinst_PROGRAMS)
-am__test_ifcfg_rh_SOURCES_DIST = test-ifcfg-rh.c ../reader.c \
-	../shvar.c ../utils.c ../writer.c
-@ENABLE_TESTS_TRUE@am_test_ifcfg_rh_OBJECTS = test-ifcfg-rh.$(OBJEXT) \
-@ENABLE_TESTS_TRUE@	reader.$(OBJEXT) shvar.$(OBJEXT) \
-@ENABLE_TESTS_TRUE@	utils.$(OBJEXT) writer.$(OBJEXT)
-test_ifcfg_rh_OBJECTS = $(am_test_ifcfg_rh_OBJECTS)
-@ENABLE_TESTS_TRUE@test_ifcfg_rh_DEPENDENCIES =  \
-@ENABLE_TESTS_TRUE@	$(top_builddir)/src/libNetworkManager.la
-AM_V_lt = $(am__v_lt_@AM_V@)
-am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
-am__v_lt_0 = --silent
-am__v_lt_1 = 
-am__test_ifcfg_rh_utils_SOURCES_DIST = test-ifcfg-rh-utils.c \
-	../utils.c ../shvar.c
-@ENABLE_TESTS_TRUE@am_test_ifcfg_rh_utils_OBJECTS =  \
-@ENABLE_TESTS_TRUE@	test-ifcfg-rh-utils.$(OBJEXT) \
-@ENABLE_TESTS_TRUE@	utils.$(OBJEXT) shvar.$(OBJEXT)
-test_ifcfg_rh_utils_OBJECTS = $(am_test_ifcfg_rh_utils_OBJECTS)
-@ENABLE_TESTS_TRUE@test_ifcfg_rh_utils_DEPENDENCIES =  \
-@ENABLE_TESTS_TRUE@	$(top_builddir)/src/libNetworkManager.la
-AM_V_P = $(am__v_P_@AM_V@)
-am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
-am__v_P_0 = false
-am__v_P_1 = :
-AM_V_GEN = $(am__v_GEN_@AM_V@)
-am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
-am__v_GEN_0 = @echo "  GEN     " $@;
-am__v_GEN_1 = 
-AM_V_at = $(am__v_at_@AM_V@)
-am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
-am__v_at_0 = @
-am__v_at_1 = 
-DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
-depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp
-am__depfiles_maybe = depfiles
-am__mv = mv -f
-COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
-	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
-	$(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
-	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
-	$(AM_CFLAGS) $(CFLAGS)
-AM_V_CC = $(am__v_CC_@AM_V@)
-am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
-am__v_CC_0 = @echo "  CC      " $@;
-am__v_CC_1 = 
-CCLD = $(CC)
-LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
-	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
-	$(AM_LDFLAGS) $(LDFLAGS) -o $@
-AM_V_CCLD = $(am__v_CCLD_@AM_V@)
-am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
-am__v_CCLD_0 = @echo "  CCLD    " $@;
-am__v_CCLD_1 = 
-SOURCES = $(test_ifcfg_rh_SOURCES) $(test_ifcfg_rh_utils_SOURCES)
-DIST_SOURCES = $(am__test_ifcfg_rh_SOURCES_DIST) \
-	$(am__test_ifcfg_rh_utils_SOURCES_DIST)
-RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \
-	ctags-recursive dvi-recursive html-recursive info-recursive \
-	install-data-recursive install-dvi-recursive \
-	install-exec-recursive install-html-recursive \
-	install-info-recursive install-pdf-recursive \
-	install-ps-recursive install-recursive installcheck-recursive \
-	installdirs-recursive pdf-recursive ps-recursive \
-	tags-recursive uninstall-recursive
-am__can_run_installinfo = \
-  case $$AM_UPDATE_INFO_DIR in \
-    n|no|NO) false;; \
-    *) (install-info --version) >/dev/null 2>&1;; \
-  esac
-RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive	\
-  distclean-recursive maintainer-clean-recursive
-am__recursive_targets = \
-  $(RECURSIVE_TARGETS) \
-  $(RECURSIVE_CLEAN_TARGETS) \
-  $(am__extra_recursive_targets)
-AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \
-	check recheck distdir
-am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
-# Read a list of newline-separated strings from the standard input,
-# and print each of them once, without duplicates.  Input order is
-# *not* preserved.
-am__uniquify_input = $(AWK) '\
-  BEGIN { nonempty = 0; } \
-  { items[$$0] = 1; nonempty = 1; } \
-  END { if (nonempty) { for (i in items) print i; }; } \
-'
-# Make sure the list of sources is unique.  This is necessary because,
-# e.g., the same source file might be shared among _SOURCES variables
-# for different programs/libraries.
-am__define_uniq_tagged_files = \
-  list='$(am__tagged_files)'; \
-  unique=`for i in $$list; do \
-    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-  done | $(am__uniquify_input)`
-ETAGS = etags
-CTAGS = ctags
-am__tty_colors_dummy = \
-  mgn= red= grn= lgn= blu= brg= std=; \
-  am__color_tests=no
-am__tty_colors = { \
-  $(am__tty_colors_dummy); \
-  if test "X$(AM_COLOR_TESTS)" = Xno; then \
-    am__color_tests=no; \
-  elif test "X$(AM_COLOR_TESTS)" = Xalways; then \
-    am__color_tests=yes; \
-  elif test "X$$TERM" != Xdumb && { test -t 1; } 2>/dev/null; then \
-    am__color_tests=yes; \
-  fi; \
-  if test $$am__color_tests = yes; then \
-    red=''; \
-    grn=''; \
-    lgn=''; \
-    blu=''; \
-    mgn=''; \
-    brg=''; \
-    std=''; \
-  fi; \
-}
-am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
-am__vpath_adj = case $$p in \
-    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
-    *) f=$$p;; \
-  esac;
-am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
-am__install_max = 40
-am__nobase_strip_setup = \
-  srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
-am__nobase_strip = \
-  for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
-am__nobase_list = $(am__nobase_strip_setup); \
-  for p in $$list; do echo "$$p $$p"; done | \
-  sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
-  $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
-    if (++n[$$2] == $(am__install_max)) \
-      { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
-    END { for (dir in files) print dir, files[dir] }'
-am__base_list = \
-  sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
-  sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
-am__uninstall_files_from_dir = { \
-  test -z "$$files" \
-    || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
-    || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
-         $(am__cd) "$$dir" && rm -f $$files; }; \
-  }
-am__recheck_rx = ^[ 	]*:recheck:[ 	]*
-am__global_test_result_rx = ^[ 	]*:global-test-result:[ 	]*
-am__copy_in_global_log_rx = ^[ 	]*:copy-in-global-log:[ 	]*
-# A command that, given a newline-separated list of test names on the
-# standard input, print the name of the tests that are to be re-run
-# upon "make recheck".
-am__list_recheck_tests = $(AWK) '{ \
-  recheck = 1; \
-  while ((rc = (getline line < ($$0 ".trs"))) != 0) \
-    { \
-      if (rc < 0) \
-        { \
-          if ((getline line2 < ($$0 ".log")) < 0) \
-	    recheck = 0; \
-          break; \
-        } \
-      else if (line ~ /$(am__recheck_rx)[nN][Oo]/) \
-        { \
-          recheck = 0; \
-          break; \
-        } \
-      else if (line ~ /$(am__recheck_rx)[yY][eE][sS]/) \
-        { \
-          break; \
-        } \
-    }; \
-  if (recheck) \
-    print $$0; \
-  close ($$0 ".trs"); \
-  close ($$0 ".log"); \
-}'
-# A command that, given a newline-separated list of test names on the
-# standard input, create the global log from their .trs and .log files.
-am__create_global_log = $(AWK) ' \
-function fatal(msg) \
-{ \
-  print "fatal: making $@: " msg | "cat >&2"; \
-  exit 1; \
-} \
-function rst_section(header) \
-{ \
-  print header; \
-  len = length(header); \
-  for (i = 1; i <= len; i = i + 1) \
-    printf "="; \
-  printf "\n\n"; \
-} \
-{ \
-  copy_in_global_log = 1; \
-  global_test_result = "RUN"; \
-  while ((rc = (getline line < ($$0 ".trs"))) != 0) \
-    { \
-      if (rc < 0) \
-         fatal("failed to read from " $$0 ".trs"); \
-      if (line ~ /$(am__global_test_result_rx)/) \
-        { \
-          sub("$(am__global_test_result_rx)", "", line); \
-          sub("[ 	]*$$", "", line); \
-          global_test_result = line; \
-        } \
-      else if (line ~ /$(am__copy_in_global_log_rx)[nN][oO]/) \
-        copy_in_global_log = 0; \
-    }; \
-  if (copy_in_global_log) \
-    { \
-      rst_section(global_test_result ": " $$0); \
-      while ((rc = (getline line < ($$0 ".log"))) != 0) \
-      { \
-        if (rc < 0) \
-          fatal("failed to read from " $$0 ".log"); \
-        print line; \
-      }; \
-      printf "\n"; \
-    }; \
-  close ($$0 ".trs"); \
-  close ($$0 ".log"); \
-}'
-# Restructured Text title.
-am__rst_title = { sed 's/.*/   &   /;h;s/./=/g;p;x;s/ *$$//;p;g' && echo; }
-# Solaris 10 'make', and several other traditional 'make' implementations,
-# pass "-e" to $(SHELL), and POSIX 2008 even requires this.  Work around it
-# by disabling -e (using the XSI extension "set +e") if it's set.
-am__sh_e_setup = case $$- in *e*) set +e;; esac
-# Default flags passed to test drivers.
-am__common_driver_flags = \
-  --color-tests "$$am__color_tests" \
-  --enable-hard-errors "$$am__enable_hard_errors" \
-  --expect-failure "$$am__expect_failure"
-# To be inserted before the command running the test.  Creates the
-# directory for the log if needed.  Stores in $dir the directory
-# containing $f, in $tst the test, in $log the log.  Executes the
-# developer- defined test setup AM_TESTS_ENVIRONMENT (if any), and
-# passes TESTS_ENVIRONMENT.  Set up options for the wrapper that
-# will run the test scripts (or their associated LOG_COMPILER, if
-# thy have one).
-am__check_pre = \
-$(am__sh_e_setup);					\
-$(am__vpath_adj_setup) $(am__vpath_adj)			\
-$(am__tty_colors);					\
-srcdir=$(srcdir); export srcdir;			\
-case "$@" in						\
-  */*) am__odir=`echo "./$@" | sed 's|/[^/]*$$||'`;;	\
-    *) am__odir=.;; 					\
-esac;							\
-test "x$$am__odir" = x"." || test -d "$$am__odir" 	\
-  || $(MKDIR_P) "$$am__odir" || exit $$?;		\
-if test -f "./$$f"; then dir=./;			\
-elif test -f "$$f"; then dir=;				\
-else dir="$(srcdir)/"; fi;				\
-tst=$$dir$$f; log='$@'; 				\
-if test -n '$(DISABLE_HARD_ERRORS)'; then		\
-  am__enable_hard_errors=no; 				\
-else							\
-  am__enable_hard_errors=yes; 				\
-fi; 							\
-case " $(XFAIL_TESTS) " in				\
-  *[\ \	]$$f[\ \	]* | *[\ \	]$$dir$$f[\ \	]*) \
-    am__expect_failure=yes;;				\
-  *)							\
-    am__expect_failure=no;;				\
-esac; 							\
-$(AM_TESTS_ENVIRONMENT) $(TESTS_ENVIRONMENT)
-# A shell command to get the names of the tests scripts with any registered
-# extension removed (i.e., equivalently, the names of the test logs, with
-# the '.log' extension removed).  The result is saved in the shell variable
-# '$bases'.  This honors runtime overriding of TESTS and TEST_LOGS.  Sadly,
-# we cannot use something simpler, involving e.g., "$(TEST_LOGS:.log=)",
-# since that might cause problem with VPATH rewrites for suffix-less tests.
-# See also 'test-harness-vpath-rewrite.sh' and 'test-trs-basic.sh'.
-am__set_TESTS_bases = \
-  bases='$(TEST_LOGS)'; \
-  bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \
-  bases=`echo $$bases`
-RECHECK_LOGS = $(TEST_LOGS)
-TEST_SUITE_LOG = test-suite.log
-TEST_EXTENSIONS = @EXEEXT@ .test
-LOG_COMPILE = $(LOG_COMPILER) $(AM_LOG_FLAGS) $(LOG_FLAGS)
-am__set_b = \
-  case '$@' in \
-    */*) \
-      case '$*' in \
-        */*) b='$*';; \
-          *) b=`echo '$@' | sed 's/\.log$$//'`; \
-       esac;; \
-    *) \
-      b='$*';; \
-  esac
-am__test_logs1 = $(TESTS:=.log)
-am__test_logs2 = $(am__test_logs1:@EXEEXT@.log=.log)
-TEST_LOGS = $(am__test_logs2:.test.log=.log)
-TEST_LOG_DRIVER = $(SHELL) $(top_srcdir)/build-aux/test-driver
-TEST_LOG_COMPILE = $(TEST_LOG_COMPILER) $(AM_TEST_LOG_FLAGS) \
-	$(TEST_LOG_FLAGS)
-DIST_SUBDIRS = network-scripts
-am__DIST_COMMON = $(srcdir)/Makefile.in \
-	$(top_srcdir)/build-aux/depcomp \
-	$(top_srcdir)/build-aux/test-driver
-DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
-am__relativize = \
-  dir0=`pwd`; \
-  sed_first='s,^\([^/]*\)/.*$$,\1,'; \
-  sed_rest='s,^[^/]*/*,,'; \
-  sed_last='s,^.*/\([^/]*\)$$,\1,'; \
-  sed_butlast='s,/*[^/]*$$,,'; \
-  while test -n "$$dir1"; do \
-    first=`echo "$$dir1" | sed -e "$$sed_first"`; \
-    if test "$$first" != "."; then \
-      if test "$$first" = ".."; then \
-        dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
-        dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
-      else \
-        first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
-        if test "$$first2" = "$$first"; then \
-          dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
-        else \
-          dir2="../$$dir2"; \
-        fi; \
-        dir0="$$dir0"/"$$first"; \
-      fi; \
-    fi; \
-    dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
-  done; \
-  reldir="$$dir2"
-ACLOCAL = @ACLOCAL@
-ALL_LINGUAS = @ALL_LINGUAS@
-AMTAR = @AMTAR@
-AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
-AM_TESTS_FD_REDIRECT = @AM_TESTS_FD_REDIRECT@
-AR = @AR@
-AUTOCONF = @AUTOCONF@
-AUTOHEADER = @AUTOHEADER@
-AUTOMAKE = @AUTOMAKE@
-AWK = @AWK@
-BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
-BLUEZ5_LIBS = @BLUEZ5_LIBS@
-CC = @CC@
-CCDEPMODE = @CCDEPMODE@
-CFLAGS = @CFLAGS@
-CODE_COVERAGE_CFLAGS = @CODE_COVERAGE_CFLAGS@
-CODE_COVERAGE_ENABLED = @CODE_COVERAGE_ENABLED@
-CODE_COVERAGE_LDFLAGS = @CODE_COVERAGE_LDFLAGS@
-CPP = @CPP@
-CPPFLAGS = @CPPFLAGS@
-CXX = @CXX@
-CXXCPP = @CXXCPP@
-CXXDEPMODE = @CXXDEPMODE@
-CXXFLAGS = @CXXFLAGS@
-CYGPATH_W = @CYGPATH_W@
-DBUS_CFLAGS = @DBUS_CFLAGS@
-DBUS_LIBS = @DBUS_LIBS@
-DBUS_SYS_DIR = @DBUS_SYS_DIR@
-DEFS = @DEFS@
-DEPDIR = @DEPDIR@
-DHCLIENT_PATH = @DHCLIENT_PATH@
-DHCPCD_PATH = @DHCPCD_PATH@
-DISTRO_NETWORK_SERVICE = @DISTRO_NETWORK_SERVICE@
-DLLTOOL = @DLLTOOL@
-DL_LIBS = @DL_LIBS@
-DNSMASQ_PATH = @DNSMASQ_PATH@
-DNSSEC_TRIGGER_SCRIPT = @DNSSEC_TRIGGER_SCRIPT@
-DSYMUTIL = @DSYMUTIL@
-DUMPBIN = @DUMPBIN@
-ECHO_C = @ECHO_C@
-ECHO_N = @ECHO_N@
-ECHO_T = @ECHO_T@
-EGREP = @EGREP@
-EXEEXT = @EXEEXT@
-FGREP = @FGREP@
-GENHTML = @GENHTML@
-GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
-GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
-GLIB_CFLAGS = @GLIB_CFLAGS@
-GLIB_GENMARSHAL = @GLIB_GENMARSHAL@
-GLIB_LIBS = @GLIB_LIBS@
-GLIB_MAKEFILE = @GLIB_MAKEFILE@
-GLIB_MKENUMS = @GLIB_MKENUMS@
-GMSGFMT = @GMSGFMT@
-GMSGFMT_015 = @GMSGFMT_015@
-GNUTLS_CFLAGS = @GNUTLS_CFLAGS@
-GNUTLS_LIBS = @GNUTLS_LIBS@
-GREP = @GREP@
-GTKDOC_CHECK = @GTKDOC_CHECK@
-GTKDOC_CHECK_PATH = @GTKDOC_CHECK_PATH@
-GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
-GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
-GTKDOC_MKPDF = @GTKDOC_MKPDF@
-GTKDOC_REBASE = @GTKDOC_REBASE@
-GUDEV_CFLAGS = @GUDEV_CFLAGS@
-GUDEV_LIBS = @GUDEV_LIBS@
-HTML_DIR = @HTML_DIR@
-INSTALL = @INSTALL@
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-INTLLIBS = @INTLLIBS@
-INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@
-INTLTOOL_MERGE = @INTLTOOL_MERGE@
-INTLTOOL_PERL = @INTLTOOL_PERL@
-INTLTOOL_UPDATE = @INTLTOOL_UPDATE@
-INTLTOOL_V_MERGE = @INTLTOOL_V_MERGE@
-INTLTOOL_V_MERGE_OPTIONS = @INTLTOOL_V_MERGE_OPTIONS@
-INTLTOOL__v_MERGE_ = @INTLTOOL__v_MERGE_@
-INTLTOOL__v_MERGE_0 = @INTLTOOL__v_MERGE_0@
-INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
-INTROSPECTION_CFLAGS = @INTROSPECTION_CFLAGS@
-INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
-INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
-INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
-INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
-INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
-INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
-INTROSPECTION_TYPELIBDIR = @INTROSPECTION_TYPELIBDIR@
-IPTABLES_PATH = @IPTABLES_PATH@
-JANSSON_CFLAGS = @JANSSON_CFLAGS@
-JANSSON_LIBS = @JANSSON_LIBS@
-KERNEL_FIRMWARE_DIR = @KERNEL_FIRMWARE_DIR@
-LCOV = @LCOV@
-LD = @LD@
-LDFLAGS = @LDFLAGS@
-LIBAUDIT_CFLAGS = @LIBAUDIT_CFLAGS@
-LIBAUDIT_LIBS = @LIBAUDIT_LIBS@
-LIBICONV = @LIBICONV@
-LIBINTL = @LIBINTL@
-LIBM = @LIBM@
-LIBNDP_CFLAGS = @LIBNDP_CFLAGS@
-LIBNDP_LIBS = @LIBNDP_LIBS@
-LIBNL_CFLAGS = @LIBNL_CFLAGS@
-LIBNL_LIBS = @LIBNL_LIBS@
-LIBOBJS = @LIBOBJS@
-LIBS = @LIBS@
-LIBSOUP_CFLAGS = @LIBSOUP_CFLAGS@
-LIBSOUP_LIBS = @LIBSOUP_LIBS@
-LIBSYSTEMD_CFLAGS = @LIBSYSTEMD_CFLAGS@
-LIBSYSTEMD_LIBS = @LIBSYSTEMD_LIBS@
-LIBTEAMDCTL_CFLAGS = @LIBTEAMDCTL_CFLAGS@
-LIBTEAMDCTL_LIBS = @LIBTEAMDCTL_LIBS@
-LIBTOOL = @LIBTOOL@
-LIPO = @LIPO@
-LN_S = @LN_S@
-LOG_DRIVER = @LOG_DRIVER@
-LTLIBICONV = @LTLIBICONV@
-LTLIBINTL = @LTLIBINTL@
-LTLIBOBJS = @LTLIBOBJS@
-LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
-MAINT = @MAINT@
-MAKEINFO = @MAKEINFO@
-MANIFEST_TOOL = @MANIFEST_TOOL@
-MKDIR_P = @MKDIR_P@
-MM_GLIB_CFLAGS = @MM_GLIB_CFLAGS@
-MM_GLIB_LIBS = @MM_GLIB_LIBS@
-MOC = @MOC@
-MSGFMT = @MSGFMT@
-MSGFMT_015 = @MSGFMT_015@
-MSGMERGE = @MSGMERGE@
-NEWT_CFLAGS = @NEWT_CFLAGS@
-NEWT_LIBS = @NEWT_LIBS@
-NM = @NM@
-NMEDIT = @NMEDIT@
-NM_CONFIG_DEFAULT_AUTH_POLKIT_TEXT = @NM_CONFIG_DEFAULT_AUTH_POLKIT_TEXT@
-NM_CONFIG_DEFAULT_DNS_RC_MANAGER = @NM_CONFIG_DEFAULT_DNS_RC_MANAGER@
-NM_CONFIG_DEFAULT_LOGGING_AUDIT_TEXT = @NM_CONFIG_DEFAULT_LOGGING_AUDIT_TEXT@
-NM_CONFIG_LOGGING_BACKEND_DEFAULT_TEXT = @NM_CONFIG_LOGGING_BACKEND_DEFAULT_TEXT@
-NM_MAJOR_VERSION = @NM_MAJOR_VERSION@
-NM_MICRO_VERSION = @NM_MICRO_VERSION@
-NM_MINOR_VERSION = @NM_MINOR_VERSION@
-NM_MODIFY_SYSTEM_POLICY = @NM_MODIFY_SYSTEM_POLICY@
-NM_VERSION = @NM_VERSION@
-NSS_CFLAGS = @NSS_CFLAGS@
-NSS_LIBS = @NSS_LIBS@
-OBJDUMP = @OBJDUMP@
-OBJEXT = @OBJEXT@
-OTOOL = @OTOOL@
-OTOOL64 = @OTOOL64@
-PACKAGE = @PACKAGE@
-PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
-PACKAGE_NAME = @PACKAGE_NAME@
-PACKAGE_STRING = @PACKAGE_STRING@
-PACKAGE_TARNAME = @PACKAGE_TARNAME@
-PACKAGE_URL = @PACKAGE_URL@
-PACKAGE_VERSION = @PACKAGE_VERSION@
-PATH_SEPARATOR = @PATH_SEPARATOR@
-PERL = @PERL@
-PKG_CONFIG = @PKG_CONFIG@
-PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
-PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
-POLKIT_CFLAGS = @POLKIT_CFLAGS@
-POLKIT_LIBS = @POLKIT_LIBS@
-POSUB = @POSUB@
-PPPD_PATH = @PPPD_PATH@
-PPPD_PLUGIN_DIR = @PPPD_PLUGIN_DIR@
-QT_CFLAGS = @QT_CFLAGS@
-QT_LIBS = @QT_LIBS@
-RANLIB = @RANLIB@
-READLINE_LIBS = @READLINE_LIBS@
-SANITIZERS = @SANITIZERS@
-SANITIZER_ENV = @SANITIZER_ENV@
-SED = @SED@
-SELINUX_CFLAGS = @SELINUX_CFLAGS@
-SELINUX_LIBS = @SELINUX_LIBS@
-SET_MAKE = @SET_MAKE@
-SHELL = @SHELL@
-STRIP = @STRIP@
-SYSTEMD_200_CFLAGS = @SYSTEMD_200_CFLAGS@
-SYSTEMD_200_LIBS = @SYSTEMD_200_LIBS@
-SYSTEMD_INHIBIT_CFLAGS = @SYSTEMD_INHIBIT_CFLAGS@
-SYSTEMD_INHIBIT_LIBS = @SYSTEMD_INHIBIT_LIBS@
-SYSTEMD_JOURNAL_CFLAGS = @SYSTEMD_JOURNAL_CFLAGS@
-SYSTEMD_JOURNAL_LIBS = @SYSTEMD_JOURNAL_LIBS@
-SYSTEMD_LOGIN_CFLAGS = @SYSTEMD_LOGIN_CFLAGS@
-SYSTEMD_LOGIN_LIBS = @SYSTEMD_LOGIN_LIBS@
-SYSTEM_CA_PATH = @SYSTEM_CA_PATH@
-UDEV_DIR = @UDEV_DIR@
-USE_NLS = @USE_NLS@
-UUID_CFLAGS = @UUID_CFLAGS@
-UUID_LIBS = @UUID_LIBS@
-VALGRIND_RULES = @VALGRIND_RULES@
-VAPIGEN = @VAPIGEN@
-VAPIGEN_MAKEFILE = @VAPIGEN_MAKEFILE@
-VAPIGEN_VAPIDIR = @VAPIGEN_VAPIDIR@
-VERSION = @VERSION@
-XGETTEXT = @XGETTEXT@
-XGETTEXT_015 = @XGETTEXT_015@
-XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
-abs_builddir = @abs_builddir@
-abs_srcdir = @abs_srcdir@
-abs_top_builddir = @abs_top_builddir@
-abs_top_srcdir = @abs_top_srcdir@
-ac_ct_AR = @ac_ct_AR@
-ac_ct_CC = @ac_ct_CC@
-ac_ct_CXX = @ac_ct_CXX@
-ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
-ac_ct_RANLIB = @ac_ct_RANLIB@
-am__include = @am__include@
-am__leading_dot = @am__leading_dot@
-am__quote = @am__quote@
-am__tar = @am__tar@
-am__untar = @am__untar@
-bindir = @bindir@
-build = @build@
-build_alias = @build_alias@
-build_cpu = @build_cpu@
-build_os = @build_os@
-build_vendor = @build_vendor@
-builddir = @builddir@
-datadir = @datadir@
-datarootdir = @datarootdir@
-docdir = @docdir@
-dvidir = @dvidir@
-exec_prefix = @exec_prefix@
-host = @host@
-host_alias = @host_alias@
-host_cpu = @host_cpu@
-host_os = @host_os@
-host_vendor = @host_vendor@
-htmldir = @htmldir@
-includedir = @includedir@
-infodir = @infodir@
-install_sh = @install_sh@
-intltool__v_merge_options_ = @intltool__v_merge_options_@
-intltool__v_merge_options_0 = @intltool__v_merge_options_0@
-libdir = @libdir@
-libexecdir = @libexecdir@
-localedir = @localedir@
-localstatedir = @localstatedir@
-mandir = @mandir@
-mkdir_p = @mkdir_p@
-nmbinary = @nmbinary@
-nmconfdir = @nmconfdir@
-nmdatadir = @nmdatadir@
-nmlibdir = @nmlibdir@
-nmrundir = @nmrundir@
-nmstatedir = @nmstatedir@
-oldincludedir = @oldincludedir@
-pdfdir = @pdfdir@
-prefix = @prefix@
-program_transform_name = @program_transform_name@
-psdir = @psdir@
-runstatedir = @runstatedir@
-sbindir = @sbindir@
-sharedstatedir = @sharedstatedir@
-srcdir = @srcdir@
-subdirs = @subdirs@
-sysconfdir = @sysconfdir@
-systemdsystemunitdir = @systemdsystemunitdir@
-target_alias = @target_alias@
-top_build_prefix = @top_build_prefix@
-top_builddir = @top_builddir@
-top_srcdir = @top_srcdir@
-with_dhclient = @with_dhclient@
-with_dhcpcd = @with_dhcpcd@
-with_netconfig = @with_netconfig@
-with_resolvconf = @with_resolvconf@
-with_valgrind = @with_valgrind@
-@ENABLE_TESTS_TRUE@SUBDIRS = network-scripts
-@ENABLE_TESTS_TRUE@AM_CPPFLAGS = \
-@ENABLE_TESTS_TRUE@	$(GLIB_CFLAGS) \
-@ENABLE_TESTS_TRUE@	$(CODE_COVERAGE_CFLAGS) \
-@ENABLE_TESTS_TRUE@	-I$(top_srcdir)/shared \
-@ENABLE_TESTS_TRUE@	-I$(top_builddir)/shared \
-@ENABLE_TESTS_TRUE@	-I$(top_srcdir)/libnm-core \
-@ENABLE_TESTS_TRUE@	-I$(top_builddir)/libnm-core \
-@ENABLE_TESTS_TRUE@	-I$(top_srcdir)/src/ \
-@ENABLE_TESTS_TRUE@	-I$(top_srcdir)/src/platform \
-@ENABLE_TESTS_TRUE@	-I$(top_srcdir)/src/settings \
-@ENABLE_TESTS_TRUE@	-I$(srcdir)/../ \
-@ENABLE_TESTS_TRUE@	-DG_LOG_DOMAIN=\""NetworkManager-ifcfg-rh"\" \
-@ENABLE_TESTS_TRUE@	-DNETWORKMANAGER_COMPILATION=NM_NETWORKMANAGER_COMPILATION_INSIDE_DAEMON \
-@ENABLE_TESTS_TRUE@	-DTEST_IFCFG_DIR=\"$(abs_srcdir)\" \
-@ENABLE_TESTS_TRUE@	-DTEST_SCRATCH_DIR=\"$(abs_builddir)/\" \
-@ENABLE_TESTS_TRUE@	-DSYSCONFDIR=\"nonexistent\" \
-@ENABLE_TESTS_TRUE@	-DSBINDIR=\"nonexistent\"
-
-@ENABLE_TESTS_TRUE@AM_LDFLAGS = \
-@ENABLE_TESTS_TRUE@	$(GLIB_LIBS) \
-@ENABLE_TESTS_TRUE@	$(CODE_COVERAGE_LDFLAGS)
-
-@ENABLE_TESTS_TRUE@test_ifcfg_rh_SOURCES = \
-@ENABLE_TESTS_TRUE@	test-ifcfg-rh.c \
-@ENABLE_TESTS_TRUE@	../reader.c \
-@ENABLE_TESTS_TRUE@	../shvar.c \
-@ENABLE_TESTS_TRUE@	../utils.c \
-@ENABLE_TESTS_TRUE@	../writer.c
-
-@ENABLE_TESTS_TRUE@test_ifcfg_rh_LDADD = \
-@ENABLE_TESTS_TRUE@	$(top_builddir)/src/libNetworkManager.la
-
-@ENABLE_TESTS_TRUE@test_ifcfg_rh_utils_SOURCES = \
-@ENABLE_TESTS_TRUE@	test-ifcfg-rh-utils.c \
-@ENABLE_TESTS_TRUE@	../utils.c \
-@ENABLE_TESTS_TRUE@	../shvar.c
-
-@ENABLE_TESTS_TRUE@test_ifcfg_rh_utils_LDADD = \
-@ENABLE_TESTS_TRUE@	$(top_builddir)/src/libNetworkManager.la
-
-all: all-recursive
-
-.SUFFIXES:
-.SUFFIXES: .c .lo .log .o .obj .test .test$(EXEEXT) .trs
-$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__configure_deps)
-	@for dep in $?; do \
-	  case '$(am__configure_deps)' in \
-	    *$$dep*) \
-	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
-	        && { if test -f $@; then exit 0; else break; fi; }; \
-	      exit 1;; \
-	  esac; \
-	done; \
-	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/settings/plugins/ifcfg-rh/tests/Makefile'; \
-	$(am__cd) $(top_srcdir) && \
-	  $(AUTOMAKE) --gnu src/settings/plugins/ifcfg-rh/tests/Makefile
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
-	@case '$?' in \
-	  *config.status*) \
-	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
-	  *) \
-	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
-	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
-	esac;
-
-$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
-	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-
-$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
-	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
-	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(am__aclocal_m4_deps):
-
-clean-noinstPROGRAMS:
-	@list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \
-	echo " rm -f" $$list; \
-	rm -f $$list || exit $$?; \
-	test -n "$(EXEEXT)" || exit 0; \
-	list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
-	echo " rm -f" $$list; \
-	rm -f $$list
-
-test-ifcfg-rh$(EXEEXT): $(test_ifcfg_rh_OBJECTS) $(test_ifcfg_rh_DEPENDENCIES) $(EXTRA_test_ifcfg_rh_DEPENDENCIES) 
-	@rm -f test-ifcfg-rh$(EXEEXT)
-	$(AM_V_CCLD)$(LINK) $(test_ifcfg_rh_OBJECTS) $(test_ifcfg_rh_LDADD) $(LIBS)
-
-test-ifcfg-rh-utils$(EXEEXT): $(test_ifcfg_rh_utils_OBJECTS) $(test_ifcfg_rh_utils_DEPENDENCIES) $(EXTRA_test_ifcfg_rh_utils_DEPENDENCIES) 
-	@rm -f test-ifcfg-rh-utils$(EXEEXT)
-	$(AM_V_CCLD)$(LINK) $(test_ifcfg_rh_utils_OBJECTS) $(test_ifcfg_rh_utils_LDADD) $(LIBS)
-
-mostlyclean-compile:
-	-rm -f *.$(OBJEXT)
-
-distclean-compile:
-	-rm -f *.tab.c
-
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/reader.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/shvar.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-ifcfg-rh-utils.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-ifcfg-rh.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/utils.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/writer.Po@am__quote@
-
-.c.o:
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $<
-
-.c.obj:
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
-
-.c.lo:
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
-
-reader.o: ../reader.c
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT reader.o -MD -MP -MF $(DEPDIR)/reader.Tpo -c -o reader.o `test -f '../reader.c' || echo '$(srcdir)/'`../reader.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/reader.Tpo $(DEPDIR)/reader.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='../reader.c' object='reader.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o reader.o `test -f '../reader.c' || echo '$(srcdir)/'`../reader.c
-
-reader.obj: ../reader.c
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT reader.obj -MD -MP -MF $(DEPDIR)/reader.Tpo -c -o reader.obj `if test -f '../reader.c'; then $(CYGPATH_W) '../reader.c'; else $(CYGPATH_W) '$(srcdir)/../reader.c'; fi`
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/reader.Tpo $(DEPDIR)/reader.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='../reader.c' object='reader.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o reader.obj `if test -f '../reader.c'; then $(CYGPATH_W) '../reader.c'; else $(CYGPATH_W) '$(srcdir)/../reader.c'; fi`
-
-shvar.o: ../shvar.c
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT shvar.o -MD -MP -MF $(DEPDIR)/shvar.Tpo -c -o shvar.o `test -f '../shvar.c' || echo '$(srcdir)/'`../shvar.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/shvar.Tpo $(DEPDIR)/shvar.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='../shvar.c' object='shvar.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o shvar.o `test -f '../shvar.c' || echo '$(srcdir)/'`../shvar.c
-
-shvar.obj: ../shvar.c
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT shvar.obj -MD -MP -MF $(DEPDIR)/shvar.Tpo -c -o shvar.obj `if test -f '../shvar.c'; then $(CYGPATH_W) '../shvar.c'; else $(CYGPATH_W) '$(srcdir)/../shvar.c'; fi`
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/shvar.Tpo $(DEPDIR)/shvar.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='../shvar.c' object='shvar.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o shvar.obj `if test -f '../shvar.c'; then $(CYGPATH_W) '../shvar.c'; else $(CYGPATH_W) '$(srcdir)/../shvar.c'; fi`
-
-utils.o: ../utils.c
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT utils.o -MD -MP -MF $(DEPDIR)/utils.Tpo -c -o utils.o `test -f '../utils.c' || echo '$(srcdir)/'`../utils.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/utils.Tpo $(DEPDIR)/utils.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='../utils.c' object='utils.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o utils.o `test -f '../utils.c' || echo '$(srcdir)/'`../utils.c
-
-utils.obj: ../utils.c
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT utils.obj -MD -MP -MF $(DEPDIR)/utils.Tpo -c -o utils.obj `if test -f '../utils.c'; then $(CYGPATH_W) '../utils.c'; else $(CYGPATH_W) '$(srcdir)/../utils.c'; fi`
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/utils.Tpo $(DEPDIR)/utils.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='../utils.c' object='utils.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o utils.obj `if test -f '../utils.c'; then $(CYGPATH_W) '../utils.c'; else $(CYGPATH_W) '$(srcdir)/../utils.c'; fi`
-
-writer.o: ../writer.c
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT writer.o -MD -MP -MF $(DEPDIR)/writer.Tpo -c -o writer.o `test -f '../writer.c' || echo '$(srcdir)/'`../writer.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/writer.Tpo $(DEPDIR)/writer.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='../writer.c' object='writer.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o writer.o `test -f '../writer.c' || echo '$(srcdir)/'`../writer.c
-
-writer.obj: ../writer.c
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT writer.obj -MD -MP -MF $(DEPDIR)/writer.Tpo -c -o writer.obj `if test -f '../writer.c'; then $(CYGPATH_W) '../writer.c'; else $(CYGPATH_W) '$(srcdir)/../writer.c'; fi`
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/writer.Tpo $(DEPDIR)/writer.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='../writer.c' object='writer.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o writer.obj `if test -f '../writer.c'; then $(CYGPATH_W) '../writer.c'; else $(CYGPATH_W) '$(srcdir)/../writer.c'; fi`
-
-mostlyclean-libtool:
-	-rm -f *.lo
-
-clean-libtool:
-	-rm -rf .libs _libs
-
-# This directory's subdirectories are mostly independent; you can cd
-# into them and run 'make' without going through this Makefile.
-# To change the values of 'make' variables: instead of editing Makefiles,
-# (1) if the variable is set in 'config.status', edit 'config.status'
-#     (which will cause the Makefiles to be regenerated when you run 'make');
-# (2) otherwise, pass the desired values on the 'make' command line.
-$(am__recursive_targets):
-	@fail=; \
-	if $(am__make_keepgoing); then \
-	  failcom='fail=yes'; \
-	else \
-	  failcom='exit 1'; \
-	fi; \
-	dot_seen=no; \
-	target=`echo $@ | sed s/-recursive//`; \
-	case "$@" in \
-	  distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
-	  *) list='$(SUBDIRS)' ;; \
-	esac; \
-	for subdir in $$list; do \
-	  echo "Making $$target in $$subdir"; \
-	  if test "$$subdir" = "."; then \
-	    dot_seen=yes; \
-	    local_target="$$target-am"; \
-	  else \
-	    local_target="$$target"; \
-	  fi; \
-	  ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
-	  || eval $$failcom; \
-	done; \
-	if test "$$dot_seen" = "no"; then \
-	  $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
-	fi; test -z "$$fail"
-
-ID: $(am__tagged_files)
-	$(am__define_uniq_tagged_files); mkid -fID $$unique
-tags: tags-recursive
-TAGS: tags
-
-tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
-	set x; \
-	here=`pwd`; \
-	if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
-	  include_option=--etags-include; \
-	  empty_fix=.; \
-	else \
-	  include_option=--include; \
-	  empty_fix=; \
-	fi; \
-	list='$(SUBDIRS)'; for subdir in $$list; do \
-	  if test "$$subdir" = .; then :; else \
-	    test ! -f $$subdir/TAGS || \
-	      set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
-	  fi; \
-	done; \
-	$(am__define_uniq_tagged_files); \
-	shift; \
-	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
-	  test -n "$$unique" || unique=$$empty_fix; \
-	  if test $$# -gt 0; then \
-	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
-	      "$$@" $$unique; \
-	  else \
-	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
-	      $$unique; \
-	  fi; \
-	fi
-ctags: ctags-recursive
-
-CTAGS: ctags
-ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
-	$(am__define_uniq_tagged_files); \
-	test -z "$(CTAGS_ARGS)$$unique" \
-	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
-	     $$unique
-
-GTAGS:
-	here=`$(am__cd) $(top_builddir) && pwd` \
-	  && $(am__cd) $(top_srcdir) \
-	  && gtags -i $(GTAGS_ARGS) "$$here"
-cscopelist: cscopelist-recursive
-
-cscopelist-am: $(am__tagged_files)
-	list='$(am__tagged_files)'; \
-	case "$(srcdir)" in \
-	  [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
-	  *) sdir=$(subdir)/$(srcdir) ;; \
-	esac; \
-	for i in $$list; do \
-	  if test -f "$$i"; then \
-	    echo "$(subdir)/$$i"; \
-	  else \
-	    echo "$$sdir/$$i"; \
-	  fi; \
-	done >> $(top_builddir)/cscope.files
-
-distclean-tags:
-	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-
-# Recover from deleted '.trs' file; this should ensure that
-# "rm -f foo.log; make foo.trs" re-run 'foo.test', and re-create
-# both 'foo.log' and 'foo.trs'.  Break the recipe in two subshells
-# to avoid problems with "make -n".
-.log.trs:
-	rm -f $< $@
-	$(MAKE) $(AM_MAKEFLAGS) $<
-
-# Leading 'am--fnord' is there to ensure the list of targets does not
-# expand to empty, as could happen e.g. with make check TESTS=''.
-am--fnord $(TEST_LOGS) $(TEST_LOGS:.log=.trs): $(am__force_recheck)
-am--force-recheck:
-	@:
-
-$(TEST_SUITE_LOG): $(TEST_LOGS)
-	@$(am__set_TESTS_bases); \
-	am__f_ok () { test -f "$$1" && test -r "$$1"; }; \
-	redo_bases=`for i in $$bases; do \
-	              am__f_ok $$i.trs && am__f_ok $$i.log || echo $$i; \
-	            done`; \
-	if test -n "$$redo_bases"; then \
-	  redo_logs=`for i in $$redo_bases; do echo $$i.log; done`; \
-	  redo_results=`for i in $$redo_bases; do echo $$i.trs; done`; \
-	  if $(am__make_dryrun); then :; else \
-	    rm -f $$redo_logs && rm -f $$redo_results || exit 1; \
-	  fi; \
-	fi; \
-	if test -n "$$am__remaking_logs"; then \
-	  echo "fatal: making $(TEST_SUITE_LOG): possible infinite" \
-	       "recursion detected" >&2; \
-	elif test -n "$$redo_logs"; then \
-	  am__remaking_logs=yes $(MAKE) $(AM_MAKEFLAGS) $$redo_logs; \
-	fi; \
-	if $(am__make_dryrun); then :; else \
-	  st=0;  \
-	  errmsg="fatal: making $(TEST_SUITE_LOG): failed to create"; \
-	  for i in $$redo_bases; do \
-	    test -f $$i.trs && test -r $$i.trs \
-	      || { echo "$$errmsg $$i.trs" >&2; st=1; }; \
-	    test -f $$i.log && test -r $$i.log \
-	      || { echo "$$errmsg $$i.log" >&2; st=1; }; \
-	  done; \
-	  test $$st -eq 0 || exit 1; \
-	fi
-	@$(am__sh_e_setup); $(am__tty_colors); $(am__set_TESTS_bases); \
-	ws='[ 	]'; \
-	results=`for b in $$bases; do echo $$b.trs; done`; \
-	test -n "$$results" || results=/dev/null; \
-	all=`  grep "^$$ws*:test-result:"           $$results | wc -l`; \
-	pass=` grep "^$$ws*:test-result:$$ws*PASS"  $$results | wc -l`; \
-	fail=` grep "^$$ws*:test-result:$$ws*FAIL"  $$results | wc -l`; \
-	skip=` grep "^$$ws*:test-result:$$ws*SKIP"  $$results | wc -l`; \
-	xfail=`grep "^$$ws*:test-result:$$ws*XFAIL" $$results | wc -l`; \
-	xpass=`grep "^$$ws*:test-result:$$ws*XPASS" $$results | wc -l`; \
-	error=`grep "^$$ws*:test-result:$$ws*ERROR" $$results | wc -l`; \
-	if test `expr $$fail + $$xpass + $$error` -eq 0; then \
-	  success=true; \
-	else \
-	  success=false; \
-	fi; \
-	br='==================='; br=$$br$$br$$br$$br; \
-	result_count () \
-	{ \
-	    if test x"$$1" = x"--maybe-color"; then \
-	      maybe_colorize=yes; \
-	    elif test x"$$1" = x"--no-color"; then \
-	      maybe_colorize=no; \
-	    else \
-	      echo "$@: invalid 'result_count' usage" >&2; exit 4; \
-	    fi; \
-	    shift; \
-	    desc=$$1 count=$$2; \
-	    if test $$maybe_colorize = yes && test $$count -gt 0; then \
-	      color_start=$$3 color_end=$$std; \
-	    else \
-	      color_start= color_end=; \
-	    fi; \
-	    echo "$${color_start}# $$desc $$count$${color_end}"; \
-	}; \
-	create_testsuite_report () \
-	{ \
-	  result_count $$1 "TOTAL:" $$all   "$$brg"; \
-	  result_count $$1 "PASS: " $$pass  "$$grn"; \
-	  result_count $$1 "SKIP: " $$skip  "$$blu"; \
-	  result_count $$1 "XFAIL:" $$xfail "$$lgn"; \
-	  result_count $$1 "FAIL: " $$fail  "$$red"; \
-	  result_count $$1 "XPASS:" $$xpass "$$red"; \
-	  result_count $$1 "ERROR:" $$error "$$mgn"; \
-	}; \
-	{								\
-	  echo "$(PACKAGE_STRING): $(subdir)/$(TEST_SUITE_LOG)" |	\
-	    $(am__rst_title);						\
-	  create_testsuite_report --no-color;				\
-	  echo;								\
-	  echo ".. contents:: :depth: 2";				\
-	  echo;								\
-	  for b in $$bases; do echo $$b; done				\
-	    | $(am__create_global_log);					\
-	} >$(TEST_SUITE_LOG).tmp || exit 1;				\
-	mv $(TEST_SUITE_LOG).tmp $(TEST_SUITE_LOG);			\
-	if $$success; then						\
-	  col="$$grn";							\
-	 else								\
-	  col="$$red";							\
-	  test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG);		\
-	fi;								\
-	echo "$${col}$$br$${std}"; 					\
-	echo "$${col}Testsuite summary for $(PACKAGE_STRING)$${std}";	\
-	echo "$${col}$$br$${std}"; 					\
-	create_testsuite_report --maybe-color;				\
-	echo "$$col$$br$$std";						\
-	if $$success; then :; else					\
-	  echo "$${col}See $(subdir)/$(TEST_SUITE_LOG)$${std}";		\
-	  if test -n "$(PACKAGE_BUGREPORT)"; then			\
-	    echo "$${col}Please report to $(PACKAGE_BUGREPORT)$${std}";	\
-	  fi;								\
-	  echo "$$col$$br$$std";					\
-	fi;								\
-	$$success || exit 1
-
-check-TESTS:
-	@list='$(RECHECK_LOGS)';           test -z "$$list" || rm -f $$list
-	@list='$(RECHECK_LOGS:.log=.trs)'; test -z "$$list" || rm -f $$list
-	@test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
-	@set +e; $(am__set_TESTS_bases); \
-	log_list=`for i in $$bases; do echo $$i.log; done`; \
-	trs_list=`for i in $$bases; do echo $$i.trs; done`; \
-	log_list=`echo $$log_list`; trs_list=`echo $$trs_list`; \
-	$(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) TEST_LOGS="$$log_list"; \
-	exit $$?;
-recheck: all 
-	@test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
-	@set +e; $(am__set_TESTS_bases); \
-	bases=`for i in $$bases; do echo $$i; done \
-	         | $(am__list_recheck_tests)` || exit 1; \
-	log_list=`for i in $$bases; do echo $$i.log; done`; \
-	log_list=`echo $$log_list`; \
-	$(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) \
-	        am__force_recheck=am--force-recheck \
-	        TEST_LOGS="$$log_list"; \
-	exit $$?
-test-ifcfg-rh-utils.log: test-ifcfg-rh-utils$(EXEEXT)
-	@p='test-ifcfg-rh-utils$(EXEEXT)'; \
-	b='test-ifcfg-rh-utils'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-test-ifcfg-rh.log: test-ifcfg-rh$(EXEEXT)
-	@p='test-ifcfg-rh$(EXEEXT)'; \
-	b='test-ifcfg-rh'; \
-	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-.test.log:
-	@p='$<'; \
-	$(am__set_b); \
-	$(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \
-	--log-file $$b.log --trs-file $$b.trs \
-	$(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \
-	"$$tst" $(AM_TESTS_FD_REDIRECT)
-@am__EXEEXT_TRUE@.test$(EXEEXT).log:
-@am__EXEEXT_TRUE@	@p='$<'; \
-@am__EXEEXT_TRUE@	$(am__set_b); \
-@am__EXEEXT_TRUE@	$(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \
-@am__EXEEXT_TRUE@	--log-file $$b.log --trs-file $$b.trs \
-@am__EXEEXT_TRUE@	$(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \
-@am__EXEEXT_TRUE@	"$$tst" $(AM_TESTS_FD_REDIRECT)
-
-distdir: $(DISTFILES)
-	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
-	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
-	list='$(DISTFILES)'; \
-	  dist_files=`for file in $$list; do echo $$file; done | \
-	  sed -e "s|^$$srcdirstrip/||;t" \
-	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
-	case $$dist_files in \
-	  */*) $(MKDIR_P) `echo "$$dist_files" | \
-			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
-			   sort -u` ;; \
-	esac; \
-	for file in $$dist_files; do \
-	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
-	  if test -d $$d/$$file; then \
-	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
-	    if test -d "$(distdir)/$$file"; then \
-	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
-	    fi; \
-	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
-	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
-	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
-	    fi; \
-	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
-	  else \
-	    test -f "$(distdir)/$$file" \
-	    || cp -p $$d/$$file "$(distdir)/$$file" \
-	    || exit 1; \
-	  fi; \
-	done
-	@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
-	  if test "$$subdir" = .; then :; else \
-	    $(am__make_dryrun) \
-	      || test -d "$(distdir)/$$subdir" \
-	      || $(MKDIR_P) "$(distdir)/$$subdir" \
-	      || exit 1; \
-	    dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
-	    $(am__relativize); \
-	    new_distdir=$$reldir; \
-	    dir1=$$subdir; dir2="$(top_distdir)"; \
-	    $(am__relativize); \
-	    new_top_distdir=$$reldir; \
-	    echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
-	    echo "     am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
-	    ($(am__cd) $$subdir && \
-	      $(MAKE) $(AM_MAKEFLAGS) \
-	        top_distdir="$$new_top_distdir" \
-	        distdir="$$new_distdir" \
-		am__remove_distdir=: \
-		am__skip_length_check=: \
-		am__skip_mode_fix=: \
-	        distdir) \
-	      || exit 1; \
-	  fi; \
-	done
-@ENABLE_TESTS_FALSE@check-local:
-check-am: all-am
-	$(MAKE) $(AM_MAKEFLAGS) check-TESTS check-local
-check: check-recursive
-all-am: Makefile $(PROGRAMS)
-installdirs: installdirs-recursive
-installdirs-am:
-install: install-recursive
-install-exec: install-exec-recursive
-install-data: install-data-recursive
-uninstall: uninstall-recursive
-
-install-am: all-am
-	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-
-installcheck: installcheck-recursive
-install-strip:
-	if test -z '$(STRIP)'; then \
-	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
-	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
-	      install; \
-	else \
-	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
-	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
-	    "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
-	fi
-mostlyclean-generic:
-	-test -z "$(TEST_LOGS)" || rm -f $(TEST_LOGS)
-	-test -z "$(TEST_LOGS:.log=.trs)" || rm -f $(TEST_LOGS:.log=.trs)
-	-test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
-
-clean-generic:
-
-distclean-generic:
-	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
-
-maintainer-clean-generic:
-	@echo "This command is intended for maintainers to use"
-	@echo "it deletes files that may require special tools to rebuild."
-clean: clean-recursive
-
-clean-am: clean-generic clean-libtool clean-noinstPROGRAMS \
-	mostlyclean-am
-
-distclean: distclean-recursive
-	-rm -rf ./$(DEPDIR)
-	-rm -f Makefile
-distclean-am: clean-am distclean-compile distclean-generic \
-	distclean-tags
-
-dvi: dvi-recursive
-
-dvi-am:
-
-html: html-recursive
-
-html-am:
-
-info: info-recursive
-
-info-am:
-
-install-data-am:
-
-install-dvi: install-dvi-recursive
-
-install-dvi-am:
-
-install-exec-am:
-
-install-html: install-html-recursive
-
-install-html-am:
-
-install-info: install-info-recursive
-
-install-info-am:
-
-install-man:
-
-install-pdf: install-pdf-recursive
-
-install-pdf-am:
-
-install-ps: install-ps-recursive
-
-install-ps-am:
-
-installcheck-am:
-
-maintainer-clean: maintainer-clean-recursive
-	-rm -rf ./$(DEPDIR)
-	-rm -f Makefile
-maintainer-clean-am: distclean-am maintainer-clean-generic
-
-mostlyclean: mostlyclean-recursive
-
-mostlyclean-am: mostlyclean-compile mostlyclean-generic \
-	mostlyclean-libtool
-
-pdf: pdf-recursive
-
-pdf-am:
-
-ps: ps-recursive
-
-ps-am:
-
-uninstall-am:
-
-.MAKE: $(am__recursive_targets) check-am install-am install-strip
-
-.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \
-	check-TESTS check-am check-local clean clean-generic \
-	clean-libtool clean-noinstPROGRAMS cscopelist-am ctags \
-	ctags-am distclean distclean-compile distclean-generic \
-	distclean-libtool distclean-tags distdir dvi dvi-am html \
-	html-am info info-am install install-am install-data \
-	install-data-am install-dvi install-dvi-am install-exec \
-	install-exec-am install-html install-html-am install-info \
-	install-info-am install-man install-pdf install-pdf-am \
-	install-ps install-ps-am install-strip installcheck \
-	installcheck-am installdirs installdirs-am maintainer-clean \
-	maintainer-clean-generic mostlyclean mostlyclean-compile \
-	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
-	recheck tags tags-am uninstall uninstall-am
-
-.PRECIOUS: Makefile
-
-
-@ENABLE_TESTS_TRUE@@GNOME_CODE_COVERAGE_RULES@
-
-@ENABLE_TESTS_TRUE@@VALGRIND_RULES@
-
-@ENABLE_TESTS_TRUE@check-local:
-@ENABLE_TESTS_TRUE@	LD_BIND_NOW=1 LD_PRELOAD=$(builddir)/../.libs/libnm-settings-plugin-ifcfg-rh.so $(top_builddir)/src/NetworkManager --version >/dev/null
-
-# Tell versions [3.59,3.63) of GNU make to not export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
diff --git a/src/settings/plugins/ifcfg-rh/tests/network-scripts/Makefile.am b/src/settings/plugins/ifcfg-rh/tests/network-scripts/Makefile.am
deleted file mode 100644
index de9c1ed7..00000000
--- a/src/settings/plugins/ifcfg-rh/tests/network-scripts/Makefile.am
+++ /dev/null
@@ -1,170 +0,0 @@
-EXTRA_DIST = \
-	ifcfg-test-minimal \
-	ifcfg-test-misc-variables \
-	ifcfg-test-variables-corner-cases-1 \
-	ifcfg-test-nm-controlled \
-	ifcfg-test-nm-controlled-unrecognized \
-	ifcfg-test-unrecognized \
-	ifcfg-test-wired-static \
-	ifcfg-test-wired-static-bootproto \
-	ifcfg-test-wired-dhcp \
-	ifcfg-test-wired-dhcp-plus-ip \
-	ifcfg-test-wired-shared-plus-ip \
-	ifcfg-test-wired-dhcp-send-hostname \
-	ifcfg-test-wired-dhcp6-only \
-	ifcfg-test-wired-autoip \
-	ifcfg-test-wired-global-gateway \
-	network-test-wired-global-gateway \
-	ifcfg-test-wired-global-gateway-ignore \
-	network-test-wired-global-gateway-ignore \
-	ifcfg-test-wired-obsolete-gateway-n \
-	ifcfg-test-wired-never-default \
-	network-test-wired-never-default \
-	ifcfg-test-wired-defroute-no \
-	ifcfg-test-wired-defroute-no-gatewaydev-yes \
-	network-test-wired-defroute-no-gatewaydev-yes \
-	ifcfg-test-wired-8021x-peap-mschapv2 \
-	keys-test-wired-8021x-peap-mschapv2 \
-	ifcfg-test-wired-8021x-tls-agent \
-	ifcfg-test-wired-8021x-tls-always \
-	ifcfg-test-wired-802-1X-subj-matches \
-	ifcfg-test-wired-802-1x-ttls-eapgtc \
-	ifcfg-test-onboot-no \
-	ifcfg-test-noip \
-	ifcfg-test-wifi-open \
-	ifcfg-test-wifi-open-auto \
-	ifcfg-test-wifi-open-ssid-quoted \
-	ifcfg-test-wifi-open-ssid-long-quoted \
-	ifcfg-test-wifi-open-ssid-hex \
-	ifcfg-test-wifi-open-ssid-long-hex \
-	ifcfg-test-wifi-open-ssid-bad-hex \
-	ifcfg-test-wifi-wep \
-	keys-test-wifi-wep \
-	ifcfg-test-wifi-wep-adhoc \
-	keys-test-wifi-wep-adhoc \
-	ifcfg-test-wifi-wep-eap-ttls-chap \
-	keys-test-wifi-wep-eap-ttls-chap \
-	ifcfg-test-wifi-leap \
-	keys-test-wifi-leap \
-	ifcfg-test-wifi-leap-agent \
-	ifcfg-test-wifi-leap-always-ask \
-	ifcfg-test-wifi-wpa-psk \
-	keys-test-wifi-wpa-psk \
-	ifcfg-test-wifi-wpa-psk-2 \
-	keys-test-wifi-wpa-psk-2 \
-	ifcfg-test-wifi-wpa-psk-unquoted \
-	keys-test-wifi-wpa-psk-unquoted \
-	ifcfg-test-wifi-wpa-psk-unquoted2 \
-	keys-test-wifi-wpa-psk-unquoted2 \
-	ifcfg-test-wifi-wpa-psk-adhoc \
-	keys-test-wifi-wpa-psk-adhoc \
-	ifcfg-test-wifi-wpa-psk-hex \
-	keys-test-wifi-wpa-psk-hex \
-	ifcfg-test-wifi-wpa-eap-tls \
-	keys-test-wifi-wpa-eap-tls \
-	ifcfg-test-wifi-wpa-eap-ttls-tls \
-	keys-test-wifi-wpa-eap-ttls-tls \
-	ifcfg-test-wifi-hidden \
-	ifcfg-test-wifi-band-a \
-	ifcfg-test-wifi-band-a-channel-mismatch \
-	ifcfg-test-wifi-band-bg-channel-mismatch \
-	ifcfg-test-wifi-mac-random-always \
-	ifcfg-test-wifi-mac-random-never \
-	ifcfg-test-wifi-mac-random-default \
-	ifcfg-test-wifi-mac-random-missing \
-	test_ca_cert.pem \
-	test1_key_and_cert.pem \
-	ifcfg-test-ibft \
-	ifcfg-test-static-routes-legacy \
-	route-test-static-routes-legacy \
-	ifcfg-test-sit-ignore \
-	ifcfg-test-wired-static-routes \
-	route-test-wired-static-routes \
-	ifcfg-test-wired-static-routes-legacy \
-	route-test-wired-static-routes-legacy \
-	ifcfg-test-wired-ipv4-manual-1 \
-	ifcfg-test-wired-ipv4-manual-2 \
-	ifcfg-test-wired-ipv4-manual-3 \
-	ifcfg-test-wired-ipv4-manual-4 \
-	ifcfg-test-wired-ipv6-manual \
-	route6-test-wired-ipv6-manual \
-	ifcfg-test-wired-static-no-prefix-8 \
-	ifcfg-test-wired-static-no-prefix-16 \
-	ifcfg-test-wired-static-no-prefix-24 \
-	ifcfg-test-wired-ipv6-only \
-	ifcfg-test-wifi-wep-passphrase \
-	keys-test-wifi-wep-passphrase \
-	ifcfg-test-wifi-wep-40-ascii \
-	keys-test-wifi-wep-40-ascii \
-	ifcfg-test-wifi-wep-104-ascii \
-	keys-test-wifi-wep-104-ascii \
-	ifcfg-test-wired-qeth-static \
-	ifcfg-test-wired-ctc-static \
-	ifcfg-test-bridge-main \
-	ifcfg-test-bridge-component \
-	ifcfg-test-bridge-missing-stp \
-	ifcfg-test-vlan-interface \
-	ifcfg-test-vlan-only-vlanid \
-	ifcfg-test-vlan-only-device \
-	ifcfg-test-vlan-physdev \
-	ifcfg-test-vlan-reorder-hdr-1 \
-	ifcfg-test-vlan-reorder-hdr-2 \
-	ifcfg-test-vlan-flags-1 \
-	ifcfg-test-vlan-flags-2 \
-	ifcfg-test-wifi-wep-no-keys \
-	ifcfg-test-permissions \
-	ifcfg-test-wifi-wep-agent-keys \
-	ifcfg-test-wifi-dynamic-wep-leap \
-	keys-test-wifi-dynamic-wep-leap \
-	ifcfg-test-infiniband \
-	ifcfg-test-bond-main \
-	ifcfg-test-bond-slave \
-	ifcfg-test-bond-slave-ib \
-	ifcfg-test-bond-mode-numeric \
-	ifcfg-test-dcb \
-	ifcfg-test-dcb-default-app-priorities \
-	ifcfg-test-dcb-bad-booleans \
-	ifcfg-test-dcb-short-booleans \
-	ifcfg-test-dcb-bad-uints \
-	ifcfg-test-dcb-short-uints \
-	ifcfg-test-dcb-bad-percent \
-	ifcfg-test-dcb-short-percent \
-	ifcfg-test-dcb-pgpct-not-100 \
-	ifcfg-test-fcoe-fabric \
-	ifcfg-test-fcoe-vn2vn \
-	ifcfg-test-team-master-1 \
-	ifcfg-test-team-master-2 \
-	ifcfg-test-team-master-invalid \
-	ifcfg-test-team-port-1 \
-	ifcfg-test-team-port-2 \
-	ifcfg-test-team-port-empty-config \
-	ifcfg-test-vlan-trailing-spaces \
-	ifcfg-test-dns-options \
-	ifcfg-test-wired-wake-on-lan \
-	ifcfg-test-wired-ipv6-only-1
-
-# make target dependencies can't have colons in their names, which ends up
-# meaning that we can't add the alias files to EXTRA_DIST
-ALIAS_FILES = \
-	ifcfg-aliasem0 \
-	ifcfg-aliasem0:1 \
-	ifcfg-aliasem0:2 \
-	ifcfg-aliasem0:99 \
-	ifcfg-aliasem1 \
-	ifcfg-aliasem1:1 \
-	ifcfg-aliasem2 \
-	ifcfg-aliasem2:1
-
-dist-hook:
-	@for f in $(ALIAS_FILES); do \
-		cp $(abs_srcdir)/$$f $(distdir)/; \
-	done
-
-check-local:
-	@for f in $(EXTRA_DIST) $(ALIAS_FILES); do \
-		chmod 0600 $(abs_srcdir)/$$f; \
-	done
-
-# Make the special temp dir for some written connections
-	mkdir -p $(abs_builddir)/tmp
-
diff --git a/src/settings/plugins/ifcfg-rh/tests/network-scripts/Makefile.in b/src/settings/plugins/ifcfg-rh/tests/network-scripts/Makefile.in
deleted file mode 100644
index 583f0809..00000000
--- a/src/settings/plugins/ifcfg-rh/tests/network-scripts/Makefile.in
+++ /dev/null
@@ -1,776 +0,0 @@
-# Makefile.in generated by automake 1.15 from Makefile.am.
-# @configure_input@
-
-# Copyright (C) 1994-2014 Free Software Foundation, Inc.
-
-# This Makefile.in is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
-@SET_MAKE@
-VPATH = @srcdir@
-am__is_gnu_make = { \
-  if test -z '$(MAKELEVEL)'; then \
-    false; \
-  elif test -n '$(MAKE_HOST)'; then \
-    true; \
-  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
-    true; \
-  else \
-    false; \
-  fi; \
-}
-am__make_running_with_option = \
-  case $${target_option-} in \
-      ?) ;; \
-      *) echo "am__make_running_with_option: internal error: invalid" \
-              "target option '$${target_option-}' specified" >&2; \
-         exit 1;; \
-  esac; \
-  has_opt=no; \
-  sane_makeflags=$$MAKEFLAGS; \
-  if $(am__is_gnu_make); then \
-    sane_makeflags=$$MFLAGS; \
-  else \
-    case $$MAKEFLAGS in \
-      *\\[\ \	]*) \
-        bs=\\; \
-        sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
-          | sed "s/$$bs$$bs[$$bs $$bs	]*//g"`;; \
-    esac; \
-  fi; \
-  skip_next=no; \
-  strip_trailopt () \
-  { \
-    flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
-  }; \
-  for flg in $$sane_makeflags; do \
-    test $$skip_next = yes && { skip_next=no; continue; }; \
-    case $$flg in \
-      *=*|--*) continue;; \
-        -*I) strip_trailopt 'I'; skip_next=yes;; \
-      -*I?*) strip_trailopt 'I';; \
-        -*O) strip_trailopt 'O'; skip_next=yes;; \
-      -*O?*) strip_trailopt 'O';; \
-        -*l) strip_trailopt 'l'; skip_next=yes;; \
-      -*l?*) strip_trailopt 'l';; \
-      -[dEDm]) skip_next=yes;; \
-      -[JT]) skip_next=yes;; \
-    esac; \
-    case $$flg in \
-      *$$target_option*) has_opt=yes; break;; \
-    esac; \
-  done; \
-  test $$has_opt = yes
-am__make_dryrun = (target_option=n; $(am__make_running_with_option))
-am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
-pkgdatadir = $(datadir)/@PACKAGE@
-pkgincludedir = $(includedir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
-pkglibexecdir = $(libexecdir)/@PACKAGE@
-am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-install_sh_DATA = $(install_sh) -c -m 644
-install_sh_PROGRAM = $(install_sh) -c
-install_sh_SCRIPT = $(install_sh) -c
-INSTALL_HEADER = $(INSTALL_DATA)
-transform = $(program_transform_name)
-NORMAL_INSTALL = :
-PRE_INSTALL = :
-POST_INSTALL = :
-NORMAL_UNINSTALL = :
-PRE_UNINSTALL = :
-POST_UNINSTALL = :
-build_triplet = @build@
-host_triplet = @host@
-subdir = src/settings/plugins/ifcfg-rh/tests/network-scripts
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/m4/attributes.m4 \
-	$(top_srcdir)/m4/ax_lib_readline.m4 \
-	$(top_srcdir)/m4/compiler_options.m4 \
-	$(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/git-sha-record.m4 \
-	$(top_srcdir)/m4/gnome-code-coverage.m4 \
-	$(top_srcdir)/m4/gtk-doc.m4 $(top_srcdir)/m4/iconv.m4 \
-	$(top_srcdir)/m4/intlmacosx.m4 $(top_srcdir)/m4/intltool.m4 \
-	$(top_srcdir)/m4/introspection.m4 $(top_srcdir)/m4/lib-ld.m4 \
-	$(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \
-	$(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
-	$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
-	$(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \
-	$(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \
-	$(top_srcdir)/m4/vapigen.m4 $(top_srcdir)/configure.ac
-am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
-	$(ACLOCAL_M4)
-DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
-mkinstalldirs = $(install_sh) -d
-CONFIG_HEADER = $(top_builddir)/config.h
-CONFIG_CLEAN_FILES =
-CONFIG_CLEAN_VPATH_FILES =
-AM_V_P = $(am__v_P_@AM_V@)
-am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
-am__v_P_0 = false
-am__v_P_1 = :
-AM_V_GEN = $(am__v_GEN_@AM_V@)
-am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
-am__v_GEN_0 = @echo "  GEN     " $@;
-am__v_GEN_1 = 
-AM_V_at = $(am__v_at_@AM_V@)
-am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
-am__v_at_0 = @
-am__v_at_1 = 
-SOURCES =
-DIST_SOURCES =
-am__can_run_installinfo = \
-  case $$AM_UPDATE_INFO_DIR in \
-    n|no|NO) false;; \
-    *) (install-info --version) >/dev/null 2>&1;; \
-  esac
-am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
-am__DIST_COMMON = $(srcdir)/Makefile.in
-DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
-ACLOCAL = @ACLOCAL@
-ALL_LINGUAS = @ALL_LINGUAS@
-AMTAR = @AMTAR@
-AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
-AM_TESTS_FD_REDIRECT = @AM_TESTS_FD_REDIRECT@
-AR = @AR@
-AUTOCONF = @AUTOCONF@
-AUTOHEADER = @AUTOHEADER@
-AUTOMAKE = @AUTOMAKE@
-AWK = @AWK@
-BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@
-BLUEZ5_LIBS = @BLUEZ5_LIBS@
-CC = @CC@
-CCDEPMODE = @CCDEPMODE@
-CFLAGS = @CFLAGS@
-CODE_COVERAGE_CFLAGS = @CODE_COVERAGE_CFLAGS@
-CODE_COVERAGE_ENABLED = @CODE_COVERAGE_ENABLED@
-CODE_COVERAGE_LDFLAGS = @CODE_COVERAGE_LDFLAGS@
-CPP = @CPP@
-CPPFLAGS = @CPPFLAGS@
-CXX = @CXX@
-CXXCPP = @CXXCPP@
-CXXDEPMODE = @CXXDEPMODE@
-CXXFLAGS = @CXXFLAGS@
-CYGPATH_W = @CYGPATH_W@
-DBUS_CFLAGS = @DBUS_CFLAGS@
-DBUS_LIBS = @DBUS_LIBS@
-DBUS_SYS_DIR = @DBUS_SYS_DIR@
-DEFS = @DEFS@
-DEPDIR = @DEPDIR@
-DHCLIENT_PATH = @DHCLIENT_PATH@
-DHCPCD_PATH = @DHCPCD_PATH@
-DISTRO_NETWORK_SERVICE = @DISTRO_NETWORK_SERVICE@
-DLLTOOL = @DLLTOOL@
-DL_LIBS = @DL_LIBS@
-DNSMASQ_PATH = @DNSMASQ_PATH@
-DNSSEC_TRIGGER_SCRIPT = @DNSSEC_TRIGGER_SCRIPT@
-DSYMUTIL = @DSYMUTIL@
-DUMPBIN = @DUMPBIN@
-ECHO_C = @ECHO_C@
-ECHO_N = @ECHO_N@
-ECHO_T = @ECHO_T@
-EGREP = @EGREP@
-EXEEXT = @EXEEXT@
-FGREP = @FGREP@
-GENHTML = @GENHTML@
-GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
-GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
-GLIB_CFLAGS = @GLIB_CFLAGS@
-GLIB_GENMARSHAL = @GLIB_GENMARSHAL@
-GLIB_LIBS = @GLIB_LIBS@
-GLIB_MAKEFILE = @GLIB_MAKEFILE@
-GLIB_MKENUMS = @GLIB_MKENUMS@
-GMSGFMT = @GMSGFMT@
-GMSGFMT_015 = @GMSGFMT_015@
-GNUTLS_CFLAGS = @GNUTLS_CFLAGS@
-GNUTLS_LIBS = @GNUTLS_LIBS@
-GREP = @GREP@
-GTKDOC_CHECK = @GTKDOC_CHECK@
-GTKDOC_CHECK_PATH = @GTKDOC_CHECK_PATH@
-GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
-GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
-GTKDOC_MKPDF = @GTKDOC_MKPDF@
-GTKDOC_REBASE = @GTKDOC_REBASE@
-GUDEV_CFLAGS = @GUDEV_CFLAGS@
-GUDEV_LIBS = @GUDEV_LIBS@
-HTML_DIR = @HTML_DIR@
-INSTALL = @INSTALL@
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-INTLLIBS = @INTLLIBS@
-INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@
-INTLTOOL_MERGE = @INTLTOOL_MERGE@
-INTLTOOL_PERL = @INTLTOOL_PERL@
-INTLTOOL_UPDATE = @INTLTOOL_UPDATE@
-INTLTOOL_V_MERGE = @INTLTOOL_V_MERGE@
-INTLTOOL_V_MERGE_OPTIONS = @INTLTOOL_V_MERGE_OPTIONS@
-INTLTOOL__v_MERGE_ = @INTLTOOL__v_MERGE_@
-INTLTOOL__v_MERGE_0 = @INTLTOOL__v_MERGE_0@
-INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
-INTROSPECTION_CFLAGS = @INTROSPECTION_CFLAGS@
-INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
-INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
-INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
-INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
-INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
-INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
-INTROSPECTION_TYPELIBDIR = @INTROSPECTION_TYPELIBDIR@
-IPTABLES_PATH = @IPTABLES_PATH@
-JANSSON_CFLAGS = @JANSSON_CFLAGS@
-JANSSON_LIBS = @JANSSON_LIBS@
-KERNEL_FIRMWARE_DIR = @KERNEL_FIRMWARE_DIR@
-LCOV = @LCOV@
-LD = @LD@
-LDFLAGS = @LDFLAGS@
-LIBAUDIT_CFLAGS = @LIBAUDIT_CFLAGS@
-LIBAUDIT_LIBS = @LIBAUDIT_LIBS@
-LIBICONV = @LIBICONV@
-LIBINTL = @LIBINTL@
-LIBM = @LIBM@
-LIBNDP_CFLAGS = @LIBNDP_CFLAGS@
-LIBNDP_LIBS = @LIBNDP_LIBS@
-LIBNL_CFLAGS = @LIBNL_CFLAGS@
-LIBNL_LIBS = @LIBNL_LIBS@
-LIBOBJS = @LIBOBJS@
-LIBS = @LIBS@
-LIBSOUP_CFLAGS = @LIBSOUP_CFLAGS@
-LIBSOUP_LIBS = @LIBSOUP_LIBS@
-LIBSYSTEMD_CFLAGS = @LIBSYSTEMD_CFLAGS@
-LIBSYSTEMD_LIBS = @LIBSYSTEMD_LIBS@
-LIBTEAMDCTL_CFLAGS = @LIBTEAMDCTL_CFLAGS@
-LIBTEAMDCTL_LIBS = @LIBTEAMDCTL_LIBS@
-LIBTOOL = @LIBTOOL@
-LIPO = @LIPO@
-LN_S = @LN_S@
-LOG_DRIVER = @LOG_DRIVER@
-LTLIBICONV = @LTLIBICONV@
-LTLIBINTL = @LTLIBINTL@
-LTLIBOBJS = @LTLIBOBJS@
-LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
-MAINT = @MAINT@
-MAKEINFO = @MAKEINFO@
-MANIFEST_TOOL = @MANIFEST_TOOL@
-MKDIR_P = @MKDIR_P@
-MM_GLIB_CFLAGS = @MM_GLIB_CFLAGS@
-MM_GLIB_LIBS = @MM_GLIB_LIBS@
-MOC = @MOC@
-MSGFMT = @MSGFMT@
-MSGFMT_015 = @MSGFMT_015@
-MSGMERGE = @MSGMERGE@
-NEWT_CFLAGS = @NEWT_CFLAGS@
-NEWT_LIBS = @NEWT_LIBS@
-NM = @NM@
-NMEDIT = @NMEDIT@
-NM_CONFIG_DEFAULT_AUTH_POLKIT_TEXT = @NM_CONFIG_DEFAULT_AUTH_POLKIT_TEXT@
-NM_CONFIG_DEFAULT_DNS_RC_MANAGER = @NM_CONFIG_DEFAULT_DNS_RC_MANAGER@
-NM_CONFIG_DEFAULT_LOGGING_AUDIT_TEXT = @NM_CONFIG_DEFAULT_LOGGING_AUDIT_TEXT@
-NM_CONFIG_LOGGING_BACKEND_DEFAULT_TEXT = @NM_CONFIG_LOGGING_BACKEND_DEFAULT_TEXT@
-NM_MAJOR_VERSION = @NM_MAJOR_VERSION@
-NM_MICRO_VERSION = @NM_MICRO_VERSION@
-NM_MINOR_VERSION = @NM_MINOR_VERSION@
-NM_MODIFY_SYSTEM_POLICY = @NM_MODIFY_SYSTEM_POLICY@
-NM_VERSION = @NM_VERSION@
-NSS_CFLAGS = @NSS_CFLAGS@
-NSS_LIBS = @NSS_LIBS@
-OBJDUMP = @OBJDUMP@
-OBJEXT = @OBJEXT@
-OTOOL = @OTOOL@
-OTOOL64 = @OTOOL64@
-PACKAGE = @PACKAGE@
-PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
-PACKAGE_NAME = @PACKAGE_NAME@
-PACKAGE_STRING = @PACKAGE_STRING@
-PACKAGE_TARNAME = @PACKAGE_TARNAME@
-PACKAGE_URL = @PACKAGE_URL@
-PACKAGE_VERSION = @PACKAGE_VERSION@
-PATH_SEPARATOR = @PATH_SEPARATOR@
-PERL = @PERL@
-PKG_CONFIG = @PKG_CONFIG@
-PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
-PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
-POLKIT_CFLAGS = @POLKIT_CFLAGS@
-POLKIT_LIBS = @POLKIT_LIBS@
-POSUB = @POSUB@
-PPPD_PATH = @PPPD_PATH@
-PPPD_PLUGIN_DIR = @PPPD_PLUGIN_DIR@
-QT_CFLAGS = @QT_CFLAGS@
-QT_LIBS = @QT_LIBS@
-RANLIB = @RANLIB@
-READLINE_LIBS = @READLINE_LIBS@
-SANITIZERS = @SANITIZERS@
-SANITIZER_ENV = @SANITIZER_ENV@
-SED = @SED@
-SELINUX_CFLAGS = @SELINUX_CFLAGS@
-SELINUX_LIBS = @SELINUX_LIBS@
-SET_MAKE = @SET_MAKE@
-SHELL = @SHELL@
-STRIP = @STRIP@
-SYSTEMD_200_CFLAGS = @SYSTEMD_200_CFLAGS@
-SYSTEMD_200_LIBS = @SYSTEMD_200_LIBS@
-SYSTEMD_INHIBIT_CFLAGS = @SYSTEMD_INHIBIT_CFLAGS@
-SYSTEMD_INHIBIT_LIBS = @SYSTEMD_INHIBIT_LIBS@
-SYSTEMD_JOURNAL_CFLAGS = @SYSTEMD_JOURNAL_CFLAGS@
-SYSTEMD_JOURNAL_LIBS = @SYSTEMD_JOURNAL_LIBS@
-SYSTEMD_LOGIN_CFLAGS = @SYSTEMD_LOGIN_CFLAGS@
-SYSTEMD_LOGIN_LIBS = @SYSTEMD_LOGIN_LIBS@
-SYSTEM_CA_PATH = @SYSTEM_CA_PATH@
-UDEV_DIR = @UDEV_DIR@
-USE_NLS = @USE_NLS@
-UUID_CFLAGS = @UUID_CFLAGS@
-UUID_LIBS = @UUID_LIBS@
-VALGRIND_RULES = @VALGRIND_RULES@
-VAPIGEN = @VAPIGEN@
-VAPIGEN_MAKEFILE = @VAPIGEN_MAKEFILE@
-VAPIGEN_VAPIDIR = @VAPIGEN_VAPIDIR@
-VERSION = @VERSION@
-XGETTEXT = @XGETTEXT@
-XGETTEXT_015 = @XGETTEXT_015@
-XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
-abs_builddir = @abs_builddir@
-abs_srcdir = @abs_srcdir@
-abs_top_builddir = @abs_top_builddir@
-abs_top_srcdir = @abs_top_srcdir@
-ac_ct_AR = @ac_ct_AR@
-ac_ct_CC = @ac_ct_CC@
-ac_ct_CXX = @ac_ct_CXX@
-ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
-ac_ct_RANLIB = @ac_ct_RANLIB@
-am__include = @am__include@
-am__leading_dot = @am__leading_dot@
-am__quote = @am__quote@
-am__tar = @am__tar@
-am__untar = @am__untar@
-bindir = @bindir@
-build = @build@
-build_alias = @build_alias@
-build_cpu = @build_cpu@
-build_os = @build_os@
-build_vendor = @build_vendor@
-builddir = @builddir@
-datadir = @datadir@
-datarootdir = @datarootdir@
-docdir = @docdir@
-dvidir = @dvidir@
-exec_prefix = @exec_prefix@
-host = @host@
-host_alias = @host_alias@
-host_cpu = @host_cpu@
-host_os = @host_os@
-host_vendor = @host_vendor@
-htmldir = @htmldir@
-includedir = @includedir@
-infodir = @infodir@
-install_sh = @install_sh@
-intltool__v_merge_options_ = @intltool__v_merge_options_@
-intltool__v_merge_options_0 = @intltool__v_merge_options_0@
-libdir = @libdir@
-libexecdir = @libexecdir@
-localedir = @localedir@
-localstatedir = @localstatedir@
-mandir = @mandir@
-mkdir_p = @mkdir_p@
-nmbinary = @nmbinary@
-nmconfdir = @nmconfdir@
-nmdatadir = @nmdatadir@
-nmlibdir = @nmlibdir@
-nmrundir = @nmrundir@
-nmstatedir = @nmstatedir@
-oldincludedir = @oldincludedir@
-pdfdir = @pdfdir@
-prefix = @prefix@
-program_transform_name = @program_transform_name@
-psdir = @psdir@
-runstatedir = @runstatedir@
-sbindir = @sbindir@
-sharedstatedir = @sharedstatedir@
-srcdir = @srcdir@
-subdirs = @subdirs@
-sysconfdir = @sysconfdir@
-systemdsystemunitdir = @systemdsystemunitdir@
-target_alias = @target_alias@
-top_build_prefix = @top_build_prefix@
-top_builddir = @top_builddir@
-top_srcdir = @top_srcdir@
-with_dhclient = @with_dhclient@
-with_dhcpcd = @with_dhcpcd@
-with_netconfig = @with_netconfig@
-with_resolvconf = @with_resolvconf@
-with_valgrind = @with_valgrind@
-EXTRA_DIST = \
-	ifcfg-test-minimal \
-	ifcfg-test-misc-variables \
-	ifcfg-test-variables-corner-cases-1 \
-	ifcfg-test-nm-controlled \
-	ifcfg-test-nm-controlled-unrecognized \
-	ifcfg-test-unrecognized \
-	ifcfg-test-wired-static \
-	ifcfg-test-wired-static-bootproto \
-	ifcfg-test-wired-dhcp \
-	ifcfg-test-wired-dhcp-plus-ip \
-	ifcfg-test-wired-shared-plus-ip \
-	ifcfg-test-wired-dhcp-send-hostname \
-	ifcfg-test-wired-dhcp6-only \
-	ifcfg-test-wired-autoip \
-	ifcfg-test-wired-global-gateway \
-	network-test-wired-global-gateway \
-	ifcfg-test-wired-global-gateway-ignore \
-	network-test-wired-global-gateway-ignore \
-	ifcfg-test-wired-obsolete-gateway-n \
-	ifcfg-test-wired-never-default \
-	network-test-wired-never-default \
-	ifcfg-test-wired-defroute-no \
-	ifcfg-test-wired-defroute-no-gatewaydev-yes \
-	network-test-wired-defroute-no-gatewaydev-yes \
-	ifcfg-test-wired-8021x-peap-mschapv2 \
-	keys-test-wired-8021x-peap-mschapv2 \
-	ifcfg-test-wired-8021x-tls-agent \
-	ifcfg-test-wired-8021x-tls-always \
-	ifcfg-test-wired-802-1X-subj-matches \
-	ifcfg-test-wired-802-1x-ttls-eapgtc \
-	ifcfg-test-onboot-no \
-	ifcfg-test-noip \
-	ifcfg-test-wifi-open \
-	ifcfg-test-wifi-open-auto \
-	ifcfg-test-wifi-open-ssid-quoted \
-	ifcfg-test-wifi-open-ssid-long-quoted \
-	ifcfg-test-wifi-open-ssid-hex \
-	ifcfg-test-wifi-open-ssid-long-hex \
-	ifcfg-test-wifi-open-ssid-bad-hex \
-	ifcfg-test-wifi-wep \
-	keys-test-wifi-wep \
-	ifcfg-test-wifi-wep-adhoc \
-	keys-test-wifi-wep-adhoc \
-	ifcfg-test-wifi-wep-eap-ttls-chap \
-	keys-test-wifi-wep-eap-ttls-chap \
-	ifcfg-test-wifi-leap \
-	keys-test-wifi-leap \
-	ifcfg-test-wifi-leap-agent \
-	ifcfg-test-wifi-leap-always-ask \
-	ifcfg-test-wifi-wpa-psk \
-	keys-test-wifi-wpa-psk \
-	ifcfg-test-wifi-wpa-psk-2 \
-	keys-test-wifi-wpa-psk-2 \
-	ifcfg-test-wifi-wpa-psk-unquoted \
-	keys-test-wifi-wpa-psk-unquoted \
-	ifcfg-test-wifi-wpa-psk-unquoted2 \
-	keys-test-wifi-wpa-psk-unquoted2 \
-	ifcfg-test-wifi-wpa-psk-adhoc \
-	keys-test-wifi-wpa-psk-adhoc \
-	ifcfg-test-wifi-wpa-psk-hex \
-	keys-test-wifi-wpa-psk-hex \
-	ifcfg-test-wifi-wpa-eap-tls \
-	keys-test-wifi-wpa-eap-tls \
-	ifcfg-test-wifi-wpa-eap-ttls-tls \
-	keys-test-wifi-wpa-eap-ttls-tls \
-	ifcfg-test-wifi-hidden \
-	ifcfg-test-wifi-band-a \
-	ifcfg-test-wifi-band-a-channel-mismatch \
-	ifcfg-test-wifi-band-bg-channel-mismatch \
-	ifcfg-test-wifi-mac-random-always \
-	ifcfg-test-wifi-mac-random-never \
-	ifcfg-test-wifi-mac-random-default \
-	ifcfg-test-wifi-mac-random-missing \
-	test_ca_cert.pem \
-	test1_key_and_cert.pem \
-	ifcfg-test-ibft \
-	ifcfg-test-static-routes-legacy \
-	route-test-static-routes-legacy \
-	ifcfg-test-sit-ignore \
-	ifcfg-test-wired-static-routes \
-	route-test-wired-static-routes \
-	ifcfg-test-wired-static-routes-legacy \
-	route-test-wired-static-routes-legacy \
-	ifcfg-test-wired-ipv4-manual-1 \
-	ifcfg-test-wired-ipv4-manual-2 \
-	ifcfg-test-wired-ipv4-manual-3 \
-	ifcfg-test-wired-ipv4-manual-4 \
-	ifcfg-test-wired-ipv6-manual \
-	route6-test-wired-ipv6-manual \
-	ifcfg-test-wired-static-no-prefix-8 \
-	ifcfg-test-wired-static-no-prefix-16 \
-	ifcfg-test-wired-static-no-prefix-24 \
-	ifcfg-test-wired-ipv6-only \
-	ifcfg-test-wifi-wep-passphrase \
-	keys-test-wifi-wep-passphrase \
-	ifcfg-test-wifi-wep-40-ascii \
-	keys-test-wifi-wep-40-ascii \
-	ifcfg-test-wifi-wep-104-ascii \
-	keys-test-wifi-wep-104-ascii \
-	ifcfg-test-wired-qeth-static \
-	ifcfg-test-wired-ctc-static \
-	ifcfg-test-bridge-main \
-	ifcfg-test-bridge-component \
-	ifcfg-test-bridge-missing-stp \
-	ifcfg-test-vlan-interface \
-	ifcfg-test-vlan-only-vlanid \
-	ifcfg-test-vlan-only-device \
-	ifcfg-test-vlan-physdev \
-	ifcfg-test-vlan-reorder-hdr-1 \
-	ifcfg-test-vlan-reorder-hdr-2 \
-	ifcfg-test-vlan-flags-1 \
-	ifcfg-test-vlan-flags-2 \
-	ifcfg-test-wifi-wep-no-keys \
-	ifcfg-test-permissions \
-	ifcfg-test-wifi-wep-agent-keys \
-	ifcfg-test-wifi-dynamic-wep-leap \
-	keys-test-wifi-dynamic-wep-leap \
-	ifcfg-test-infiniband \
-	ifcfg-test-bond-main \
-	ifcfg-test-bond-slave \
-	ifcfg-test-bond-slave-ib \
-	ifcfg-test-bond-mode-numeric \
-	ifcfg-test-dcb \
-	ifcfg-test-dcb-default-app-priorities \
-	ifcfg-test-dcb-bad-booleans \
-	ifcfg-test-dcb-short-booleans \
-	ifcfg-test-dcb-bad-uints \
-	ifcfg-test-dcb-short-uints \
-	ifcfg-test-dcb-bad-percent \
-	ifcfg-test-dcb-short-percent \
-	ifcfg-test-dcb-pgpct-not-100 \
-	ifcfg-test-fcoe-fabric \
-	ifcfg-test-fcoe-vn2vn \
-	ifcfg-test-team-master-1 \
-	ifcfg-test-team-master-2 \
-	ifcfg-test-team-master-invalid \
-	ifcfg-test-team-port-1 \
-	ifcfg-test-team-port-2 \
-	ifcfg-test-team-port-empty-config \
-	ifcfg-test-vlan-trailing-spaces \
-	ifcfg-test-dns-options \
-	ifcfg-test-wired-wake-on-lan \
-	ifcfg-test-wired-ipv6-only-1
-
-
-# make target dependencies can't have colons in their names, which ends up
-# meaning that we can't add the alias files to EXTRA_DIST
-ALIAS_FILES = \
-	ifcfg-aliasem0 \
-	ifcfg-aliasem0:1 \
-	ifcfg-aliasem0:2 \
-	ifcfg-aliasem0:99 \
-	ifcfg-aliasem1 \
-	ifcfg-aliasem1:1 \
-	ifcfg-aliasem2 \
-	ifcfg-aliasem2:1
-
-all: all-am
-
-.SUFFIXES:
-$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__configure_deps)
-	@for dep in $?; do \
-	  case '$(am__configure_deps)' in \
-	    *$$dep*) \
-	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
-	        && { if test -f $@; then exit 0; else break; fi; }; \
-	      exit 1;; \
-	  esac; \
-	done; \
-	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/settings/plugins/ifcfg-rh/tests/network-scripts/Makefile'; \
-	$(am__cd) $(top_srcdir) && \
-	  $(AUTOMAKE) --gnu src/settings/plugins/ifcfg-rh/tests/network-scripts/Makefile
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
-	@case '$?' in \
-	  *config.status*) \
-	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
-	  *) \
-	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
-	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
-	esac;
-
-$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
-	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-
-$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
-	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
-	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(am__aclocal_m4_deps):
-
-mostlyclean-libtool:
-	-rm -f *.lo
-
-clean-libtool:
-	-rm -rf .libs _libs
-tags TAGS:
-
-ctags CTAGS:
-
-cscope cscopelist:
-
-
-distdir: $(DISTFILES)
-	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
-	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
-	list='$(DISTFILES)'; \
-	  dist_files=`for file in $$list; do echo $$file; done | \
-	  sed -e "s|^$$srcdirstrip/||;t" \
-	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
-	case $$dist_files in \
-	  */*) $(MKDIR_P) `echo "$$dist_files" | \
-			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
-			   sort -u` ;; \
-	esac; \
-	for file in $$dist_files; do \
-	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
-	  if test -d $$d/$$file; then \
-	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
-	    if test -d "$(distdir)/$$file"; then \
-	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
-	    fi; \
-	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
-	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
-	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
-	    fi; \
-	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
-	  else \
-	    test -f "$(distdir)/$$file" \
-	    || cp -p $$d/$$file "$(distdir)/$$file" \
-	    || exit 1; \
-	  fi; \
-	done
-	$(MAKE) $(AM_MAKEFLAGS) \
-	  top_distdir="$(top_distdir)" distdir="$(distdir)" \
-	  dist-hook
-check-am: all-am
-	$(MAKE) $(AM_MAKEFLAGS) check-local
-check: check-am
-all-am: Makefile
-installdirs:
-install: install-am
-install-exec: install-exec-am
-install-data: install-data-am
-uninstall: uninstall-am
-
-install-am: all-am
-	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-
-installcheck: installcheck-am
-install-strip:
-	if test -z '$(STRIP)'; then \
-	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
-	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
-	      install; \
-	else \
-	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
-	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
-	    "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
-	fi
-mostlyclean-generic:
-
-clean-generic:
-
-distclean-generic:
-	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
-
-maintainer-clean-generic:
-	@echo "This command is intended for maintainers to use"
-	@echo "it deletes files that may require special tools to rebuild."
-clean: clean-am
-
-clean-am: clean-generic clean-libtool mostlyclean-am
-
-distclean: distclean-am
-	-rm -f Makefile
-distclean-am: clean-am distclean-generic
-
-dvi: dvi-am
-
-dvi-am:
-
-html: html-am
-
-html-am:
-
-info: info-am
-
-info-am:
-
-install-data-am:
-
-install-dvi: install-dvi-am
-
-install-dvi-am:
-
-install-exec-am:
-
-install-html: install-html-am
-
-install-html-am:
-
-install-info: install-info-am
-
-install-info-am:
-
-install-man:
-
-install-pdf: install-pdf-am
-
-install-pdf-am:
-
-install-ps: install-ps-am
-
-install-ps-am:
-
-installcheck-am:
-
-maintainer-clean: maintainer-clean-am
-	-rm -f Makefile
-maintainer-clean-am: distclean-am maintainer-clean-generic
-
-mostlyclean: mostlyclean-am
-
-mostlyclean-am: mostlyclean-generic mostlyclean-libtool
-
-pdf: pdf-am
-
-pdf-am:
-
-ps: ps-am
-
-ps-am:
-
-uninstall-am:
-
-.MAKE: check-am install-am install-strip
-
-.PHONY: all all-am check check-am check-local clean clean-generic \
-	clean-libtool cscopelist-am ctags-am dist-hook distclean \
-	distclean-generic distclean-libtool distdir dvi dvi-am html \
-	html-am info info-am install install-am install-data \
-	install-data-am install-dvi install-dvi-am install-exec \
-	install-exec-am install-html install-html-am install-info \
-	install-info-am install-man install-pdf install-pdf-am \
-	install-ps install-ps-am install-strip installcheck \
-	installcheck-am installdirs maintainer-clean \
-	maintainer-clean-generic mostlyclean mostlyclean-generic \
-	mostlyclean-libtool pdf pdf-am ps ps-am tags-am uninstall \
-	uninstall-am
-
-.PRECIOUS: Makefile
-
-
-dist-hook:
-	@for f in $(ALIAS_FILES); do \
-		cp $(abs_srcdir)/$$f $(distdir)/; \
-	done
-
-check-local:
-	@for f in $(EXTRA_DIST) $(ALIAS_FILES); do \
-		chmod 0600 $(abs_srcdir)/$$f; \
-	done
-
-# Make the special temp dir for some written connections
-	mkdir -p $(abs_builddir)/tmp
-
-# Tell versions [3.59,3.63) of GNU make to not export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
diff --git a/src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-misc-variables b/src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-misc-variables
index c7892a21..1b10cddb 100644
--- a/src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-misc-variables
+++ b/src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-misc-variables
@@ -1,3 +1,4 @@
 DEVICE=eth0
 HWADDR_BLACKLIST="00:16:41:11:22:88 00:16:41:11:22:99 XX:aa:invalid 6A:5D:5A:FA:DD:F0"
+AUTOCONNECT_RETRIES=100
 
diff --git a/src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-read-proxy-basic b/src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-read-proxy-basic
new file mode 100644
index 00000000..e2cf6c21
--- /dev/null
+++ b/src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-read-proxy-basic
@@ -0,0 +1,15 @@
+# Intel Corporation 82540EP Gigabit Ethernet Controller (Mobile)
+TYPE=Ethernet
+DEVICE=eth0
+HWADDR=00:11:22:33:44:ee
+BOOTPROTO=dhcp
+ONBOOT=yes
+USERCTL=yes
+IPV6INIT=no
+NM_CONTROLLED=yes
+PEERDNS=no
+
+# proxy configuration
+PROXY_METHOD=auto
+PAC_URL=http://wpad.mycompany.com/wpad.dat
+BROWSER_ONLY=yes
diff --git a/src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-wifi-wpa-psk b/src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-wifi-wpa-psk
index 2119ba8e..a78051aa 100644
--- a/src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-wifi-wpa-psk
+++ b/src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-wifi-wpa-psk
@@ -16,4 +16,4 @@ CIPHER_GROUP="TKIP CCMP WEP40 WEP104"
 KEY_MGMT=WPA-PSK
 WPA_ALLOW_WPA=yes
 WPA_ALLOW_WPA2=yes
-
+LAST_ENTRY=no-newline
\ No newline at end of file
diff --git a/src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-wired-auto-negotiate-on b/src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-wired-auto-negotiate-on
new file mode 100644
index 00000000..d0b50775
--- /dev/null
+++ b/src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-wired-auto-negotiate-on
@@ -0,0 +1,22 @@
+# Intel Corporation 82540EP Gigabit Ethernet Controller (Mobile)
+TYPE=Ethernet
+DEVICE=eth0
+HWADDR=00:11:22:33:44:ee
+BOOTPROTO=none
+ONBOOT=yes
+USERCTL=yes
+MTU=1492
+NM_CONTROLLED=yes
+DNS1=4.2.2.1
+DNS2=4.2.2.2
+IPADDR=192.168.1.5
+NETMASK=255.255.255.0
+GATEWAY=192.168.1.1
+IPV6INIT=yes
+IPV6_AUTOCONF=no
+IPV6ADDR=dead:beaf::1
+IPV6ADDR_SECONDARIES="dead:beaf::2/56"
+DNS3=1:2:3:4::a
+DNS4=1:2:3:4::b
+RES_OPTIONS=
+ETHTOOL_OPTS="wol apgs sopass 00:11:22:33:44:55 autoneg on speed 100"
diff --git a/src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-wired-dhcpv6-hostname-fallback b/src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-wired-dhcpv6-hostname-fallback
new file mode 100644
index 00000000..d38e762e
--- /dev/null
+++ b/src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-wired-dhcpv6-hostname-fallback
@@ -0,0 +1,12 @@
+# Intel Corporation 82540EP Gigabit Ethernet Controller (Mobile)
+TYPE=Ethernet
+DEVICE=eth0
+HWADDR=00:11:22:33:44:ee
+BOOTPROTO=dhcp
+ONBOOT=yes
+IPV6INIT=yes
+IPV6_AUTOCONF=yes
+USERCTL=yes
+NM_CONTROLLED=yes
+PEERDNS=no
+DHCP_HOSTNAME="fully.qualified.domain"
diff --git a/src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-wired-unknown-ethtool-opt b/src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-wired-unknown-ethtool-opt
new file mode 100644
index 00000000..861dd41f
--- /dev/null
+++ b/src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-wired-unknown-ethtool-opt
@@ -0,0 +1,22 @@
+# Intel Corporation 82540EP Gigabit Ethernet Controller (Mobile)
+TYPE=Ethernet
+DEVICE=eth0
+HWADDR=00:11:22:33:44:ee
+BOOTPROTO=none
+ONBOOT=yes
+USERCTL=yes
+MTU=1492
+NM_CONTROLLED=yes
+DNS1=4.2.2.1
+DNS2=4.2.2.2
+IPADDR=192.168.1.5
+NETMASK=255.255.255.0
+GATEWAY=192.168.1.1
+IPV6INIT=yes
+IPV6_AUTOCONF=no
+IPV6ADDR=dead:beaf::1
+IPV6ADDR_SECONDARIES="dead:beaf::2/56"
+DNS3=1:2:3:4::a
+DNS4=1:2:3:4::b
+RES_OPTIONS=
+ETHTOOL_OPTS="unknown1 wol apgs sopass 00:11:22:33:44:55 unkwnown2 opt2 unknown3"
diff --git a/src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-write-unknown-1 b/src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-write-unknown-1
new file mode 100644
index 00000000..c927389e
--- /dev/null
+++ b/src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-write-unknown-1
@@ -0,0 +1,8 @@
+FOO='val
+  bar=3'
+wrong line
+  F2=b
+  F3='b
+XXX=adf'
+  XXX2=val2
+'
diff --git a/src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-write-unknown-1.expected b/src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-write-unknown-1.expected
new file mode 100644
index 00000000..568b2efc
--- /dev/null
+++ b/src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-write-unknown-1.expected
@@ -0,0 +1,12 @@
+FOO=
+#NM: FOO='val
+bar=
+#NM:   bar=3'
+#NM: wrong line
+  F2=b
+F3=
+#NM:   F3='b
+XXX=
+#NM: XXX=adf'
+  XXX2=val2
+#NM: '
diff --git a/src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-write-unknown-2 b/src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-write-unknown-2
new file mode 100644
index 00000000..850149b2
--- /dev/null
+++ b/src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-write-unknown-2
@@ -0,0 +1,3 @@
+FOO='
+BAR=a
+'
diff --git a/src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-write-unknown-2.expected b/src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-write-unknown-2.expected
new file mode 100644
index 00000000..6ec53c17
--- /dev/null
+++ b/src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-write-unknown-2.expected
@@ -0,0 +1,4 @@
+FOO=
+#NM: FOO='
+BAR=a
+#NM: '
diff --git a/src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-write-unknown-3 b/src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-write-unknown-3
new file mode 100644
index 00000000..3d198e00
--- /dev/null
+++ b/src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-write-unknown-3
@@ -0,0 +1,3 @@
+FOO='
+BAR="
+'
diff --git a/src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-write-unknown-3.expected b/src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-write-unknown-3.expected
new file mode 100644
index 00000000..d2b27eb3
--- /dev/null
+++ b/src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-write-unknown-3.expected
@@ -0,0 +1,5 @@
+FOO=
+#NM: FOO='
+BAR=
+#NM: BAR="
+#NM: '
diff --git a/src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-write-unknown-4 b/src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-write-unknown-4
new file mode 100644
index 00000000..a7156e33
--- /dev/null
+++ b/src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-write-unknown-4
@@ -0,0 +1,36 @@
+# test what happens with multiple defines of a name.
+#
+# Note that svGetValue() will return "l4x", which
+# isn't correct in terms of shell-parsing. But we
+# don't consider only line-by-line, thus this is
+# expected.
+#
+# Also note that setting NAME will replace the last
+# occurance, and delete all previous once.
+
+#L1
+NAME=l2
+
+#L2
+NAME=l3
+
+some_key1=''
+some_key2=$'\U0x'
+some_key3=$'x\U0'
+
+#L4
+NAME='
+NAME=l4x
+'
+
+#Lx-1
+NAME2=not-visible
+#Lx-2
+NAME2='invalid
+#Lx-3
+
+#Ly-1
+NAME3='invalid
+#Ly-2
+NAME3=name3-value
+#Ly-3
diff --git a/src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-write-unknown-4.expected b/src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-write-unknown-4.expected
new file mode 100644
index 00000000..674df840
--- /dev/null
+++ b/src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-write-unknown-4.expected
@@ -0,0 +1,31 @@
+# test what happens with multiple defines of a name.
+#
+# Note that svGetValue() will return "l4x", which
+# isn't correct in terms of shell-parsing. But we
+# don't consider only line-by-line, thus this is
+# expected.
+#
+# Also note that setting NAME will replace the last
+# occurance, and delete all previous once.
+
+#L1
+
+#L2
+
+some_key1=''
+some_key2=$'\U0x'
+some_key3=$'x\U0'
+
+#L4
+NAME=set-by-test1
+#NM: '
+
+#Lx-1
+#Lx-2
+NAME2=set-by-test2
+#Lx-3
+
+#Ly-1
+#Ly-2
+NAME3=set-by-test3
+#Ly-3
diff --git a/src/settings/plugins/ifcfg-rh/tests/network-scripts/keys-test-wifi-wpa-psk-2 b/src/settings/plugins/ifcfg-rh/tests/network-scripts/keys-test-wifi-wpa-psk-2
index 6a63e817..995721dd 100644
--- a/src/settings/plugins/ifcfg-rh/tests/network-scripts/keys-test-wifi-wpa-psk-2
+++ b/src/settings/plugins/ifcfg-rh/tests/network-scripts/keys-test-wifi-wpa-psk-2
@@ -1,2 +1,2 @@
-WPA_PSK=$'They\'re really saying I love you. >>`<< \'
+WPA_PSK="They're really saying I love you. >>\`<< '"
 
diff --git a/src/settings/plugins/ifcfg-rh/tests/test-ifcfg-rh-utils.c b/src/settings/plugins/ifcfg-rh/tests/test-ifcfg-rh-utils.c
deleted file mode 100644
index d2a348bb..00000000
--- a/src/settings/plugins/ifcfg-rh/tests/test-ifcfg-rh-utils.c
+++ /dev/null
@@ -1,155 +0,0 @@
-/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
-/* NetworkManager system settings service - keyfile plugin
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Copyright (C) 2008 - 2011 Red Hat, Inc.
- */
-
-#include "nm-default.h"
-
-#include <stdio.h>
-#include <stdarg.h>
-#include <unistd.h>
-#include <string.h>
-
-#include "common.h"
-#include "utils.h"
-
-#include "nm-test-utils-core.h"
-
-static void
-test_get_ifcfg_name (const char *desc,
-                     const char *path,
-                     gboolean only_ifcfg,
-                     const char *expected)
-{
-	const char *result;
-
-	result = utils_get_ifcfg_name (path, only_ifcfg);
-	g_assert_cmpstr (result, ==, expected);
-}
-
-static void
-test_get_ifcfg_path (const char *desc,
-                     const char *path,
-                     const char *expected)
-{
-	char *result;
-
-	result = utils_get_ifcfg_path (path);
-	g_assert_cmpstr (result, ==, expected);
-	g_free (result);
-}
-
-static void
-test_get_keys_path (const char *desc,
-                    const char *path,
-                    const char *expected)
-{
-	char *result;
-
-	result = utils_get_keys_path (path);
-	g_assert_cmpstr (result, ==, expected);
-	g_free (result);
-}
-
-static void
-test_get_route_path (const char *desc,
-                     const char *path,
-                     const char *expected)
-{
-	char *result;
-
-	result = utils_get_route_path (path);
-	g_assert_cmpstr (result, ==, expected);
-	g_free (result);
-}
-
-static void
-test_ignored (const char *desc, const char *path, gboolean expected_ignored)
-{
-	gboolean result;
-
-	result = utils_should_ignore_file (path, FALSE);
-	g_assert (result == expected_ignored);
-}
-
-static void
-test_name (void)
-{
-	test_get_ifcfg_name ("get-ifcfg-name-bad", "/foo/bar/adfasdfadf", FALSE, NULL);
-	test_get_ifcfg_name ("get-ifcfg-name-good", "/foo/bar/ifcfg-FooBar", FALSE, "FooBar");
-	test_get_ifcfg_name ("get-ifcfg-name-keys", "/foo/bar/keys-BlahLbah", FALSE, "BlahLbah");
-	test_get_ifcfg_name ("get-ifcfg-name-route", "/foo/bar/route-Lalalala", FALSE, "Lalalala");
-	test_get_ifcfg_name ("get-ifcfg-name-only-ifcfg-route", "/foo/bar/route-Lalalala", TRUE, NULL);
-	test_get_ifcfg_name ("get-ifcfg-name-only-ifcfg-keys", "/foo/bar/keys-Lalalala", TRUE, NULL);
-	test_get_ifcfg_name ("get-ifcfg-name-no-path-ifcfg", "ifcfg-Lalalala", FALSE, "Lalalala");
-	test_get_ifcfg_name ("get-ifcfg-name-no-path-keys", "keys-Lalalala", FALSE, "Lalalala");
-	test_get_ifcfg_name ("get-ifcfg-name-no-path-route", "route-Lalalala", FALSE, "Lalalala");
-
-	test_get_ifcfg_name ("get-ifcfg-name-bad2-ifcfg", "/foo/bar/asdfasifcfg-Foobar", FALSE, NULL);
-	test_get_ifcfg_name ("get-ifcfg-name-bad2-keys", "/foo/bar/asdfaskeys-Foobar", FALSE, NULL);
-	test_get_ifcfg_name ("get-ifcfg-name-bad2-route", "/foo/bar/asdfasroute-Foobar", FALSE, NULL);
-}
-
-static void
-test_path (void)
-{
-	test_get_ifcfg_path ("ifcfg-path-bad", "/foo/bar/adfasdfasdf", NULL);
-	test_get_ifcfg_path ("ifcfg-path-from-keys-no-path", "keys-BlahBlah", "ifcfg-BlahBlah");
-	test_get_ifcfg_path ("ifcfg-path-from-keys", "/foo/bar/keys-BlahBlah", "/foo/bar/ifcfg-BlahBlah");
-	test_get_ifcfg_path ("ifcfg-path-from-route", "/foo/bar/route-BlahBlah", "/foo/bar/ifcfg-BlahBlah");
-
-	test_get_keys_path ("keys-path-bad", "/foo/bar/asdfasdfasdfasdf", NULL);
-	test_get_keys_path ("keys-path-from-ifcfg-no-path", "ifcfg-FooBar", "keys-FooBar");
-	test_get_keys_path ("keys-path-from-ifcfg", "/foo/bar/ifcfg-FooBar", "/foo/bar/keys-FooBar");
-	test_get_keys_path ("keys-path-from-route", "/foo/bar/route-FooBar", "/foo/bar/keys-FooBar");
-
-	test_get_route_path ("route-path-bad", "/foo/bar/asdfasdfasdfasdf", NULL);
-	test_get_route_path ("route-path-from-ifcfg-no-path", "ifcfg-FooBar", "route-FooBar");
-	test_get_route_path ("route-path-from-ifcfg", "/foo/bar/ifcfg-FooBar", "/foo/bar/route-FooBar");
-	test_get_route_path ("route-path-from-keys", "/foo/bar/keys-FooBar", "/foo/bar/route-FooBar");
-}
-
-static void
-test_ignore (void)
-{
-	test_ignored ("ignored-ifcfg", "ifcfg-FooBar", FALSE);
-	test_ignored ("ignored-keys", "keys-FooBar", FALSE);
-	test_ignored ("ignored-route", "route-FooBar", FALSE);
-	test_ignored ("ignored-bak", "ifcfg-FooBar" BAK_TAG, TRUE);
-	test_ignored ("ignored-tilde", "ifcfg-FooBar" TILDE_TAG, TRUE);
-	test_ignored ("ignored-orig", "ifcfg-FooBar" ORIG_TAG, TRUE);
-	test_ignored ("ignored-rej", "ifcfg-FooBar" REJ_TAG, TRUE);
-	test_ignored ("ignored-rpmnew", "ifcfg-FooBar" RPMNEW_TAG, TRUE);
-	test_ignored ("ignored-augnew", "ifcfg-FooBar" AUGNEW_TAG, TRUE);
-	test_ignored ("ignored-augtmp", "ifcfg-FooBar" AUGTMP_TAG, TRUE);
-}
-
-NMTST_DEFINE ();
-
-int main (int argc, char **argv)
-{
-	nmtst_init_assert_logging (&argc, &argv, "INFO", "DEFAULT");
-
-	/* The tests */
-	g_test_add_func ("/settings/plugins/ifcfg-rh/name", test_name);
-	g_test_add_func ("/settings/plugins/ifcfg-rh/path", test_path);
-	g_test_add_func ("/settings/plugins/ifcfg-rh/ignore", test_ignore);
-
-	return g_test_run ();
-}
-
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 9ed48beb..1a8439f6 100644
--- a/src/settings/plugins/ifcfg-rh/tests/test-ifcfg-rh.c
+++ b/src/settings/plugins/ifcfg-rh/tests/test-ifcfg-rh.c
@@ -50,15 +50,60 @@
 
 #include "NetworkManagerUtils.h"
 
-#include "common.h"
-#include "reader.h"
-#include "writer.h"
-#include "utils.h"
+#include "settings/plugins/ifcfg-rh/nms-ifcfg-rh-common.h"
+#include "settings/plugins/ifcfg-rh/nms-ifcfg-rh-reader.h"
+#include "settings/plugins/ifcfg-rh/nms-ifcfg-rh-writer.h"
+#include "settings/plugins/ifcfg-rh/nms-ifcfg-rh-utils.h"
 
 #include "nm-test-utils-core.h"
 
+#define TEST_SCRATCH_DIR_TMP TEST_SCRATCH_DIR"/network-scripts/tmp"
+
 /*****************************************************************************/
 
+#define _svOpenFile(testfile) \
+	({ \
+		shvarFile *_f; \
+		GError *_error = NULL; \
+		const char *_testfile = (testfile); \
+		\
+		g_assert (_testfile); \
+		_f = svOpenFile (_testfile, &_error); \
+		nmtst_assert_success (_f, _error); \
+		_f; \
+	})
+
+#define _svGetValue_check(f, key, expected_value) \
+	G_STMT_START { \
+		const char *_val; \
+		gs_free char *_to_free = NULL; \
+		gs_free char *_val_string = NULL; \
+		shvarFile *const _f = (f); \
+		const char *const _key = (key); \
+		\
+		_val_string = svGetValueString (_f, _key); \
+		_val = svGetValue (_f, _key, &_to_free); \
+		g_assert_cmpstr (_val, ==, (expected_value)); \
+		g_assert (   (!_val_string && (!_val || !_val[0])) \
+		          || ( _val_string && nm_streq0 (_val, _val_string))); \
+	} G_STMT_END
+
+#define _writer_update_connection(connection, ifcfg_dir, filename) \
+	G_STMT_START { \
+		NMConnection *_connection = (connection); \
+		const char *_ifcfg_dir = (ifcfg_dir); \
+		const char *_filename = (filename); \
+		GError *_error = NULL; \
+		gboolean _success; \
+		\
+		g_assert (NM_IS_CONNECTION (connection)); \
+		g_assert (_ifcfg_dir && _ifcfg_dir[0]); \
+		g_assert (_filename && _filename[0]); \
+		\
+		_success = writer_update_connection (_connection, _ifcfg_dir, _filename, &_error); \
+		nmtst_assert_success (_success, _error); \
+	} G_STMT_END
+
 static NMConnection *
 _connection_from_file (const char *filename,
                        const char *network_file,
@@ -273,6 +318,7 @@ test_read_basic (void)
 	g_assert_cmpstr (nm_setting_connection_get_id (s_con), ==, "System test-minimal");
 	g_assert_cmpint (nm_setting_connection_get_timestamp (s_con), ==, 0);
 	g_assert (nm_setting_connection_get_autoconnect (s_con));
+	g_assert_cmpint (nm_setting_connection_get_autoconnect_retries (s_con), ==, -1);
 
 	/* UUID can't be tested if the ifcfg does not contain the UUID key, because
 	 * the UUID is generated on the full path of the ifcfg file, which can change
@@ -326,6 +372,7 @@ test_read_miscellaneous_variables (void)
 	g_assert (s_con);
 	g_assert_cmpint (nm_setting_connection_get_timestamp (s_con), ==, expected_timestamp);
 	g_assert (nm_setting_connection_get_autoconnect (s_con));
+	g_assert_cmpint (nm_setting_connection_get_autoconnect_retries (s_con), ==, 100);
 
 	/* ===== WIRED SETTING ===== */
 	s_wired = nm_connection_get_setting_wired (connection);
@@ -363,8 +410,8 @@ test_read_variables_corner_cases (void)
 	/* ===== CONNECTION SETTING ===== */
 	s_con = nm_connection_get_setting_connection (connection);
 	g_assert (s_con);
-	g_assert_cmpstr (nm_setting_connection_get_id (s_con), ==, "\"");
-	g_assert_cmpstr (nm_setting_connection_get_zone (s_con), ==, "'");
+	g_assert_cmpstr (nm_setting_connection_get_id (s_con), ==, "System test-variables-corner-cases-1");
+	g_assert_cmpstr (nm_setting_connection_get_zone (s_con), ==, NULL);
 	g_assert_cmpint (nm_setting_connection_get_timestamp (s_con), ==, 0);
 	g_assert (nm_setting_connection_get_autoconnect (s_con));
 
@@ -449,7 +496,7 @@ test_read_unrecognized (void)
 	/* ===== CONNECTION SETTING ===== */
 	s_con = nm_connection_get_setting_connection (connection);
 	g_assert (s_con);
-	g_assert_cmpstr (nm_setting_connection_get_id (s_con), ==, "U Can't Touch This");
+	g_assert_cmpstr (nm_setting_connection_get_id (s_con), ==, "System test-unrecognized");
 	g_assert_cmpint (nm_setting_connection_get_timestamp (s_con), ==, expected_timestamp);
 
 	g_object_unref (connection);
@@ -1493,9 +1540,10 @@ test_read_wired_8021x_tls_secret_flags (gconstpointer test_data)
 static void
 test_read_write_802_1X_subj_matches (void)
 {
-	NMConnection *connection, *reread;
+	nmtst_auto_unlinkfile char *testfile = NULL;
+	gs_unref_object NMConnection *connection = NULL;
+	gs_unref_object NMConnection *reread = NULL;
 	NMSetting8021x *s_8021x;
-	char *written = NULL;
 
 	g_test_expect_message ("NetworkManager", G_LOG_LEVEL_MESSAGE,
 	                       "*missing IEEE_8021X_CA_CERT*peap*");
@@ -1521,14 +1569,12 @@ test_read_write_802_1X_subj_matches (void)
 
 	_writer_new_connection (connection,
 	                        TEST_SCRATCH_DIR "/network-scripts/",
-	                        &written);
+	                        &testfile);
 
 	g_test_expect_message ("NetworkManager", G_LOG_LEVEL_MESSAGE,
 	                       "*missing IEEE_8021X_CA_CERT*peap*");
-	reread = _connection_from_file (written, NULL, TYPE_ETHERNET, NULL);
+	reread = _connection_from_file (testfile, NULL, TYPE_ETHERNET, NULL);
 	g_test_assert_expected_messages ();
-	unlink (written);
-	g_free (written);
 
 	nmtst_assert_connection_equals (connection, TRUE, reread, FALSE);
 
@@ -1547,9 +1593,6 @@ test_read_write_802_1X_subj_matches (void)
 	g_assert_cmpint (nm_setting_802_1x_get_num_phase2_altsubject_matches (s_8021x), ==, 2);
 	g_assert_cmpstr (nm_setting_802_1x_get_phase2_altsubject_match (s_8021x, 0), ==, "x.yourdomain.tld");
 	g_assert_cmpstr (nm_setting_802_1x_get_phase2_altsubject_match (s_8021x, 1), ==, "y.yourdomain.tld");
-
-	g_object_unref (connection);
-	g_object_unref (reread);
 }
 
 static void
@@ -1741,14 +1784,12 @@ test_read_dns_options (void)
 static void
 test_clear_master (void)
 {
+	nmtst_auto_unlinkfile char *testfile = NULL;
+	gs_free char *keyfile = NULL;
+	gs_unref_object NMConnection *connection = NULL;
 	NMSettingConnection *s_con;
-	NMConnection *connection;
 	char *unmanaged = NULL;
-	char *testfile = NULL, *keyfile;
-	GError *error = NULL;
-	gboolean success;
 	shvarFile *f;
-	char *val;
 
 	/* 1. load the bridge slave connection from disk */
 	connection = _connection_from_file (TEST_IFCFG_DIR "/network-scripts/ifcfg-test-bridge-component",
@@ -1776,47 +1817,33 @@ test_clear_master (void)
 	g_assert_cmpstr (nm_setting_connection_get_slave_type (s_con), ==, NULL);
 
 	/* 4. update the connection on disk */
+	_writer_update_connection (connection,
+	                           TEST_SCRATCH_DIR "/network-scripts/",
+	                           testfile);
 	keyfile = utils_get_keys_path (testfile);
-	success = writer_update_connection (connection,
-	                                    TEST_SCRATCH_DIR "/network-scripts/",
-	                                    testfile,
-	                                    keyfile,
-	                                    &error);
-	g_assert_no_error (error);
-	g_assert (success);
-	unlink (keyfile);
-	g_free (keyfile);
+	g_assert (!g_file_test (keyfile, G_FILE_TEST_EXISTS));
 
 	/* 5. check that BRIDGE variable has been removed */
-	f = svOpenFile (testfile, &error);
-	g_assert_no_error (error);
-	g_assert (f);
-
-	val = svGetValue (f, "BRIDGE", FALSE);
-	g_assert (!val);
+	f = _svOpenFile (testfile);
+	_svGetValue_check (f, "BRIDGE", NULL);
 	svCloseFile (f);
-
-	unlink (testfile);
-	g_free (testfile);
-	g_object_unref (connection);
 }
 
 static void
 test_write_dns_options (void)
 {
-	NMConnection *connection;
-	NMConnection *reread;
+	nmtst_auto_unlinkfile char *testfile = NULL;
+	gs_unref_object NMConnection *connection = NULL;
+	gs_unref_object NMConnection *reread = NULL;
 	NMSettingConnection *s_con;
 	NMSettingWired *s_wired;
 	NMSettingIPConfig *s_ip4;
 	NMSettingIPConfig *s_ip6;
 	static const char *mac = "31:33:33:37:be:cd";
 	guint32 mtu = 1492;
-	char *uuid;
 	NMIPAddress *addr;
 	NMIPAddress *addr6;
 	GError *error = NULL;
-	char *testfile = NULL;
 
 	connection = nm_simple_connection_new ();
 
@@ -1824,14 +1851,12 @@ test_write_dns_options (void)
 	s_con = (NMSettingConnection *) nm_setting_connection_new ();
 	nm_connection_add_setting (connection, NM_SETTING (s_con));
 
-	uuid = nm_utils_uuid_generate ();
 	g_object_set (s_con,
 	              NM_SETTING_CONNECTION_ID, "Test DNS options",
-	              NM_SETTING_CONNECTION_UUID, uuid,
+	              NM_SETTING_CONNECTION_UUID, nm_utils_uuid_generate_a (),
 	              NM_SETTING_CONNECTION_AUTOCONNECT, TRUE,
 	              NM_SETTING_CONNECTION_TYPE, NM_SETTING_WIRED_SETTING_NAME,
 	              NULL);
-	g_free (uuid);
 
 	/* Wired setting */
 	s_wired = (NMSettingWired *) nm_setting_wired_new ();
@@ -1882,7 +1907,6 @@ test_write_dns_options (void)
 	                        &testfile);
 
 	reread = _connection_from_file (testfile, NULL, TYPE_ETHERNET, NULL);
-	unlink (testfile);
 
 	/* RES_OPTIONS is copied to both IPv4 and IPv6 settings */
 	nm_setting_ip_config_clear_dns_options (s_ip4, TRUE);
@@ -1894,10 +1918,6 @@ test_write_dns_options (void)
 	nm_setting_ip_config_add_dns_option (s_ip6, "timeout:3");
 
 	nmtst_assert_connection_equals (connection, TRUE, reread, FALSE);
-
-	g_free (testfile);
-	g_object_unref (connection);
-	g_object_unref (reread);
 }
 
 static void
@@ -2023,6 +2043,30 @@ test_read_wifi_open_ssid_hex (void)
 }
 
 static void
+test_read_wifi_open_ssid_hex_bad (void)
+{
+	gs_unref_object NMConnection *connection = NULL;
+	NMSettingConnection *s_con;
+	NMSettingWireless *s_wireless;
+	GBytes *ssid;
+	const char *expected_ssid = "0x626cxx";
+
+	connection = _connection_from_file (TEST_IFCFG_DIR"/network-scripts/ifcfg-test-wifi-open-ssid-bad-hex",
+	                                    NULL, TYPE_WIRELESS, NULL);
+
+	s_con = nm_connection_get_setting_connection (connection);
+	g_assert (s_con);
+	g_assert_cmpstr (nm_setting_connection_get_id (s_con), ==, "System 0x626cxx (test-wifi-open-ssid-bad-hex)");
+
+	s_wireless = nm_connection_get_setting_wireless (connection);
+	g_assert (s_wireless);
+
+	ssid = nm_setting_wireless_get_ssid (s_wireless);
+	g_assert (ssid);
+	g_assert_cmpmem (g_bytes_get_data (ssid, NULL), g_bytes_get_size (ssid), expected_ssid, strlen (expected_ssid));
+}
+
+static void
 test_read_wifi_open_ssid_bad (gconstpointer data)
 {
 	_connection_from_file_fail ((const char *) data, NULL, TYPE_WIRELESS, NULL);
@@ -2387,6 +2431,16 @@ test_read_wifi_leap_secret_flags (gconstpointer test_data)
 }
 
 static void
+test_ifcfg_no_trailing_newline (void)
+{
+	shvarFile *sv;
+
+	sv = _svOpenFile (TEST_IFCFG_DIR "/network-scripts/ifcfg-test-wifi-wpa-psk");
+	_svGetValue_check (sv, "LAST_ENTRY", "no-newline");
+	svCloseFile (sv);
+}
+
+static void
 test_read_wifi_wpa_psk (void)
 {
 	NMConnection *connection;
@@ -2535,7 +2589,7 @@ test_read_wifi_wpa_psk_2 (void)
 
 	s_wsec = nm_connection_get_setting_wireless_security (connection);
 	g_assert (s_wsec);
-	g_assert_cmpstr (nm_setting_wireless_security_get_psk (s_wsec), ==, "They're really saying I love you. >>`<< \\");
+	g_assert_cmpstr (nm_setting_wireless_security_get_psk (s_wsec), ==, "They're really saying I love you. >>`<< '");
 
 	g_object_unref (connection);
 }
@@ -2574,12 +2628,10 @@ test_read_wifi_wpa_psk_unquoted (void)
 static void
 test_read_wifi_wpa_psk_unquoted2 (void)
 {
-	/* Ensure a quoted 64-character WPA passphrase will fail since passphrases
-	 * must be between 8 and 63 ASCII characters inclusive per the WPA spec.
-	 */
+	gs_unref_object NMConnection *connection = NULL;
 
-	_connection_from_file_fail (TEST_IFCFG_DIR "/network-scripts/ifcfg-test-wifi-wpa-psk-unquoted2",
-	                            NULL, TYPE_WIRELESS, NULL);
+	connection = _connection_from_file (TEST_IFCFG_DIR "/network-scripts/ifcfg-test-wifi-wpa-psk-unquoted2",
+	                                    NULL, TYPE_WIRELESS, NULL);
 }
 
 static void
@@ -2933,6 +2985,81 @@ test_read_wired_wake_on_lan (void)
 }
 
 static void
+test_read_wired_auto_negotiate_off (void)
+{
+	gs_unref_object NMConnection *connection = NULL;
+	NMSettingConnection *s_con;
+	NMSettingWired *s_wired;
+
+	connection = _connection_from_file (TEST_IFCFG_DIR"/network-scripts/ifcfg-test-wired-wake-on-lan",
+	                                    NULL, TYPE_ETHERNET, NULL);
+
+	s_con = nm_connection_get_setting_connection (connection);
+	g_assert (s_con);
+	g_assert_cmpstr (nm_setting_connection_get_connection_type (s_con), ==, NM_SETTING_WIRED_SETTING_NAME);
+
+	s_wired = nm_connection_get_setting_wired (connection);
+	g_assert (s_wired);
+
+	g_assert (!nm_setting_wired_get_auto_negotiate (s_wired));
+	g_assert_cmpint (nm_setting_wired_get_speed (s_wired), ==, 100);
+	g_assert_cmpstr (nm_setting_wired_get_duplex (s_wired), ==, "full");
+}
+
+static void
+test_read_wired_auto_negotiate_on (void)
+{
+	gs_unref_object NMConnection *connection = NULL;
+	NMSettingConnection *s_con;
+	NMSettingWired *s_wired;
+
+	connection = _connection_from_file (TEST_IFCFG_DIR"/network-scripts/ifcfg-test-wired-auto-negotiate-on",
+	                                    NULL, TYPE_ETHERNET, NULL);
+
+	s_con = nm_connection_get_setting_connection (connection);
+	g_assert (s_con);
+	g_assert_cmpstr (nm_setting_connection_get_connection_type (s_con), ==, NM_SETTING_WIRED_SETTING_NAME);
+
+	s_wired = nm_connection_get_setting_wired (connection);
+	g_assert (s_wired);
+
+	g_assert (nm_setting_wired_get_auto_negotiate (s_wired));
+	g_assert_cmpint (nm_setting_wired_get_speed (s_wired), ==, 0);
+	g_assert_cmpstr (nm_setting_wired_get_duplex (s_wired), ==, NULL);
+}
+
+static void
+test_read_wired_unknown_ethtool_opt (void)
+{
+	gs_unref_object NMConnection *connection = NULL;
+	NMSettingConnection *s_con;
+	NMSettingWired *s_wired;
+
+	connection = _connection_from_file (TEST_IFCFG_DIR"/network-scripts/ifcfg-test-wired-unknown-ethtool-opt",
+	                                    NULL, TYPE_ETHERNET, NULL);
+
+	s_con = nm_connection_get_setting_connection (connection);
+	g_assert (s_con);
+	g_assert_cmpstr (nm_setting_connection_get_connection_type (s_con), ==, NM_SETTING_WIRED_SETTING_NAME);
+
+	s_wired = nm_connection_get_setting_wired (connection);
+	g_assert (s_wired);
+
+	g_assert (!nm_setting_wired_get_auto_negotiate (s_wired));
+	g_assert (!nm_setting_wired_get_speed (s_wired));
+	g_assert (!nm_setting_wired_get_duplex (s_wired));
+
+	g_assert_cmpint (nm_setting_wired_get_wake_on_lan (s_wired),
+	                 ==,
+	                 NM_SETTING_WIRED_WAKE_ON_LAN_ARP |
+	                 NM_SETTING_WIRED_WAKE_ON_LAN_PHY |
+	                 NM_SETTING_WIRED_WAKE_ON_LAN_MAGIC);
+	g_assert_cmpstr (nm_setting_wired_get_wake_on_lan_password (s_wired),
+	                 ==,
+	                 "00:11:22:33:44:55");
+}
+
+static void
 test_read_wifi_hidden (void)
 {
 	NMConnection *connection;
@@ -2956,11 +3083,11 @@ test_read_wifi_hidden (void)
 static void
 test_write_wifi_hidden (void)
 {
-	NMConnection *connection, *reread;
+	nmtst_auto_unlinkfile char *testfile = NULL;
+	gs_unref_object NMConnection *connection = NULL;
+	gs_unref_object NMConnection *reread = NULL;
 	NMSettingConnection *s_con;
 	NMSettingWireless *s_wifi;
-	char *uuid, *testfile = NULL, *val;
-	GError *error = NULL;
 	shvarFile *f;
 	GBytes *ssid;
 	const unsigned char ssid_data[] = { 0x54, 0x65, 0x73, 0x74, 0x20, 0x53, 0x53, 0x49, 0x44 };
@@ -2971,13 +3098,11 @@ test_write_wifi_hidden (void)
 	s_con = (NMSettingConnection *) nm_setting_connection_new ();
 	nm_connection_add_setting (connection, NM_SETTING (s_con));
 
-	uuid = nm_utils_uuid_generate ();
 	g_object_set (s_con,
 	              NM_SETTING_CONNECTION_ID, "Test Write WiFi Hidden",
-	              NM_SETTING_CONNECTION_UUID, uuid,
+	              NM_SETTING_CONNECTION_UUID, nm_utils_uuid_generate_a (),
 	              NM_SETTING_CONNECTION_TYPE, NM_SETTING_WIRELESS_SETTING_NAME,
 	              NULL);
-	g_free (uuid);
 
 	/* Wifi setting */
 	s_wifi = (NMSettingWireless *) nm_setting_wireless_new ();
@@ -2999,33 +3124,21 @@ test_write_wifi_hidden (void)
 	                        TEST_SCRATCH_DIR "/network-scripts/",
 	                        &testfile);
 
-	f = svOpenFile (testfile, &error);
-	g_assert_no_error (error);
-	g_assert (f);
-
-	/* re-read the file to check that what key was written. */
-	val = svGetValue (f, "SSID_HIDDEN", FALSE);
-	g_assert (val);
-	g_assert_cmpstr (val, ==, "yes");
-	g_free (val);
+	f = _svOpenFile (testfile);
+	_svGetValue_check (f, "SSID_HIDDEN", "yes");
 	svCloseFile (f);
 
 	reread = _connection_from_file (testfile, NULL, TYPE_WIRELESS, NULL);
-	unlink (testfile);
 
 	nmtst_assert_connection_equals (connection, TRUE, reread, FALSE);
-
-	g_free (testfile);
-	g_object_unref (connection);
-	g_object_unref (reread);
 }
 
 static void
 test_read_wifi_mac_random (gconstpointer user_data)
 {
-	NMConnection *connection;
+	gs_unref_object NMConnection *connection = NULL;
+	gs_free char *path = NULL;
 	NMSettingWireless *s_wifi;
-	char *path;
 	const char *name;
 	gpointer value_p;
 	NMSettingMacRandomization value;
@@ -3035,23 +3148,21 @@ test_read_wifi_mac_random (gconstpointer user_data)
 
 	path = g_strdup_printf (TEST_IFCFG_DIR"/network-scripts/ifcfg-test-wifi-mac-random-%s", name);
 	connection = _connection_from_file (path, NULL, TYPE_WIRELESS, NULL);
-	g_free (path);
 
 	s_wifi = nm_connection_get_setting_wireless (connection);
 	g_assert (s_wifi);
 	g_assert_cmpint (nm_setting_wireless_get_mac_address_randomization (s_wifi), ==, value);
-
-	g_object_unref (connection);
 }
 
 static void
 test_write_wifi_mac_random (gconstpointer user_data)
 {
-	NMConnection *connection, *reread;
+	nmtst_auto_unlinkfile char *testfile = NULL;
+	gs_unref_object NMConnection *connection = NULL;
+	gs_unref_object NMConnection *reread = NULL;
 	NMSettingConnection *s_con;
 	NMSettingWireless *s_wifi;
-	char *uuid, *testfile = NULL, *val;
-	GError *error = NULL;
+	char *val;
 	shvarFile *f;
 	GBytes *ssid;
 	const unsigned char ssid_data[] = { 0x54, 0x65, 0x73, 0x74, 0x20, 0x53, 0x53, 0x49, 0x44 };
@@ -3070,14 +3181,12 @@ test_write_wifi_mac_random (gconstpointer user_data)
 	s_con = (NMSettingConnection *) nm_setting_connection_new ();
 	nm_connection_add_setting (connection, NM_SETTING (s_con));
 
-	uuid = nm_utils_uuid_generate ();
 	val = g_strdup_printf ("Test Write WiFi MAC %s", name);
 	g_object_set (s_con,
 	              NM_SETTING_CONNECTION_ID, val,
-	              NM_SETTING_CONNECTION_UUID, uuid,
+	              NM_SETTING_CONNECTION_UUID, nm_utils_uuid_generate_a (),
 	              NM_SETTING_CONNECTION_TYPE, NM_SETTING_WIRELESS_SETTING_NAME,
 	              NULL);
-	g_free (uuid);
 	g_free (val);
 
 	/* Wifi setting */
@@ -3098,35 +3207,25 @@ test_write_wifi_mac_random (gconstpointer user_data)
 	                        TEST_SCRATCH_DIR "/network-scripts/",
 	                        &testfile);
 
-	f = svOpenFile (testfile, &error);
-	g_assert_no_error (error);
-	g_assert (f);
-
-	/* re-read the file to check that what key was written. */
-	val = svGetValue (f, "MAC_ADDRESS_RANDOMIZATION", FALSE);
-	g_assert_cmpstr (val, ==, write_expected);
-	g_free (val);
+	f = _svOpenFile (testfile);
+	_svGetValue_check (f, "MAC_ADDRESS_RANDOMIZATION", write_expected);
 	svCloseFile (f);
 
 	reread = _connection_from_file (testfile, NULL, TYPE_WIRELESS, NULL);
-	unlink (testfile);
 
 	nmtst_assert_connection_equals (connection, TRUE, reread, FALSE);
-
-	g_free (testfile);
-	g_object_unref (connection);
-	g_object_unref (reread);
 }
 
 static void
 test_write_wired_wake_on_lan (void)
 {
-	NMConnection *connection, *reread;
+	nmtst_auto_unlinkfile char *testfile = NULL;
+	gs_unref_object NMConnection *connection = NULL;
+	gs_unref_object NMConnection *reread = NULL;
 	NMSettingConnection *s_con;
 	NMSettingWired *s_wired;
 	NMSettingWiredWakeOnLan wol;
-	char *uuid, *testfile = NULL, *val;
-	GError *error = NULL;
+	char *val;
 	shvarFile *f;
 
 	connection = nm_simple_connection_new ();
@@ -3135,13 +3234,11 @@ test_write_wired_wake_on_lan (void)
 	s_con = (NMSettingConnection *) nm_setting_connection_new ();
 	nm_connection_add_setting (connection, NM_SETTING (s_con));
 
-	uuid = nm_utils_uuid_generate ();
 	g_object_set (s_con,
 	              NM_SETTING_CONNECTION_ID, "Test Write Wired Wake-on-LAN",
-	              NM_SETTING_CONNECTION_UUID, uuid,
+	              NM_SETTING_CONNECTION_UUID, nm_utils_uuid_generate_a (),
 	              NM_SETTING_CONNECTION_TYPE, NM_SETTING_WIRED_SETTING_NAME,
 	              NULL);
-	g_free (uuid);
 
 	/* Wired setting */
 	s_wired = (NMSettingWired *) nm_setting_wired_new ();
@@ -3162,12 +3259,8 @@ test_write_wired_wake_on_lan (void)
 	                        TEST_SCRATCH_DIR "/network-scripts/",
 	                        &testfile);
 
-	f = svOpenFile (testfile, &error);
-	g_assert_no_error (error);
-	g_assert (f);
-
-	/* re-read the file to check that the key was written. */
-	val = svGetValue (f, "ETHTOOL_OPTS", FALSE);
+	f = _svOpenFile (testfile);
+	val = svGetValueString (f, "ETHTOOL_OPTS");
 	g_assert (val);
 	g_assert (strstr (val, "wol"));
 	g_assert (strstr (val, "sopass 00:00:00:11:22:33"));
@@ -3175,13 +3268,78 @@ test_write_wired_wake_on_lan (void)
 	svCloseFile (f);
 
 	reread = _connection_from_file (testfile, NULL, TYPE_ETHERNET, NULL);
-	unlink (testfile);
 
 	nmtst_assert_connection_equals (connection, TRUE, reread, FALSE);
+}
 
-	g_free (testfile);
-	g_object_unref (connection);
-	g_object_unref (reread);
+static void
+test_write_wired_auto_negotiate_off (void)
+{
+	nmtst_auto_unlinkfile char *testfile = NULL;
+	gs_unref_object NMConnection *connection = NULL;
+	gs_unref_object NMConnection *reread = NULL;
+	NMSettingWired *s_wired;
+	char *val;
+	shvarFile *f;
+
+	connection = nmtst_create_minimal_connection ("Test Write Wired Auto-Negotiate", NULL, NM_SETTING_WIRED_SETTING_NAME, NULL);
+	s_wired = nm_connection_get_setting_wired (connection);
+	g_object_set (s_wired,
+	              NM_SETTING_WIRED_AUTO_NEGOTIATE, FALSE,
+	              NM_SETTING_WIRED_DUPLEX, "half",
+	              NM_SETTING_WIRED_SPEED, 10,
+	              NULL);
+
+	_writer_new_connection (connection,
+	                        TEST_SCRATCH_DIR "/network-scripts/",
+	                        &testfile);
+
+	f = _svOpenFile (testfile);
+	val = svGetValueString (f, "ETHTOOL_OPTS");
+	g_assert (val);
+	g_assert (strstr (val, "autoneg off"));
+	g_assert (strstr (val, "speed 10"));
+	g_assert (strstr (val, "duplex half"));
+	g_free (val);
+	svCloseFile (f);
+
+	reread = _connection_from_file (testfile, NULL, TYPE_ETHERNET, NULL);
+
+	nmtst_assert_connection_equals (connection, TRUE, reread, FALSE);
+}
+
+static void
+test_write_wired_auto_negotiate_on (void)
+{
+	nmtst_auto_unlinkfile char *testfile = NULL;
+	gs_unref_object NMConnection *connection = NULL;
+	gs_unref_object NMConnection *reread = NULL;
+	NMSettingWired *s_wired;
+	char *val;
+	shvarFile *f;
+
+	connection = nmtst_create_minimal_connection ("Test Write Wired Auto-Negotiate", NULL, NM_SETTING_WIRED_SETTING_NAME, NULL);
+	s_wired = nm_connection_get_setting_wired (connection);
+	g_object_set (s_wired,
+	              NM_SETTING_WIRED_AUTO_NEGOTIATE, TRUE,
+	              NULL);
+
+	_writer_new_connection (connection,
+	                        TEST_SCRATCH_DIR "/network-scripts/",
+	                        &testfile);
+
+	f = _svOpenFile (testfile);
+	val = svGetValueString (f, "ETHTOOL_OPTS");
+	g_assert (val);
+	g_assert (strstr (val, "autoneg on"));
+	g_assert (!strstr (val, "speed"));
+	g_assert (!strstr (val, "duplex"));
+	g_free (val);
+	svCloseFile (f);
+
+	reread = _connection_from_file (testfile, NULL, TYPE_ETHERNET, NULL);
+
+	nmtst_assert_connection_equals (connection, TRUE, reread, FALSE);
 }
 
 static void
@@ -3208,11 +3366,11 @@ test_read_wifi_band_a (void)
 static void
 test_write_wifi_band_a (void)
 {
-	NMConnection *connection, *reread;
+	nmtst_auto_unlinkfile char *testfile = NULL;
+	gs_unref_object NMConnection *connection = NULL;
+	gs_unref_object NMConnection *reread = NULL;
 	NMSettingConnection *s_con;
 	NMSettingWireless *s_wifi;
-	char *uuid, *testfile = NULL, *val;
-	GError *error = NULL;
 	shvarFile *f;
 	GBytes *ssid;
 	const unsigned char ssid_data[] = { 0x54, 0x65, 0x73, 0x74, 0x20, 0x53, 0x53, 0x49, 0x44 };
@@ -3223,13 +3381,11 @@ test_write_wifi_band_a (void)
 	s_con = (NMSettingConnection *) nm_setting_connection_new ();
 	nm_connection_add_setting (connection, NM_SETTING (s_con));
 
-	uuid = nm_utils_uuid_generate ();
 	g_object_set (s_con,
 	              NM_SETTING_CONNECTION_ID, "Test Write WiFi Band A",
-	              NM_SETTING_CONNECTION_UUID, uuid,
+	              NM_SETTING_CONNECTION_UUID, nm_utils_uuid_generate_a (),
 	              NM_SETTING_CONNECTION_TYPE, NM_SETTING_WIRELESS_SETTING_NAME,
 	              NULL);
-	g_free (uuid);
 
 	/* Wifi setting */
 	s_wifi = (NMSettingWireless *) nm_setting_wireless_new ();
@@ -3251,25 +3407,13 @@ test_write_wifi_band_a (void)
 	                        TEST_SCRATCH_DIR "/network-scripts/",
 	                        &testfile);
 
-	f = svOpenFile (testfile, &error);
-	g_assert_no_error (error);
-	g_assert (f);
-
-	/* re-read the file to check that what key was written. */
-	val = svGetValue (f, "BAND", FALSE);
-	g_assert (val);
-	g_assert_cmpstr (val, ==, "a");
-	g_free (val);
+	f = _svOpenFile (testfile);
+	_svGetValue_check (f, "BAND", "a");
 	svCloseFile (f);
 
 	reread = _connection_from_file (testfile, NULL, TYPE_WIRELESS, NULL);
-	unlink (testfile);
 
 	nmtst_assert_connection_equals (connection, TRUE, reread, FALSE);
-
-	g_free (testfile);
-	g_object_unref (connection);
-	g_object_unref (reread);
 }
 
 static void
@@ -3510,19 +3654,18 @@ test_read_wifi_wep_agent_keys (void)
 static void
 test_write_wired_static (void)
 {
-	NMConnection *connection;
-	NMConnection *reread;
+	nmtst_auto_unlinkfile char *testfile = NULL;
+	nmtst_auto_unlinkfile char *route6file = NULL;
+	gs_unref_object NMConnection *connection = NULL;
+	gs_unref_object NMConnection *reread = NULL;
 	NMSettingConnection *s_con;
 	NMSettingWired *s_wired;
 	NMSettingIPConfig *s_ip4, *reread_s_ip4;
 	NMSettingIPConfig *s_ip6, *reread_s_ip6;
-	char *uuid;
 	NMIPAddress *addr;
 	NMIPAddress *addr6;
 	NMIPRoute *route6;
 	GError *error = NULL;
-	char *testfile = NULL;
-	char *route6file = NULL;
 
 	connection = nm_simple_connection_new ();
 
@@ -3530,14 +3673,13 @@ test_write_wired_static (void)
 	s_con = (NMSettingConnection *) nm_setting_connection_new ();
 	nm_connection_add_setting (connection, NM_SETTING (s_con));
 
-	uuid = nm_utils_uuid_generate ();
 	g_object_set (s_con,
 	              NM_SETTING_CONNECTION_ID, "Test Write Wired Static",
-	              NM_SETTING_CONNECTION_UUID, uuid,
+	              NM_SETTING_CONNECTION_UUID, nm_utils_uuid_generate_a (),
 	              NM_SETTING_CONNECTION_AUTOCONNECT, TRUE,
+	              NM_SETTING_CONNECTION_AUTOCONNECT_RETRIES, 1,
 	              NM_SETTING_CONNECTION_TYPE, NM_SETTING_WIRED_SETTING_NAME,
 	              NULL);
-	g_free (uuid);
 
 	/* Wired setting */
 	s_wired = (NMSettingWired *) nm_setting_wired_new ();
@@ -3627,9 +3769,9 @@ test_write_wired_static (void)
 	_writer_new_connection (connection,
 	                        TEST_SCRATCH_DIR "/network-scripts/",
 	                        &testfile);
+	route6file = utils_get_route6_path (testfile);
 
 	reread = _connection_from_file (testfile, NULL, TYPE_ETHERNET, NULL);
-	unlink (testfile);
 
 	/* FIXME: currently DNS domains from IPv6 setting are stored in 'DOMAIN' key in ifcfg-file
 	 * However after re-reading they are dropped into IPv4 setting.
@@ -3645,28 +3787,21 @@ test_write_wired_static (void)
 	g_assert_cmpint (nm_setting_ip_config_get_route_metric (reread_s_ip4), ==, 204);
 	g_assert_cmpint (nm_setting_ip_config_get_route_metric (reread_s_ip6), ==, 206);
 
-	nmtst_assert_connection_equals (connection, FALSE, reread, FALSE);
-
-	route6file = utils_get_route6_path (testfile);
-	unlink (route6file);
+	nm_connection_add_setting (connection, nm_setting_proxy_new ());
 
-	g_free (testfile);
-	g_free (route6file);
-	g_object_unref (connection);
-	g_object_unref (reread);
+	nmtst_assert_connection_equals (connection, FALSE, reread, FALSE);
 }
 
 static void
 test_write_wired_dhcp (void)
 {
-	NMConnection *connection;
-	NMConnection *reread;
+	nmtst_auto_unlinkfile char *testfile = NULL;
+	gs_unref_object NMConnection *connection = NULL;
+	gs_unref_object NMConnection *reread = NULL;
 	NMSettingConnection *s_con;
 	NMSettingWired *s_wired;
 	NMSettingIPConfig *s_ip4;
 	NMSettingIPConfig *s_ip6;
-	char *uuid;
-	char *testfile = NULL;
 
 	connection = nm_simple_connection_new ();
 
@@ -3674,14 +3809,12 @@ test_write_wired_dhcp (void)
 	s_con = (NMSettingConnection *) nm_setting_connection_new ();
 	nm_connection_add_setting (connection, NM_SETTING (s_con));
 
-	uuid = nm_utils_uuid_generate ();
 	g_object_set (s_con,
 	              NM_SETTING_CONNECTION_ID, "Test Write Wired DHCP",
-	              NM_SETTING_CONNECTION_UUID, uuid,
+	              NM_SETTING_CONNECTION_UUID, nm_utils_uuid_generate_a (),
 	              NM_SETTING_CONNECTION_AUTOCONNECT, TRUE,
 	              NM_SETTING_CONNECTION_TYPE, NM_SETTING_WIRED_SETTING_NAME,
 	              NULL);
-	g_free (uuid);
 
 	/* Wired setting */
 	s_wired = (NMSettingWired *) nm_setting_wired_new ();
@@ -3715,46 +3848,38 @@ test_write_wired_dhcp (void)
 	                        &testfile);
 
 	reread = _connection_from_file (testfile, NULL, TYPE_ETHERNET, NULL);
-	unlink (testfile);
 
 	nmtst_assert_connection_equals (connection, TRUE, reread, FALSE);
-
-	g_free (testfile);
-	g_object_unref (connection);
-	g_object_unref (reread);
 }
 
 static void
 test_write_wired_dhcp_plus_ip (void)
 {
-	NMConnection *connection, *reread;
-	char *written = NULL;
+	nmtst_auto_unlinkfile char *testfile = NULL;
+	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",
 	                                    NULL, TYPE_ETHERNET, NULL);
 
 	_writer_new_connection (connection,
 	                        TEST_SCRATCH_DIR "/network-scripts/",
-	                        &written);
+	                        &testfile);
 
-	reread = _connection_from_file (written, NULL, TYPE_ETHERNET, NULL);
-	unlink (written);
-	g_free (written);
+	reread = _connection_from_file (testfile, NULL, TYPE_ETHERNET, NULL);
 
 	nmtst_assert_connection_equals (connection, TRUE, reread, FALSE);
-
-	g_object_unref (connection);
-	g_object_unref (reread);
 }
 
 static void
 test_read_write_wired_dhcp_send_hostname (void)
 {
-	NMConnection *connection, *reread;
+	nmtst_auto_unlinkfile char *testfile = NULL;
+	gs_unref_object NMConnection *connection = NULL;
+	gs_unref_object NMConnection *reread = NULL;
 	NMSettingIPConfig *s_ip4;
 	NMSettingIPConfig *s_ip6;
 	const char * dhcp_hostname = "kamil-patka";
-	char *written = NULL;
 
 	connection = _connection_from_file (TEST_IFCFG_DIR"/network-scripts/ifcfg-test-wired-dhcp-send-hostname",
 	                                    NULL, TYPE_ETHERNET, NULL);
@@ -3766,7 +3891,7 @@ test_read_write_wired_dhcp_send_hostname (void)
 	g_assert (s_ip6);
 	g_assert (nm_setting_ip_config_get_dhcp_send_hostname (s_ip4) == TRUE);
 	g_assert_cmpstr (nm_setting_ip_config_get_dhcp_hostname (s_ip4), ==, "svata-pulec");
-	g_assert_cmpstr (nm_setting_ip_config_get_dhcp_hostname (s_ip6), ==, "svata-pulec");
+	g_assert (!nm_setting_ip_config_get_dhcp_hostname (s_ip6));
 
 	/* Set dhcp-send-hostname=false dhcp-hostname="kamil-patka" and write the connection. */
 	g_object_set (s_ip4, NM_SETTING_IP_CONFIG_DHCP_SEND_HOSTNAME, FALSE, NULL);
@@ -3775,11 +3900,9 @@ test_read_write_wired_dhcp_send_hostname (void)
 
 	_writer_new_connection (connection,
 	                        TEST_SCRATCH_DIR "/network-scripts/",
-	                        &written);
+	                        &testfile);
 
-	reread = _connection_from_file (written, NULL, TYPE_ETHERNET, NULL);
-	unlink (written);
-	g_free (written);
+	reread = _connection_from_file (testfile, NULL, TYPE_ETHERNET, NULL);
 
 	nmtst_assert_connection_equals (connection, TRUE, reread, FALSE);
 
@@ -3791,24 +3914,35 @@ test_read_write_wired_dhcp_send_hostname (void)
 	g_assert (nm_setting_ip_config_get_dhcp_send_hostname (s_ip4) == FALSE);
 	g_assert_cmpstr (nm_setting_ip_config_get_dhcp_hostname (s_ip4), ==, dhcp_hostname);
 	g_assert_cmpstr (nm_setting_ip_config_get_dhcp_hostname (s_ip6), ==, dhcp_hostname);
+}
 
-	g_object_unref (connection);
-	g_object_unref (reread);
+static void
+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",
+	                                    NULL, TYPE_ETHERNET, NULL);
+
+	s_ip6 = nm_connection_get_setting_ip6_config (connection);
+	g_assert (s_ip6);
+	g_assert (nm_setting_ip_config_get_dhcp_send_hostname (s_ip6) == TRUE);
+	g_assert_cmpstr (nm_setting_ip_config_get_dhcp_hostname (s_ip6), ==, "fully.qualified.domain");
 }
 
 static void
 test_write_wired_static_ip6_only (void)
 {
-	NMConnection *connection;
-	NMConnection *reread;
+	nmtst_auto_unlinkfile char *testfile = NULL;
+	gs_unref_object NMConnection *connection = NULL;
+	gs_unref_object NMConnection *reread = NULL;
 	NMSettingConnection *s_con;
 	NMSettingWired *s_wired;
 	NMSettingIPConfig *s_ip4;
 	NMSettingIPConfig *s_ip6;
-	char *uuid;
 	NMIPAddress *addr6;
 	GError *error = NULL;
-	char *testfile = NULL;
 
 	connection = nm_simple_connection_new ();
 
@@ -3816,14 +3950,12 @@ test_write_wired_static_ip6_only (void)
 	s_con = (NMSettingConnection *) nm_setting_connection_new ();
 	nm_connection_add_setting (connection, NM_SETTING (s_con));
 
-	uuid = nm_utils_uuid_generate ();
 	g_object_set (s_con,
 	              NM_SETTING_CONNECTION_ID, "Test Write Wired Static IP6 Only",
-	              NM_SETTING_CONNECTION_UUID, uuid,
+	              NM_SETTING_CONNECTION_UUID, nm_utils_uuid_generate_a (),
 	              NM_SETTING_CONNECTION_AUTOCONNECT, TRUE,
 	              NM_SETTING_CONNECTION_TYPE, NM_SETTING_WIRED_SETTING_NAME,
 	              NULL);
-	g_free (uuid);
 
 	/* Wired setting */
 	s_wired = (NMSettingWired *) nm_setting_wired_new ();
@@ -3863,13 +3995,8 @@ test_write_wired_static_ip6_only (void)
 	                        &testfile);
 
 	reread = _connection_from_file (testfile, NULL, TYPE_ETHERNET, NULL);
-	unlink (testfile);
 
 	nmtst_assert_connection_equals (connection, TRUE, reread, FALSE);
-
-	g_free (testfile);
-	g_object_unref (connection);
-	g_object_unref (reread);
 }
 
 /* Test writing an IPv6 config with varying gateway address.
@@ -3883,19 +4010,19 @@ test_write_wired_static_ip6_only (void)
 static void
 test_write_wired_static_ip6_only_gw (gconstpointer user_data)
 {
-	NMConnection *connection;
-	NMConnection *reread;
+	nmtst_auto_unlinkfile char *testfile = NULL;
+	gs_unref_object NMConnection *connection = NULL;
+	gs_unref_object NMConnection *reread = NULL;
 	NMSettingConnection *s_con;
 	NMSettingWired *s_wired;
 	NMSettingIPConfig *s_ip4;
 	NMSettingIPConfig *s_ip6;
-	char *uuid;
 	NMIPAddress *addr6;
 	GError *error = NULL;
-	char *testfile = NULL;
 	char *id = NULL;
-	char *written_ifcfg_gateway;
+	gs_free char *written_ifcfg_gateway = NULL;
 	const char *gateway6 = user_data;
+	shvarFile *ifcfg;
 
 	connection = nm_simple_connection_new ();
 
@@ -3903,15 +4030,13 @@ 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));
 
-	uuid = nm_utils_uuid_generate ();
 	id = g_strdup_printf ("Test Write Wired Static IP6 Only With Gateway %s", gateway6 ? gateway6 : "NULL");
 	g_object_set (s_con,
 	              NM_SETTING_CONNECTION_ID, id,
-	              NM_SETTING_CONNECTION_UUID, uuid,
+	              NM_SETTING_CONNECTION_UUID, nm_utils_uuid_generate_a (),
 	              NM_SETTING_CONNECTION_AUTOCONNECT, TRUE,
 	              NM_SETTING_CONNECTION_TYPE, NM_SETTING_WIRED_SETTING_NAME,
 	              NULL);
-	g_free (uuid);
 	g_free (id);
 
 	/* Wired setting */
@@ -3956,17 +4081,9 @@ test_write_wired_static_ip6_only_gw (gconstpointer user_data)
 
 	nmtst_assert_connection_equals (connection, TRUE, reread, FALSE);
 
-	{
-		/* re-read the file to check that what key was written. */
-		shvarFile *ifcfg = svOpenFile (testfile, &error);
-
-		g_assert_no_error (error);
-		g_assert (ifcfg);
-		written_ifcfg_gateway = svGetValue (ifcfg, "IPV6_DEFAULTGW", FALSE);
-		svCloseFile (ifcfg);
-	}
-
-	unlink (testfile);
+	ifcfg = _svOpenFile (testfile);
+	written_ifcfg_gateway = svGetValueString (ifcfg, "IPV6_DEFAULTGW");
+	svCloseFile (ifcfg);
 
 	/* access the gateway from the loaded connection. */
 	s_ip6 = nm_connection_get_setting_ip6_config (reread);
@@ -3983,23 +4100,19 @@ test_write_wired_static_ip6_only_gw (gconstpointer user_data)
 		g_assert_cmpstr (nm_setting_ip_config_get_gateway (s_ip6), ==, gateway6);
 		g_assert_cmpstr (written_ifcfg_gateway, ==, gateway6);
 	}
-
-	g_free (testfile);
-	g_free (written_ifcfg_gateway);
-	g_object_unref (connection);
-	g_object_unref (reread);
 }
 
 static void
 test_read_write_static_routes_legacy (void)
 {
-	NMConnection *connection, *reread;
+	nmtst_auto_unlinkfile char *testfile = NULL;
+	nmtst_auto_unlinkfile char *routefile = NULL;
+	gs_free char *route6file = NULL;
+	gs_unref_object NMConnection *connection = NULL;
+	gs_unref_object NMConnection *reread = NULL;
 	NMSettingConnection *s_con;
 	NMSettingWired *s_wired;
 	NMSettingIPConfig *s_ip4;
-	char *testfile = NULL;
-	char *routefile = NULL;
-	char *route6file = NULL;
 	const char *tmp;
 
 	connection = _connection_from_file (TEST_IFCFG_DIR "/network-scripts/ifcfg-test-static-routes-legacy",
@@ -4035,40 +4148,31 @@ test_read_write_static_routes_legacy (void)
 	 * source tree and for 'make distcheck'.
 	 */
 	_writer_new_connection (connection,
-	                        TEST_SCRATCH_DIR "/network-scripts/tmp",
+	                        TEST_SCRATCH_DIR_TMP,
 	                        &testfile);
 
 	reread = _connection_from_file (testfile, NULL, TYPE_ETHERNET, NULL);
-	unlink (testfile);
 	routefile = utils_get_route_path (testfile);
-	unlink (routefile);
 	route6file = utils_get_route6_path (testfile);
-	unlink (route6file);
+	g_assert (!g_file_test (route6file, G_FILE_TEST_EXISTS));
 
 	nmtst_assert_connection_equals (connection, TRUE, reread, FALSE);
-
-	g_free (testfile);
-	g_free (routefile);
-	g_free (route6file);
-	g_object_unref (connection);
-	g_object_unref (reread);
 }
 
 static void
 test_write_wired_static_routes (void)
 {
-	NMConnection *connection;
-	NMConnection *reread;
+	nmtst_auto_unlinkfile char *testfile = NULL;
+	nmtst_auto_unlinkfile char *routefile = NULL;
+	gs_unref_object NMConnection *connection = NULL;
+	gs_unref_object NMConnection *reread = NULL;
 	NMSettingConnection *s_con;
 	NMSettingWired *s_wired;
 	NMSettingIPConfig *s_ip4;
 	NMSettingIPConfig *s_ip6;
-	char *uuid;
 	NMIPAddress *addr;
 	NMIPRoute *route;
 	GError *error = NULL;
-	char *testfile = NULL;
-	char *routefile = NULL;
 
 	connection = nm_simple_connection_new ();
 
@@ -4076,14 +4180,12 @@ test_write_wired_static_routes (void)
 	s_con = (NMSettingConnection *) nm_setting_connection_new ();
 	nm_connection_add_setting (connection, NM_SETTING (s_con));
 
-	uuid = nm_utils_uuid_generate ();
 	g_object_set (s_con,
 	              NM_SETTING_CONNECTION_ID, "Test Write Wired Static Routes",
-	              NM_SETTING_CONNECTION_UUID, uuid,
+	              NM_SETTING_CONNECTION_UUID, nm_utils_uuid_generate_a (),
 	              NM_SETTING_CONNECTION_AUTOCONNECT, TRUE,
 	              NM_SETTING_CONNECTION_TYPE, NM_SETTING_WIRED_SETTING_NAME,
 	              NULL);
-	g_free (uuid);
 
 	/* Wired setting */
 	s_wired = (NMSettingWired *) nm_setting_wired_new ();
@@ -4146,34 +4248,26 @@ test_write_wired_static_routes (void)
 	                        &testfile);
 
 	reread = _connection_from_file (testfile, NULL, TYPE_ETHERNET, NULL);
-	unlink (testfile);
 
 	routefile = utils_get_route_path (testfile);
-	unlink (routefile);
 
 	nmtst_assert_connection_equals (connection, TRUE, reread, FALSE);
-
-	g_free (testfile);
-	g_free (routefile);
-	g_object_unref (connection);
-	g_object_unref (reread);
 }
 
 static void
 test_write_wired_dhcp_8021x_peap_mschapv2 (void)
 {
-	NMConnection *connection;
-	NMConnection *reread;
+	nmtst_auto_unlinkfile char *keyfile = NULL;
+	nmtst_auto_unlinkfile char *testfile = NULL;
+	gs_unref_object NMConnection *connection = NULL;
+	gs_unref_object NMConnection *reread = NULL;
 	NMSettingConnection *s_con;
 	NMSettingWired *s_wired;
 	NMSettingIPConfig *s_ip4;
 	NMSettingIPConfig *s_ip6;
 	NMSetting8021x *s_8021x;
-	char *uuid;
 	gboolean success;
 	GError *error = NULL;
-	char *testfile = NULL;
-	char *keyfile = NULL;
 
 	connection = nm_simple_connection_new ();
 
@@ -4181,14 +4275,12 @@ test_write_wired_dhcp_8021x_peap_mschapv2 (void)
 	s_con = (NMSettingConnection *) nm_setting_connection_new ();
 	nm_connection_add_setting (connection, NM_SETTING (s_con));
 
-	uuid = nm_utils_uuid_generate ();
 	g_object_set (s_con,
 	              NM_SETTING_CONNECTION_ID, "Test Write Wired DHCP 802.1x PEAP MSCHAPv2",
-	              NM_SETTING_CONNECTION_UUID, uuid,
+	              NM_SETTING_CONNECTION_UUID, nm_utils_uuid_generate_a (),
 	              NM_SETTING_CONNECTION_AUTOCONNECT, TRUE,
 	              NM_SETTING_CONNECTION_TYPE, NM_SETTING_WIRED_SETTING_NAME,
 	              NULL);
-	g_free (uuid);
 
 	/* Wired setting */
 	s_wired = (NMSettingWired *) nm_setting_wired_new ();
@@ -4238,34 +4330,26 @@ test_write_wired_dhcp_8021x_peap_mschapv2 (void)
 	                        &testfile);
 
 	reread = _connection_from_file (testfile, NULL, TYPE_ETHERNET, NULL);
-	unlink (testfile);
-
-	keyfile = utils_get_keys_path (testfile);
-	unlink (keyfile);
 
 	nmtst_assert_connection_equals (connection, TRUE, reread, FALSE);
 
-	g_free (testfile);
-	g_free (keyfile);
-	g_object_unref (connection);
-	g_object_unref (reread);
+	keyfile = utils_get_keys_path (testfile);
 }
 
 static void
 test_write_wired_8021x_tls (gconstpointer test_data)
 {
-	NMConnection *connection;
-	NMConnection *reread;
+	nmtst_auto_unlinkfile char *testfile = NULL;
+	gs_free char *keyfile = NULL;
+	gs_unref_object NMConnection *connection = NULL;
+	gs_unref_object NMConnection *reread = NULL;
 	NMSettingConnection *s_con;
 	NMSettingWired *s_wired;
 	NMSettingIPConfig *s_ip4;
 	NMSettingIPConfig *s_ip6;
 	NMSetting8021x *s_8021x;
-	char *uuid;
 	gboolean success;
 	GError *error = NULL;
-	char *testfile = NULL;
-	char *keyfile = NULL;
 	NMSetting8021xCKFormat format = NM_SETTING_802_1X_CK_FORMAT_UNKNOWN;
 	const char *pw;
 	char *tmp;
@@ -4278,36 +4362,29 @@ test_write_wired_8021x_tls (gconstpointer test_data)
 	flags = GPOINTER_TO_INT (flags_p);
 
 	connection = nm_simple_connection_new ();
-	g_assert (connection != NULL);
 
 	/* Connection setting */
 	s_con = (NMSettingConnection *) nm_setting_connection_new ();
-	g_assert (s_con);
 	nm_connection_add_setting (connection, NM_SETTING (s_con));
 
-	uuid = nm_utils_uuid_generate ();
 	g_object_set (s_con,
 	              NM_SETTING_CONNECTION_ID, "Test Write Wired 802.1x TLS Blobs",
-	              NM_SETTING_CONNECTION_UUID, uuid,
+	              NM_SETTING_CONNECTION_UUID, nm_utils_uuid_generate_a (),
 	              NM_SETTING_CONNECTION_AUTOCONNECT, TRUE,
 	              NM_SETTING_CONNECTION_TYPE, NM_SETTING_WIRED_SETTING_NAME,
 	              NULL);
-	g_free (uuid);
 
 	/* Wired setting */
 	s_wired = (NMSettingWired *) nm_setting_wired_new ();
-	g_assert (s_wired);
 	nm_connection_add_setting (connection, NM_SETTING (s_wired));
 
 	/* IP4 setting */
 	s_ip4 = (NMSettingIPConfig *) nm_setting_ip4_config_new ();
-	g_assert (s_ip4);
 	g_object_set (s_ip4, NM_SETTING_IP_CONFIG_METHOD, NM_SETTING_IP4_CONFIG_METHOD_AUTO, NULL);
 	nm_connection_add_setting (connection, NM_SETTING (s_ip4));
 
 	/* IP6 setting */
 	s_ip6 = (NMSettingIPConfig *) nm_setting_ip6_config_new ();
-	g_assert (s_ip6);
 	g_object_set (s_ip6,
 	              NM_SETTING_IP_CONFIG_METHOD, NM_SETTING_IP6_CONFIG_METHOD_IGNORE,
 	              NM_SETTING_IP_CONFIG_MAY_FAIL, TRUE,
@@ -4316,7 +4393,6 @@ test_write_wired_8021x_tls (gconstpointer test_data)
 
 	/* 802.1x setting */
 	s_8021x = (NMSetting8021x *) nm_setting_802_1x_new ();
-	g_assert (s_8021x);
 	nm_connection_add_setting (connection, NM_SETTING (s_8021x));
 
 	g_object_set (s_8021x, NM_SETTING_802_1X_IDENTITY, "Bill Smith", NULL);
@@ -4365,9 +4441,9 @@ test_write_wired_8021x_tls (gconstpointer test_data)
 	                        &testfile);
 
 	reread = _connection_from_file (testfile, NULL, TYPE_WIRELESS, NULL);
-	unlink (testfile);
+
 	keyfile = utils_get_keys_path (testfile);
-	unlink (keyfile);
+	nmtst_file_unlink_if_exists (keyfile);
 
 	/* Ensure the reread connection's certificates and private key are paths; no
 	 * matter what scheme was used in the original connection they will be read
@@ -4411,21 +4487,16 @@ test_write_wired_8021x_tls (gconstpointer test_data)
 
 	/* Clean up created certs and keys */
 	tmp = utils_cert_path (testfile, "ca-cert.der");
-	unlink (tmp);
+	nmtst_file_unlink_if_exists (tmp);
 	g_free (tmp);
 
 	tmp = utils_cert_path (testfile, "client-cert.der");
-	unlink (tmp);
+	nmtst_file_unlink_if_exists (tmp);
 	g_free (tmp);
 
 	tmp = utils_cert_path (testfile, "private-key.pem");
-	unlink (tmp);
+	nmtst_file_unlink_if_exists (tmp);
 	g_free (tmp);
-
-	g_free (testfile);
-	g_free (keyfile);
-	g_object_unref (connection);
-	g_object_unref (reread);
 }
 
 #define TEST_SCRATCH_ALIAS_BASE TEST_SCRATCH_DIR "/network-scripts/ifcfg-alias0"
@@ -4433,45 +4504,43 @@ test_write_wired_8021x_tls (gconstpointer test_data)
 static void
 test_write_wired_aliases (void)
 {
-	NMConnection *connection;
-	NMConnection *reread;
+	nmtst_auto_unlinkfile char *testfile = NULL;
+	gs_unref_object NMConnection *connection = NULL;
+	gs_unref_object NMConnection *reread = NULL;
 	NMSettingConnection *s_con;
 	NMSettingWired *s_wired;
 	NMSettingIPConfig *s_ip4;
-	char *uuid;
 	int num_addresses = 4;
 	const char *ip[] = { "1.1.1.1", "1.1.1.2", "1.1.1.3", "1.1.1.4" };
 	const char *label[] = { NULL, "alias0:2", NULL, "alias0:3" };
 	NMIPAddress *addr;
 	GError *error = NULL;
-	char *testfile = NULL;
 	shvarFile *ifcfg;
 	int i, j;
 
+	nmtst_file_unlink_if_exists (TEST_SCRATCH_ALIAS_BASE ":2");
+	nmtst_file_unlink_if_exists (TEST_SCRATCH_ALIAS_BASE ":3");
+	nmtst_file_unlink_if_exists (TEST_SCRATCH_ALIAS_BASE ":5");
+
 	connection = nm_simple_connection_new ();
 	g_assert (connection);
 
 	/* Connection setting */
 	s_con = (NMSettingConnection *) nm_setting_connection_new ();
-	g_assert (s_con);
 	nm_connection_add_setting (connection, NM_SETTING (s_con));
 
-	uuid = nm_utils_uuid_generate ();
 	g_object_set (s_con,
 	              NM_SETTING_CONNECTION_ID, "alias0",
-	              NM_SETTING_CONNECTION_UUID, uuid,
+	              NM_SETTING_CONNECTION_UUID, nm_utils_uuid_generate_a (),
 	              NM_SETTING_CONNECTION_TYPE, NM_SETTING_WIRED_SETTING_NAME,
 	              NULL);
-	g_free (uuid);
 
 	/* Wired setting */
 	s_wired = (NMSettingWired *) nm_setting_wired_new ();
-	g_assert (s_wired);
 	nm_connection_add_setting (connection, NM_SETTING (s_wired));
 
 	/* IP4 setting */
 	s_ip4 = (NMSettingIPConfig *) nm_setting_ip4_config_new ();
-	g_assert (s_ip4);
 	nm_connection_add_setting (connection, NM_SETTING (s_ip4));
 
 	g_object_set (s_ip4,
@@ -4493,15 +4562,15 @@ test_write_wired_aliases (void)
 
 	/* Create some pre-existing alias files, to make sure they get overwritten / deleted. */
 	ifcfg = svCreateFile (TEST_SCRATCH_ALIAS_BASE ":2");
-	svSetValue (ifcfg, "DEVICE", "alias0:2", FALSE);
-	svSetValue (ifcfg, "IPADDR", "192.168.1.2", FALSE);
+	svSetValueString (ifcfg, "DEVICE", "alias0:2");
+	svSetValueString (ifcfg, "IPADDR", "192.168.1.2");
 	svWriteFile (ifcfg, 0644, NULL);
 	svCloseFile (ifcfg);
 	g_assert (g_file_test (TEST_SCRATCH_ALIAS_BASE ":2", G_FILE_TEST_EXISTS));
 
 	ifcfg = svCreateFile (TEST_SCRATCH_ALIAS_BASE ":5");
-	svSetValue (ifcfg, "DEVICE", "alias0:5", FALSE);
-	svSetValue (ifcfg, "IPADDR", "192.168.1.5", FALSE);
+	svSetValueString (ifcfg, "DEVICE", "alias0:5");
+	svSetValueString (ifcfg, "IPADDR", "192.168.1.5");
 	svWriteFile (ifcfg, 0644, NULL);
 	svCloseFile (ifcfg);
 	g_assert (g_file_test (TEST_SCRATCH_ALIAS_BASE ":5", G_FILE_TEST_EXISTS));
@@ -4516,9 +4585,8 @@ test_write_wired_aliases (void)
 	g_assert (!g_file_test (TEST_SCRATCH_ALIAS_BASE ":5", G_FILE_TEST_EXISTS));
 
 	reread = _connection_from_file (testfile, NULL, TYPE_ETHERNET, NULL);
-	unlink (testfile);
-	unlink (TEST_SCRATCH_ALIAS_BASE ":2");
-	unlink (TEST_SCRATCH_ALIAS_BASE ":3");
+	nmtst_file_unlink (TEST_SCRATCH_ALIAS_BASE ":2");
+	nmtst_file_unlink (TEST_SCRATCH_ALIAS_BASE ":3");
 
 	/* nm_connection_compare() is not guaranteed to succeed, because the
 	 * aliases get read back in essentially random order. So just
@@ -4555,20 +4623,17 @@ test_write_wired_aliases (void)
 
 	/* Gateway */
 	g_assert_cmpstr (nm_setting_ip_config_get_gateway (s_ip4), ==, "1.1.1.1");
-
-	g_free (testfile);
-	g_object_unref (connection);
-	g_object_unref (reread);
 }
 
 static void
 test_write_gateway (void)
 {
-	NMConnection *connection, *reread;
+	nmtst_auto_unlinkfile char *testfile = NULL;
+	gs_unref_object NMConnection *connection = NULL;
+	gs_unref_object NMConnection *reread = NULL;
 	NMSettingConnection *s_con;
 	NMSettingWired *s_wired;
 	NMSettingIPConfig *s_ip4;
-	char *uuid, *testfile = NULL, *val;
 	GError *error = NULL;
 	shvarFile *f;
 	NMIPAddress *addr;
@@ -4579,13 +4644,11 @@ test_write_gateway (void)
 	s_con = (NMSettingConnection *) nm_setting_connection_new ();
 	nm_connection_add_setting (connection, NM_SETTING (s_con));
 
-	uuid = nm_utils_uuid_generate ();
 	g_object_set (s_con,
 	              NM_SETTING_CONNECTION_ID, "Test Write Static Addresses Gateway",
-	              NM_SETTING_CONNECTION_UUID, uuid,
+	              NM_SETTING_CONNECTION_UUID, nm_utils_uuid_generate_a (),
 	              NM_SETTING_CONNECTION_TYPE, NM_SETTING_WIRED_SETTING_NAME,
 	              NULL);
-	g_free (uuid);
 
 	/* Wired setting */
 	s_wired = (NMSettingWired *) nm_setting_wired_new ();
@@ -4617,77 +4680,37 @@ test_write_gateway (void)
 	                        TEST_SCRATCH_DIR "/network-scripts/",
 	                        &testfile);
 
-	f = svOpenFile (testfile, &error);
-	g_assert_no_error (error);
-	g_assert (f);
-
-	/* re-read the file to check that the keys was written as IPADDR, GATEWAY and IPADDR1, GATEWAY1 */
-	val = svGetValue (f, "IPADDR", FALSE);
-	g_assert (val);
-	g_assert_cmpstr (val, ==, "1.1.1.3");
-	g_free (val);
-
-	val = svGetValue (f, "IPADDR1", FALSE);
-	g_assert (val);
-	g_assert_cmpstr (val, ==, "2.2.2.5");
-	g_free (val);
-
-	val = svGetValue (f, "IPADDR0", FALSE);
-	g_assert (val == NULL);
-
-	val = svGetValue (f, "PREFIX", FALSE);
-	g_assert (val);
-	g_assert_cmpstr (val, ==, "24");
-	g_free (val);
-
-	val = svGetValue (f, "PREFIX1", FALSE);
-	g_assert (val);
-	g_assert_cmpstr (val, ==, "24");
-	g_free (val);
-
-	val = svGetValue (f, "PREFIX0", FALSE);
-	g_assert (val == NULL);
-
-	val = svGetValue (f, "GATEWAY", FALSE);
-	g_assert (val);
-	g_assert_cmpstr (val, ==, "1.1.1.254");
-	g_free (val);
-
-	val = svGetValue (f, "GATEWAY0", FALSE);
-	g_assert (val == NULL);
-
-	val = svGetValue (f, "GATEWAY1", FALSE);
-	g_assert (val == NULL);
-
+	f = _svOpenFile (testfile);
+	_svGetValue_check (f, "IPADDR", "1.1.1.3");
+	_svGetValue_check (f, "IPADDR1", "2.2.2.5");
+	_svGetValue_check (f, "IPADDR0", NULL);
+	_svGetValue_check (f, "PREFIX", "24");
+	_svGetValue_check (f, "PREFIX1", "24");
+	_svGetValue_check (f, "PREFIX0", NULL);
+	_svGetValue_check (f, "GATEWAY", "1.1.1.254");
+	_svGetValue_check (f, "GATEWAY0", NULL);
+	_svGetValue_check (f, "GATEWAY1", NULL);
 	svCloseFile (f);
 
 	reread = _connection_from_file (testfile, NULL, TYPE_WIRELESS, NULL);
-	unlink (testfile);
 
 	nmtst_assert_connection_equals (connection, TRUE, reread, FALSE);
-
-	g_free (testfile);
-	g_object_unref (connection);
-	g_object_unref (reread);
 }
 
 
 static void
 test_write_wifi_open (void)
 {
-	NMConnection *connection;
-	NMConnection *reread;
+	nmtst_auto_unlinkfile char *testfile = NULL;
+	gs_unref_object NMConnection *connection = NULL;
+	gs_unref_object NMConnection *reread = NULL;
 	NMSettingConnection *s_con;
 	NMSettingWireless *s_wifi;
 	NMSettingIPConfig *s_ip4;
 	NMSettingIPConfig *s_ip6;
-	char *uuid;
-	GError *error = NULL;
-	char *testfile = NULL;
 	GBytes *ssid;
 	const unsigned char ssid_data[] = { 0x54, 0x65, 0x73, 0x74, 0x20, 0x53, 0x53, 0x49, 0x44 };
 	shvarFile *ifcfg;
-	char *tmp;
 
 	connection = nm_simple_connection_new ();
 
@@ -4695,14 +4718,12 @@ test_write_wifi_open (void)
 	s_con = (NMSettingConnection *) nm_setting_connection_new ();
 	nm_connection_add_setting (connection, NM_SETTING (s_con));
 
-	uuid = nm_utils_uuid_generate ();
 	g_object_set (s_con,
 	              NM_SETTING_CONNECTION_ID, "Test Write Wifi Open",
-	              NM_SETTING_CONNECTION_UUID, uuid,
+	              NM_SETTING_CONNECTION_UUID, nm_utils_uuid_generate_a (),
 	              NM_SETTING_CONNECTION_AUTOCONNECT, TRUE,
 	              NM_SETTING_CONNECTION_TYPE, NM_SETTING_WIRELESS_SETTING_NAME,
 	              NULL);
-	g_free (uuid);
 
 	/* Wifi setting */
 	s_wifi = (NMSettingWireless *) nm_setting_wireless_new ();
@@ -4745,39 +4766,23 @@ test_write_wifi_open (void)
 
 	reread = _connection_from_file (testfile, NULL, TYPE_WIRELESS, NULL);
 
-	/* Now make sure that the ESSID item isn't double-quoted (rh #606518) */
-	ifcfg = svOpenFile (testfile, &error);
-	g_assert_no_error (error);
-	g_assert (ifcfg != NULL);
-
-	tmp = svGetValue (ifcfg, "ESSID", TRUE);
-	g_assert (tmp);
-
-	g_assert (strncmp (tmp, "\"\"", 2) != 0);
-
-	g_free (tmp);
+	ifcfg = _svOpenFile (testfile);
+	_svGetValue_check (ifcfg, "ESSID", "Test SSID");
 	svCloseFile (ifcfg);
 
-	unlink (testfile);
-
 	nmtst_assert_connection_equals (connection, TRUE, reread, FALSE);
-
-	g_free (testfile);
-	g_object_unref (connection);
-	g_object_unref (reread);
 }
 
 static void
 test_write_wifi_open_hex_ssid (void)
 {
-	NMConnection *connection;
-	NMConnection *reread;
+	nmtst_auto_unlinkfile char *testfile = NULL;
+	gs_unref_object NMConnection *connection = NULL;
+	gs_unref_object NMConnection *reread = NULL;
 	NMSettingConnection *s_con;
 	NMSettingWireless *s_wifi;
 	NMSettingIPConfig *s_ip4;
 	NMSettingIPConfig *s_ip6;
-	char *uuid;
-	char *testfile = NULL;
 	GBytes *ssid;
 	const unsigned char ssid_data[] = { 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd };
 
@@ -4787,14 +4792,12 @@ test_write_wifi_open_hex_ssid (void)
 	s_con = (NMSettingConnection *) nm_setting_connection_new ();
 	nm_connection_add_setting (connection, NM_SETTING (s_con));
 
-	uuid = nm_utils_uuid_generate ();
 	g_object_set (s_con,
 	              NM_SETTING_CONNECTION_ID, "Test Write Wifi Open Hex SSID",
-	              NM_SETTING_CONNECTION_UUID, uuid,
+	              NM_SETTING_CONNECTION_UUID, nm_utils_uuid_generate_a (),
 	              NM_SETTING_CONNECTION_AUTOCONNECT, TRUE,
 	              NM_SETTING_CONNECTION_TYPE, NM_SETTING_WIRELESS_SETTING_NAME,
 	              NULL);
-	g_free (uuid);
 
 	/* Wifi setting */
 	s_wifi = (NMSettingWireless *) nm_setting_wireless_new ();
@@ -4831,28 +4834,22 @@ test_write_wifi_open_hex_ssid (void)
 	                        &testfile);
 
 	reread = _connection_from_file (testfile, NULL, TYPE_WIRELESS, NULL);
-	unlink (testfile);
 
 	nmtst_assert_connection_equals (connection, TRUE, reread, FALSE);
-
-	g_free (testfile);
-	g_object_unref (connection);
-	g_object_unref (reread);
 }
 
 static void
 test_write_wifi_wep (void)
 {
-	NMConnection *connection;
-	NMConnection *reread;
+	nmtst_auto_unlinkfile char *testfile = NULL;
+	nmtst_auto_unlinkfile char *keyfile = NULL;
+	gs_unref_object NMConnection *connection = NULL;
+	gs_unref_object NMConnection *reread = NULL;
 	NMSettingConnection *s_con;
 	NMSettingWireless *s_wifi;
 	NMSettingWirelessSecurity *s_wsec;
 	NMSettingIPConfig *s_ip4;
 	NMSettingIPConfig *s_ip6;
-	char *uuid;
-	char *testfile = NULL;
-	char *keyfile = NULL;
 	GBytes *ssid;
 	const char *ssid_data = "blahblah";
 	struct stat statbuf;
@@ -4863,14 +4860,12 @@ test_write_wifi_wep (void)
 	s_con = (NMSettingConnection *) nm_setting_connection_new ();
 	nm_connection_add_setting (connection, NM_SETTING (s_con));
 
-	uuid = nm_utils_uuid_generate ();
 	g_object_set (s_con,
 	              NM_SETTING_CONNECTION_ID, "Test Write Wifi WEP",
-	              NM_SETTING_CONNECTION_UUID, uuid,
+	              NM_SETTING_CONNECTION_UUID, nm_utils_uuid_generate_a (),
 	              NM_SETTING_CONNECTION_AUTOCONNECT, TRUE,
 	              NM_SETTING_CONNECTION_TYPE, NM_SETTING_WIRELESS_SETTING_NAME,
 	              NULL);
-	g_free (uuid);
 
 	/* Wifi setting */
 	s_wifi = (NMSettingWireless *) nm_setting_wireless_new ();
@@ -4921,36 +4916,28 @@ test_write_wifi_wep (void)
 	                        &testfile);
 
 	reread = _connection_from_file (testfile, NULL, TYPE_WIRELESS, NULL);
-	unlink (testfile);
 
 	keyfile = utils_get_keys_path (testfile);
 	g_assert_cmpint (stat (keyfile, &statbuf), ==, 0);
 	g_assert (S_ISREG (statbuf.st_mode));
 	g_assert_cmpint ((statbuf.st_mode & 0077), ==, 0);
-	unlink (keyfile);
 
 	nmtst_assert_connection_equals (connection, TRUE, reread, FALSE);
-
-	g_free (testfile);
-	g_free (keyfile);
-	g_object_unref (connection);
-	g_object_unref (reread);
 }
 
 static void
 test_write_wifi_wep_adhoc (void)
 {
-	NMConnection *connection;
-	NMConnection *reread;
+	nmtst_auto_unlinkfile char *testfile = NULL;
+	nmtst_auto_unlinkfile char *keyfile = NULL;
+	gs_unref_object NMConnection *connection = NULL;
+	gs_unref_object NMConnection *reread = NULL;
 	NMSettingConnection *s_con;
 	NMSettingWireless *s_wifi;
 	NMSettingWirelessSecurity *s_wsec;
 	NMSettingIPConfig *s_ip4;
 	NMSettingIPConfig *s_ip6;
-	char *uuid;
 	GError *error = NULL;
-	char *testfile = NULL;
-	char *keyfile = NULL;
 	GBytes *ssid;
 	const char *ssid_data = "blahblah";
 	struct stat statbuf;
@@ -4962,14 +4949,12 @@ test_write_wifi_wep_adhoc (void)
 	s_con = (NMSettingConnection *) nm_setting_connection_new ();
 	nm_connection_add_setting (connection, NM_SETTING (s_con));
 
-	uuid = nm_utils_uuid_generate ();
 	g_object_set (s_con,
 	              NM_SETTING_CONNECTION_ID, "Test Write Wifi WEP AdHoc",
-	              NM_SETTING_CONNECTION_UUID, uuid,
+	              NM_SETTING_CONNECTION_UUID, nm_utils_uuid_generate_a (),
 	              NM_SETTING_CONNECTION_AUTOCONNECT, TRUE,
 	              NM_SETTING_CONNECTION_TYPE, NM_SETTING_WIRELESS_SETTING_NAME,
 	              NULL);
-	g_free (uuid);
 
 	/* Wifi setting */
 	s_wifi = (NMSettingWireless *) nm_setting_wireless_new ();
@@ -5024,35 +5009,27 @@ test_write_wifi_wep_adhoc (void)
 	                        &testfile);
 
 	reread = _connection_from_file (testfile, NULL, TYPE_WIRELESS, NULL);
-	unlink (testfile);
 
 	keyfile = utils_get_keys_path (testfile);
 	g_assert_cmpint (stat (keyfile, &statbuf), ==, 0);
 	g_assert (S_ISREG (statbuf.st_mode));
 	g_assert_cmpint ((statbuf.st_mode & 0077), ==, 0);
-	unlink (keyfile);
 
 	nmtst_assert_connection_equals (connection, TRUE, reread, FALSE);
-
-	g_free (testfile);
-	g_free (keyfile);
-	g_object_unref (connection);
-	g_object_unref (reread);
 }
 
 static void
 test_write_wifi_wep_passphrase (void)
 {
-	NMConnection *connection;
-	NMConnection *reread;
+	nmtst_auto_unlinkfile char *testfile = NULL;
+	nmtst_auto_unlinkfile char *keyfile = NULL;
+	gs_unref_object NMConnection *connection = NULL;
+	gs_unref_object NMConnection *reread = NULL;
 	NMSettingConnection *s_con;
 	NMSettingWireless *s_wifi;
 	NMSettingWirelessSecurity *s_wsec;
 	NMSettingIPConfig *s_ip4;
 	NMSettingIPConfig *s_ip6;
-	char *uuid;
-	char *testfile = NULL;
-	char *keyfile = NULL;
 	GBytes *ssid;
 	const char *ssid_data = "blahblah";
 	struct stat statbuf;
@@ -5063,14 +5040,12 @@ test_write_wifi_wep_passphrase (void)
 	s_con = (NMSettingConnection *) nm_setting_connection_new ();
 	nm_connection_add_setting (connection, NM_SETTING (s_con));
 
-	uuid = nm_utils_uuid_generate ();
 	g_object_set (s_con,
 	              NM_SETTING_CONNECTION_ID, "Test Write Wifi WEP Passphrase",
-	              NM_SETTING_CONNECTION_UUID, uuid,
+	              NM_SETTING_CONNECTION_UUID, nm_utils_uuid_generate_a (),
 	              NM_SETTING_CONNECTION_AUTOCONNECT, TRUE,
 	              NM_SETTING_CONNECTION_TYPE, NM_SETTING_WIRELESS_SETTING_NAME,
 	              NULL);
-	g_free (uuid);
 
 	/* Wifi setting */
 	s_wifi = (NMSettingWireless *) nm_setting_wireless_new ();
@@ -5119,35 +5094,27 @@ test_write_wifi_wep_passphrase (void)
 	                        &testfile);
 
 	reread = _connection_from_file (testfile, NULL, TYPE_WIRELESS, NULL);
-	unlink (testfile);
 
 	keyfile = utils_get_keys_path (testfile);
 	g_assert_cmpint (stat (keyfile, &statbuf), ==, 0);
 	g_assert (S_ISREG (statbuf.st_mode));
 	g_assert_cmpint ((statbuf.st_mode & 0077), ==, 0);
-	unlink (keyfile);
 
 	nmtst_assert_connection_equals (connection, TRUE, reread, FALSE);
-
-	g_free (testfile);
-	g_free (keyfile);
-	g_object_unref (connection);
-	g_object_unref (reread);
 }
 
 static void
 test_write_wifi_wep_40_ascii (void)
 {
-	NMConnection *connection;
-	NMConnection *reread;
+	nmtst_auto_unlinkfile char *testfile = NULL;
+	nmtst_auto_unlinkfile char *keyfile = NULL;
+	gs_unref_object NMConnection *connection = NULL;
+	gs_unref_object NMConnection *reread = NULL;
 	NMSettingConnection *s_con;
 	NMSettingWireless *s_wifi;
 	NMSettingWirelessSecurity *s_wsec;
 	NMSettingIPConfig *s_ip4;
 	NMSettingIPConfig *s_ip6;
-	char *uuid;
-	char *testfile = NULL;
-	char *keyfile = NULL;
 	GBytes *ssid;
 	const char *ssid_data = "blahblah40";
 	struct stat statbuf;
@@ -5158,14 +5125,12 @@ test_write_wifi_wep_40_ascii (void)
 	s_con = (NMSettingConnection *) nm_setting_connection_new ();
 	nm_connection_add_setting (connection, NM_SETTING (s_con));
 
-	uuid = nm_utils_uuid_generate ();
 	g_object_set (s_con,
 	              NM_SETTING_CONNECTION_ID, "Test Write Wifi WEP 40 ASCII",
-	              NM_SETTING_CONNECTION_UUID, uuid,
+	              NM_SETTING_CONNECTION_UUID, nm_utils_uuid_generate_a (),
 	              NM_SETTING_CONNECTION_AUTOCONNECT, TRUE,
 	              NM_SETTING_CONNECTION_TYPE, NM_SETTING_WIRELESS_SETTING_NAME,
 	              NULL);
-	g_free (uuid);
 
 	/* Wifi setting */
 	s_wifi = (NMSettingWireless *) nm_setting_wireless_new ();
@@ -5216,35 +5181,27 @@ test_write_wifi_wep_40_ascii (void)
 	                        &testfile);
 
 	reread = _connection_from_file (testfile, NULL, TYPE_WIRELESS, NULL);
-	unlink (testfile);
 
 	keyfile = utils_get_keys_path (testfile);
 	g_assert_cmpint (stat (keyfile, &statbuf), ==, 0);
 	g_assert (S_ISREG (statbuf.st_mode));
 	g_assert_cmpint ((statbuf.st_mode & 0077), ==, 0);
-	unlink (keyfile);
 
 	nmtst_assert_connection_equals (connection, TRUE, reread, FALSE);
-
-	g_free (testfile);
-	g_free (keyfile);
-	g_object_unref (connection);
-	g_object_unref (reread);
 }
 
 static void
 test_write_wifi_wep_104_ascii (void)
 {
-	NMConnection *connection;
-	NMConnection *reread;
+	nmtst_auto_unlinkfile char *testfile = NULL;
+	nmtst_auto_unlinkfile char *keyfile = NULL;
+	gs_unref_object NMConnection *connection = NULL;
+	gs_unref_object NMConnection *reread = NULL;
 	NMSettingConnection *s_con;
 	NMSettingWireless *s_wifi;
 	NMSettingWirelessSecurity *s_wsec;
 	NMSettingIPConfig *s_ip4;
 	NMSettingIPConfig *s_ip6;
-	char *uuid;
-	char *testfile = NULL;
-	char *keyfile = NULL;
 	GBytes *ssid;
 	const char *ssid_data = "blahblah104";
 	struct stat statbuf;
@@ -5255,14 +5212,12 @@ test_write_wifi_wep_104_ascii (void)
 	s_con = (NMSettingConnection *) nm_setting_connection_new ();
 	nm_connection_add_setting (connection, NM_SETTING (s_con));
 
-	uuid = nm_utils_uuid_generate ();
 	g_object_set (s_con,
 	              NM_SETTING_CONNECTION_ID, "Test Write Wifi WEP 104 ASCII",
-	              NM_SETTING_CONNECTION_UUID, uuid,
+	              NM_SETTING_CONNECTION_UUID, nm_utils_uuid_generate_a (),
 	              NM_SETTING_CONNECTION_AUTOCONNECT, TRUE,
 	              NM_SETTING_CONNECTION_TYPE, NM_SETTING_WIRELESS_SETTING_NAME,
 	              NULL);
-	g_free (uuid);
 
 	/* Wifi setting */
 	s_wifi = (NMSettingWireless *) nm_setting_wireless_new ();
@@ -5313,36 +5268,27 @@ test_write_wifi_wep_104_ascii (void)
 	                        &testfile);
 
 	reread = _connection_from_file (testfile, NULL, TYPE_WIRELESS, NULL);
-	unlink (testfile);
 
 	keyfile = utils_get_keys_path (testfile);
 	g_assert_cmpint (stat (keyfile, &statbuf), ==, 0);
 	g_assert (S_ISREG (statbuf.st_mode));
 	g_assert_cmpint ((statbuf.st_mode & 0077), ==, 0);
-	unlink (keyfile);
-
 
 	nmtst_assert_connection_equals (connection, TRUE, reread, FALSE);
-
-	g_free (testfile);
-	g_free (keyfile);
-	g_object_unref (connection);
-	g_object_unref (reread);
 }
 
 static void
 test_write_wifi_leap (void)
 {
-	NMConnection *connection;
-	NMConnection *reread;
+	nmtst_auto_unlinkfile char *testfile = NULL;
+	nmtst_auto_unlinkfile char *keyfile = NULL;
+	gs_unref_object NMConnection *connection = NULL;
+	gs_unref_object NMConnection *reread = NULL;
 	NMSettingConnection *s_con;
 	NMSettingWireless *s_wifi;
 	NMSettingWirelessSecurity *s_wsec;
 	NMSettingIPConfig *s_ip4;
 	NMSettingIPConfig *s_ip6;
-	char *uuid;
-	char *testfile = NULL;
-	char *keyfile = NULL;
 	GBytes *ssid;
 	const char *ssid_data = "blahblah";
 	struct stat statbuf;
@@ -5353,14 +5299,12 @@ test_write_wifi_leap (void)
 	s_con = (NMSettingConnection *) nm_setting_connection_new ();
 	nm_connection_add_setting (connection, NM_SETTING (s_con));
 
-	uuid = nm_utils_uuid_generate ();
 	g_object_set (s_con,
 	              NM_SETTING_CONNECTION_ID, "Test Write Wifi LEAP",
-	              NM_SETTING_CONNECTION_UUID, uuid,
+	              NM_SETTING_CONNECTION_UUID, nm_utils_uuid_generate_a (),
 	              NM_SETTING_CONNECTION_AUTOCONNECT, TRUE,
 	              NM_SETTING_CONNECTION_TYPE, NM_SETTING_WIRELESS_SETTING_NAME,
 	              NULL);
-	g_free (uuid);
 
 	/* Wifi setting */
 	s_wifi = (NMSettingWireless *) nm_setting_wireless_new ();
@@ -5408,35 +5352,27 @@ test_write_wifi_leap (void)
 	                        &testfile);
 
 	reread = _connection_from_file (testfile, NULL, TYPE_WIRELESS, NULL);
-	unlink (testfile);
 
 	keyfile = utils_get_keys_path (testfile);
 	g_assert_cmpint (stat (keyfile, &statbuf), ==, 0);
 	g_assert (S_ISREG (statbuf.st_mode));
 	g_assert_cmpint ((statbuf.st_mode & 0077), ==, 0);
-	unlink (keyfile);
 
 	nmtst_assert_connection_equals (connection, TRUE, reread, FALSE);
-
-	g_free (testfile);
-	g_free (keyfile);
-	g_object_unref (connection);
-	g_object_unref (reread);
 }
 
 static void
 test_write_wifi_leap_secret_flags (gconstpointer data)
 {
-	NMConnection *connection;
-	NMConnection *reread;
+	nmtst_auto_unlinkfile char *testfile = NULL;
+	gs_free char *keyfile = NULL;
+	gs_unref_object NMConnection *connection = NULL;
+	gs_unref_object NMConnection *reread = NULL;
 	NMSettingConnection *s_con;
 	NMSettingWireless *s_wifi;
 	NMSettingWirelessSecurity *s_wsec;
 	NMSettingIPConfig *s_ip4;
 	NMSettingIPConfig *s_ip6;
-	char *uuid;
-	char *testfile = NULL;
-	char *keyfile = NULL;
 	GBytes *ssid;
 	const char *ssid_data = "blahblah";
 	NMSettingSecretFlags flags = GPOINTER_TO_UINT (data);
@@ -5446,20 +5382,16 @@ test_write_wifi_leap_secret_flags (gconstpointer data)
 
 	/* Connection setting */
 	s_con = (NMSettingConnection *) nm_setting_connection_new ();
-	g_assert (s_con);
 	nm_connection_add_setting (connection, NM_SETTING (s_con));
 
-	uuid = nm_utils_uuid_generate ();
 	g_object_set (s_con,
 	              NM_SETTING_CONNECTION_ID, "Test Write Wifi LEAP Secret Flags",
-	              NM_SETTING_CONNECTION_UUID, uuid,
+	              NM_SETTING_CONNECTION_UUID, nm_utils_uuid_generate_a (),
 	              NM_SETTING_CONNECTION_TYPE, NM_SETTING_WIRELESS_SETTING_NAME,
 	              NULL);
-	g_free (uuid);
 
 	/* Wifi setting */
 	s_wifi = (NMSettingWireless *) nm_setting_wireless_new ();
-	g_assert (s_wifi);
 	nm_connection_add_setting (connection, NM_SETTING (s_wifi));
 
 	ssid = g_bytes_new (ssid_data, strlen (ssid_data));
@@ -5471,7 +5403,6 @@ test_write_wifi_leap_secret_flags (gconstpointer data)
 
 	/* Wireless security setting */
 	s_wsec = (NMSettingWirelessSecurity *) nm_setting_wireless_security_new ();
-	g_assert (s_wsec);
 	nm_connection_add_setting (connection, NM_SETTING (s_wsec));
 
 	g_object_set (s_wsec,
@@ -5484,13 +5415,11 @@ test_write_wifi_leap_secret_flags (gconstpointer data)
 
 	/* IP4 setting */
 	s_ip4 = (NMSettingIPConfig *) nm_setting_ip4_config_new ();
-	g_assert (s_ip4);
 	nm_connection_add_setting (connection, NM_SETTING (s_ip4));
 	g_object_set (s_ip4, NM_SETTING_IP_CONFIG_METHOD, NM_SETTING_IP4_CONFIG_METHOD_AUTO, NULL);
 
 	/* IP6 setting */
 	s_ip6 = (NMSettingIPConfig *) nm_setting_ip6_config_new ();
-	g_assert (s_ip6);
 	nm_connection_add_setting (connection, NM_SETTING (s_ip6));
 
 	g_object_set (s_ip6,
@@ -5505,7 +5434,6 @@ test_write_wifi_leap_secret_flags (gconstpointer data)
 	                        &testfile);
 
 	reread = _connection_from_file (testfile, NULL, TYPE_WIRELESS, NULL);
-	unlink (testfile);
 
 	/* No key should be written out since the secret is not system owned */
 	keyfile = utils_get_keys_path (testfile);
@@ -5516,26 +5444,20 @@ test_write_wifi_leap_secret_flags (gconstpointer data)
 	 */
 	g_object_set (s_wsec, NM_SETTING_WIRELESS_SECURITY_LEAP_PASSWORD, NULL, NULL);
 	nmtst_assert_connection_equals (connection, TRUE, reread, FALSE);
-
-	g_free (testfile);
-	g_free (keyfile);
-	g_object_unref (connection);
-	g_object_unref (reread);
 }
 
 static void
 test_write_wifi_wpa_psk (gconstpointer test_data)
 {
-	NMConnection *connection;
-	NMConnection *reread;
+	nmtst_auto_unlinkfile char *testfile = NULL;
+	nmtst_auto_unlinkfile char *keyfile = NULL;
+	gs_unref_object NMConnection *connection = NULL;
+	gs_unref_object NMConnection *reread = NULL;
 	NMSettingConnection *s_con;
 	NMSettingWireless *s_wifi;
 	NMSettingWirelessSecurity *s_wsec;
 	NMSettingIPConfig *s_ip4;
 	NMSettingIPConfig *s_ip6;
-	char *uuid;
-	char *testfile = NULL;
-	char *keyfile = NULL;
 	GBytes *ssid;
 	const char *ssid_data = "blahblah";
 	struct {
@@ -5553,14 +5475,12 @@ test_write_wifi_wpa_psk (gconstpointer test_data)
 	s_con = (NMSettingConnection *) nm_setting_connection_new ();
 	nm_connection_add_setting (connection, NM_SETTING (s_con));
 
-	uuid = nm_utils_uuid_generate ();
 	g_object_set (s_con,
 	              NM_SETTING_CONNECTION_ID, args.name,
-	              NM_SETTING_CONNECTION_UUID, uuid,
+	              NM_SETTING_CONNECTION_UUID, nm_utils_uuid_generate_a (),
 	              NM_SETTING_CONNECTION_AUTOCONNECT, TRUE,
 	              NM_SETTING_CONNECTION_TYPE, NM_SETTING_WIRELESS_SETTING_NAME,
 	              NULL);
-	g_free (uuid);
 
 	/* Wifi setting */
 	s_wifi = (NMSettingWireless *) nm_setting_wireless_new ();
@@ -5621,33 +5541,25 @@ test_write_wifi_wpa_psk (gconstpointer test_data)
 	                        &testfile);
 
 	reread = _connection_from_file (testfile, NULL, TYPE_WIRELESS, NULL);
-	unlink (testfile);
 
 	keyfile = utils_get_keys_path (testfile);
-	unlink (keyfile);
 
 	nmtst_assert_connection_equals (connection, TRUE, reread, FALSE);
-
-	g_free (testfile);
-	g_free (keyfile);
-	g_object_unref (connection);
-	g_object_unref (reread);
 }
 
 static void
 test_write_wifi_wpa_psk_adhoc (void)
 {
-	NMConnection *connection;
-	NMConnection *reread;
+	nmtst_auto_unlinkfile char *testfile = NULL;
+	nmtst_auto_unlinkfile char *keyfile = NULL;
+	gs_unref_object NMConnection *connection = NULL;
+	gs_unref_object NMConnection *reread = NULL;
 	NMSettingConnection *s_con;
 	NMSettingWireless *s_wifi;
 	NMSettingWirelessSecurity *s_wsec;
 	NMSettingIPConfig *s_ip4;
 	NMSettingIPConfig *s_ip6;
-	char *uuid;
 	GError *error = NULL;
-	char *testfile = NULL;
-	char *keyfile = NULL;
 	GBytes *ssid;
 	const char *ssid_data = "blahblah";
 	NMIPAddress *addr;
@@ -5658,14 +5570,12 @@ test_write_wifi_wpa_psk_adhoc (void)
 	s_con = (NMSettingConnection *) nm_setting_connection_new ();
 	nm_connection_add_setting (connection, NM_SETTING (s_con));
 
-	uuid = nm_utils_uuid_generate ();
 	g_object_set (s_con,
 	              NM_SETTING_CONNECTION_ID, "Test Write Wifi WPA PSK",
-	              NM_SETTING_CONNECTION_UUID, uuid,
+	              NM_SETTING_CONNECTION_UUID, nm_utils_uuid_generate_a (),
 	              NM_SETTING_CONNECTION_AUTOCONNECT, TRUE,
 	              NM_SETTING_CONNECTION_TYPE, NM_SETTING_WIRELESS_SETTING_NAME,
 	              NULL);
-	g_free (uuid);
 
 	/* Wifi setting */
 	s_wifi = (NMSettingWireless *) nm_setting_wireless_new ();
@@ -5727,35 +5637,27 @@ test_write_wifi_wpa_psk_adhoc (void)
 	                        &testfile);
 
 	reread = _connection_from_file (testfile, NULL, TYPE_WIRELESS, NULL);
-	unlink (testfile);
 
 	keyfile = utils_get_keys_path (testfile);
-	unlink (keyfile);
 
 	nmtst_assert_connection_equals (connection, TRUE, reread, FALSE);
-
-	g_free (testfile);
-	g_free (keyfile);
-	g_object_unref (connection);
-	g_object_unref (reread);
 }
 
 static void
 test_write_wifi_wpa_eap_tls (void)
 {
-	NMConnection *connection;
-	NMConnection *reread;
+	nmtst_auto_unlinkfile char *testfile = NULL;
+	nmtst_auto_unlinkfile char *keyfile = NULL;
+	gs_unref_object NMConnection *connection = NULL;
+	gs_unref_object NMConnection *reread = NULL;
 	NMSettingConnection *s_con;
 	NMSettingWireless *s_wifi;
 	NMSettingWirelessSecurity *s_wsec;
 	NMSetting8021x *s_8021x;
 	NMSettingIPConfig *s_ip4;
 	NMSettingIPConfig *s_ip6;
-	char *uuid;
 	gboolean success;
 	GError *error = NULL;
-	char *testfile = NULL;
-	char *keyfile = NULL;
 	GBytes *ssid;
 	const char *ssid_data = "blahblah";
 
@@ -5765,14 +5667,12 @@ test_write_wifi_wpa_eap_tls (void)
 	s_con = (NMSettingConnection *) nm_setting_connection_new ();
 	nm_connection_add_setting (connection, NM_SETTING (s_con));
 
-	uuid = nm_utils_uuid_generate ();
 	g_object_set (s_con,
 	              NM_SETTING_CONNECTION_ID, "Test Write Wifi WPA EAP-TLS",
-	              NM_SETTING_CONNECTION_UUID, uuid,
+	              NM_SETTING_CONNECTION_UUID, nm_utils_uuid_generate_a (),
 	              NM_SETTING_CONNECTION_AUTOCONNECT, TRUE,
 	              NM_SETTING_CONNECTION_TYPE, NM_SETTING_WIRELESS_SETTING_NAME,
 	              NULL);
-	g_free (uuid);
 
 	/* Wifi setting */
 	s_wifi = (NMSettingWireless *) nm_setting_wireless_new ();
@@ -5848,35 +5748,27 @@ test_write_wifi_wpa_eap_tls (void)
 	                        &testfile);
 
 	reread = _connection_from_file (testfile, NULL, TYPE_WIRELESS, NULL);
-	unlink (testfile);
 
 	keyfile = utils_get_keys_path (testfile);
-	unlink (keyfile);
 
 	nmtst_assert_connection_equals (connection, TRUE, reread, FALSE);
-
-	g_free (testfile);
-	g_free (keyfile);
-	g_object_unref (connection);
-	g_object_unref (reread);
 }
 
 static void
 test_write_wifi_wpa_eap_ttls_tls (void)
 {
-	NMConnection *connection;
-	NMConnection *reread;
+	nmtst_auto_unlinkfile char *testfile = NULL;
+	nmtst_auto_unlinkfile char *keyfile = NULL;
+	gs_unref_object NMConnection *connection = NULL;
+	gs_unref_object NMConnection *reread = NULL;
 	NMSettingConnection *s_con;
 	NMSettingWireless *s_wifi;
 	NMSettingWirelessSecurity *s_wsec;
 	NMSetting8021x *s_8021x;
 	NMSettingIPConfig *s_ip4;
 	NMSettingIPConfig *s_ip6;
-	char *uuid;
 	gboolean success;
 	GError *error = NULL;
-	char *testfile = NULL;
-	char *keyfile = NULL;
 	GBytes *ssid;
 	const char *ssid_data = "blahblah";
 
@@ -5886,14 +5778,12 @@ test_write_wifi_wpa_eap_ttls_tls (void)
 	s_con = (NMSettingConnection *) nm_setting_connection_new ();
 	nm_connection_add_setting (connection, NM_SETTING (s_con));
 
-	uuid = nm_utils_uuid_generate ();
 	g_object_set (s_con,
 	              NM_SETTING_CONNECTION_ID, "Test Write Wifi WPA EAP-TTLS (TLS)",
-	              NM_SETTING_CONNECTION_UUID, uuid,
+	              NM_SETTING_CONNECTION_UUID, nm_utils_uuid_generate_a (),
 	              NM_SETTING_CONNECTION_AUTOCONNECT, TRUE,
 	              NM_SETTING_CONNECTION_TYPE, NM_SETTING_WIRELESS_SETTING_NAME,
 	              NULL);
-	g_free (uuid);
 
 	/* Wifi setting */
 	s_wifi = (NMSettingWireless *) nm_setting_wireless_new ();
@@ -5985,35 +5875,27 @@ test_write_wifi_wpa_eap_ttls_tls (void)
 	                        &testfile);
 
 	reread = _connection_from_file (testfile, NULL, TYPE_WIRELESS, NULL);
-	unlink (testfile);
 
 	keyfile = utils_get_keys_path (testfile);
-	unlink (keyfile);
 
 	nmtst_assert_connection_equals (connection, TRUE, reread, FALSE);
-
-	g_free (testfile);
-	g_free (keyfile);
-	g_object_unref (connection);
-	g_object_unref (reread);
 }
 
 static void
 test_write_wifi_wpa_eap_ttls_mschapv2 (void)
 {
-	NMConnection *connection;
-	NMConnection *reread;
+	nmtst_auto_unlinkfile char *testfile = NULL;
+	nmtst_auto_unlinkfile char *keyfile = NULL;
+	gs_unref_object NMConnection *connection = NULL;
+	gs_unref_object NMConnection *reread = NULL;
 	NMSettingConnection *s_con;
 	NMSettingWireless *s_wifi;
 	NMSettingWirelessSecurity *s_wsec;
 	NMSetting8021x *s_8021x;
 	NMSettingIPConfig *s_ip4;
 	NMSettingIPConfig *s_ip6;
-	char *uuid;
 	gboolean success;
 	GError *error = NULL;
-	char *testfile = NULL;
-	char *keyfile = NULL;
 	GBytes *ssid;
 	const char *ssid_data = "blahblah";
 
@@ -6023,14 +5905,12 @@ test_write_wifi_wpa_eap_ttls_mschapv2 (void)
 	s_con = (NMSettingConnection *) nm_setting_connection_new ();
 	nm_connection_add_setting (connection, NM_SETTING (s_con));
 
-	uuid = nm_utils_uuid_generate ();
 	g_object_set (s_con,
 	              NM_SETTING_CONNECTION_ID, "Test Write Wifi WPA EAP-TTLS (MSCHAPv2)",
-	              NM_SETTING_CONNECTION_UUID, uuid,
+	              NM_SETTING_CONNECTION_UUID, nm_utils_uuid_generate_a (),
 	              NM_SETTING_CONNECTION_AUTOCONNECT, TRUE,
 	              NM_SETTING_CONNECTION_TYPE, NM_SETTING_WIRELESS_SETTING_NAME,
 	              NULL);
-	g_free (uuid);
 
 	/* Wifi setting */
 	s_wifi = (NMSettingWireless *) nm_setting_wireless_new ();
@@ -6099,34 +5979,24 @@ test_write_wifi_wpa_eap_ttls_mschapv2 (void)
 	                        &testfile);
 
 	reread = _connection_from_file (testfile, NULL, TYPE_WIRELESS, NULL);
-	unlink (testfile);
-
-	keyfile = utils_get_keys_path (testfile);
-	unlink (keyfile);
 
 	nmtst_assert_connection_equals (connection, TRUE, reread, FALSE);
 
-	g_free (testfile);
-	g_free (keyfile);
-	g_object_unref (connection);
-	g_object_unref (reread);
+	keyfile = utils_get_keys_path (testfile);
 }
 
 static void
 test_write_wifi_wpa_then_open (void)
 {
-	NMConnection *connection;
-	NMConnection *reread;
+	nmtst_auto_unlinkfile char *testfile = NULL;
+	gs_free char *keyfile = NULL;
+	gs_unref_object NMConnection *connection = NULL;
+	gs_unref_object NMConnection *reread = NULL;
 	NMSettingConnection *s_con;
 	NMSettingWireless *s_wifi;
 	NMSettingWirelessSecurity *s_wsec;
 	NMSettingIPConfig *s_ip4;
 	NMSettingIPConfig *s_ip6;
-	char *uuid;
-	gboolean success;
-	GError *error = NULL;
-	char *testfile = NULL;
-	char *keyfile = NULL;
 	GBytes *ssid;
 	const char *ssid_data = "blahblah";
 
@@ -6135,25 +6005,20 @@ test_write_wifi_wpa_then_open (void)
 	 */
 
 	connection = nm_simple_connection_new ();
-	g_assert (connection);
 
 	/* Connection setting */
 	s_con = (NMSettingConnection *) nm_setting_connection_new ();
-	g_assert (s_con);
 	nm_connection_add_setting (connection, NM_SETTING (s_con));
 
-	uuid = nm_utils_uuid_generate ();
 	g_object_set (s_con,
 	              NM_SETTING_CONNECTION_ID, "random wifi connection",
-	              NM_SETTING_CONNECTION_UUID, uuid,
+	              NM_SETTING_CONNECTION_UUID, nm_utils_uuid_generate_a (),
 	              NM_SETTING_CONNECTION_AUTOCONNECT, TRUE,
 	              NM_SETTING_CONNECTION_TYPE, NM_SETTING_WIRELESS_SETTING_NAME,
 	              NULL);
-	g_free (uuid);
 
 	/* Wifi setting */
 	s_wifi = (NMSettingWireless *) nm_setting_wireless_new ();
-	g_assert (s_wifi);
 	nm_connection_add_setting (connection, NM_SETTING (s_wifi));
 
 	ssid = g_bytes_new (ssid_data, strlen (ssid_data));
@@ -6167,7 +6032,6 @@ test_write_wifi_wpa_then_open (void)
 
 	/* Wireless security setting */
 	s_wsec = (NMSettingWirelessSecurity *) nm_setting_wireless_security_new ();
-	g_assert (s_wsec);
 	nm_connection_add_setting (connection, NM_SETTING (s_wsec));
 
 	g_object_set (s_wsec,
@@ -6185,16 +6049,12 @@ test_write_wifi_wpa_then_open (void)
 
 	/* IP4 setting */
 	s_ip4 = (NMSettingIPConfig *) nm_setting_ip4_config_new ();
-	g_assert (s_ip4);
 	nm_connection_add_setting (connection, NM_SETTING (s_ip4));
-
 	g_object_set (s_ip4, NM_SETTING_IP_CONFIG_METHOD, NM_SETTING_IP4_CONFIG_METHOD_AUTO, NULL);
 
 	/* IP6 setting */
 	s_ip6 = (NMSettingIPConfig *) nm_setting_ip6_config_new ();
-	g_assert (s_ip6);
 	nm_connection_add_setting (connection, NM_SETTING (s_ip6));
-
 	g_object_set (s_ip6,
 	              NM_SETTING_IP_CONFIG_METHOD, NM_SETTING_IP6_CONFIG_METHOD_IGNORE,
 	              NM_SETTING_IP_CONFIG_MAY_FAIL, TRUE,
@@ -6218,51 +6078,30 @@ test_write_wifi_wpa_then_open (void)
 	nm_connection_remove_setting (connection, NM_TYPE_SETTING_WIRELESS_SECURITY);
 
 	/* Write it back out */
+	_writer_update_connection (connection,
+	                           TEST_SCRATCH_DIR "/network-scripts/",
+	                           testfile);
 	keyfile = utils_get_keys_path (testfile);
-	success = writer_update_connection (connection,
-	                                    TEST_SCRATCH_DIR "/network-scripts/",
-	                                    testfile,
-	                                    keyfile,
-	                                    &error);
-	g_assert_no_error (error);
-	g_assert (success);
-
-	unlink (keyfile);
-	g_free (keyfile);
-	keyfile = NULL;
+	g_assert (!g_file_test (keyfile, G_FILE_TEST_EXISTS));
 
 	reread = _connection_from_file (testfile, NULL, TYPE_WIRELESS, NULL);
-	unlink (testfile);
-
-	/* No keyfile since it's an open connection this time */
-	keyfile = utils_get_keys_path (testfile);
-	g_assert (g_file_test (keyfile, G_FILE_TEST_EXISTS) == FALSE);
 
 	nmtst_assert_connection_equals (connection, TRUE, reread, FALSE);
-
-	unlink (testfile);
-	g_free (testfile);
-	g_free (keyfile);
-	g_object_unref (reread);
-
-	g_object_unref (connection);
 }
 
 static void
 test_write_wifi_wpa_then_wep_with_perms (void)
 {
-	NMConnection *connection;
-	NMConnection *reread;
+	nmtst_auto_unlinkfile char *testfile = NULL;
+	nmtst_auto_unlinkfile char *keyfile = NULL;
+	gs_unref_object NMConnection *connection = NULL;
+	gs_unref_object NMConnection *reread = NULL;
 	NMSettingConnection *s_con;
 	NMSettingWireless *s_wifi;
 	NMSettingWirelessSecurity *s_wsec;
 	NMSettingIPConfig *s_ip4;
 	NMSettingIPConfig *s_ip6;
-	char *uuid;
 	gboolean success;
-	GError *error = NULL;
-	char *testfile = NULL;
-	char *keyfile = NULL;
 	GBytes *ssid;
 	char **perms;
 	const char *ssid_data = "SomeSSID";
@@ -6276,25 +6115,21 @@ test_write_wifi_wpa_then_wep_with_perms (void)
 
 	/* Connection setting */
 	s_con = (NMSettingConnection *) nm_setting_connection_new ();
-	g_assert (s_con);
 	nm_connection_add_setting (connection, NM_SETTING (s_con));
 
-	uuid = nm_utils_uuid_generate ();
 	perms = g_strsplit ("user:superman:", ",", -1);
 	g_object_set (s_con,
 	              NM_SETTING_CONNECTION_ID, "random wifi connection 2",
-	              NM_SETTING_CONNECTION_UUID, uuid,
+	              NM_SETTING_CONNECTION_UUID, nm_utils_uuid_generate_a (),
 	              NM_SETTING_CONNECTION_AUTOCONNECT, TRUE,
 	              NM_SETTING_CONNECTION_PERMISSIONS, perms,
 	              NM_SETTING_CONNECTION_TYPE, NM_SETTING_WIRELESS_SETTING_NAME,
 	              NULL);
-	g_free (uuid);
 	g_strfreev (perms);
 	g_assert_cmpint (nm_setting_connection_get_num_permissions (s_con), ==, 1);
 
 	/* Wifi setting */
 	s_wifi = (NMSettingWireless *) nm_setting_wireless_new ();
-	g_assert (s_wifi);
 	nm_connection_add_setting (connection, NM_SETTING (s_wifi));
 
 	ssid = g_bytes_new (ssid_data, strlen (ssid_data));
@@ -6308,7 +6143,6 @@ test_write_wifi_wpa_then_wep_with_perms (void)
 
 	/* Wireless security setting */
 	s_wsec = (NMSettingWirelessSecurity *) nm_setting_wireless_security_new ();
-	g_assert (s_wsec);
 	nm_connection_add_setting (connection, NM_SETTING (s_wsec));
 
 	g_object_set (s_wsec,
@@ -6326,14 +6160,12 @@ test_write_wifi_wpa_then_wep_with_perms (void)
 
 	/* IP4 setting */
 	s_ip4 = (NMSettingIPConfig *) nm_setting_ip4_config_new ();
-	g_assert (s_ip4);
 	nm_connection_add_setting (connection, NM_SETTING (s_ip4));
 
 	g_object_set (s_ip4, NM_SETTING_IP_CONFIG_METHOD, NM_SETTING_IP4_CONFIG_METHOD_AUTO, NULL);
 
 	/* IP6 setting */
 	s_ip6 = (NMSettingIPConfig *) nm_setting_ip6_config_new ();
-	g_assert (s_ip6);
 	nm_connection_add_setting (connection, NM_SETTING (s_ip6));
 
 	g_object_set (s_ip6,
@@ -6357,7 +6189,6 @@ test_write_wifi_wpa_then_wep_with_perms (void)
 
 	/* Now change the connection to WEP and recheck */
 	s_wsec = (NMSettingWirelessSecurity *) nm_setting_wireless_security_new ();
-	g_assert (s_wsec);
 	nm_connection_add_setting (connection, NM_SETTING (s_wsec));
 
 	g_object_set (s_wsec,
@@ -6366,17 +6197,9 @@ test_write_wifi_wpa_then_wep_with_perms (void)
 	nm_setting_wireless_security_set_wep_key (s_wsec, 0, "abraka  dabra");
 
 	/* Write it back out */
-	keyfile = utils_get_keys_path (testfile);
-	success = writer_update_connection (connection,
-	                                    TEST_SCRATCH_DIR "/network-scripts/",
-	                                    testfile,
-	                                    keyfile,
-	                                    &error);
-	g_assert_no_error (error);
-	g_assert (success);
-
-	g_free (keyfile);
-	keyfile = NULL;
+	_writer_update_connection (connection,
+	                           TEST_SCRATCH_DIR "/network-scripts/",
+	                           testfile);
 
 	reread = _connection_from_file (testfile, NULL, TYPE_WIRELESS, NULL);
 
@@ -6387,55 +6210,38 @@ test_write_wifi_wpa_then_wep_with_perms (void)
 	g_assert (success);
 
 	keyfile = utils_get_keys_path (testfile);
-	unlink (keyfile);
-	unlink (testfile);
-	g_free (keyfile);
-
-	g_free (testfile);
-	g_object_unref (reread);
-
-	g_object_unref (connection);
 }
 
 static void
 test_write_wifi_dynamic_wep_leap (void)
 {
-	NMConnection *connection;
-	NMConnection *reread;
+	nmtst_auto_unlinkfile char *testfile = NULL;
+	nmtst_auto_unlinkfile char *keyfile = NULL;
+	gs_unref_object NMConnection *connection = NULL;
+	gs_unref_object NMConnection *reread = NULL;
 	NMSettingConnection *s_con;
 	NMSettingWireless *s_wifi;
 	NMSettingWirelessSecurity *s_wsec;
 	NMSetting8021x *s_8021x;
 	NMSettingIPConfig *s_ip4;
 	NMSettingIPConfig *s_ip6;
-	char *uuid;
-	GError *error = NULL;
-	char *testfile = NULL;
-	char *keyfile = NULL;
 	GBytes *ssid;
 	const char *ssid_data = "blahblah";
 	shvarFile *ifcfg;
-	char *tmp;
 
 	connection = nm_simple_connection_new ();
-	g_assert (connection);
 
 	/* Connection setting */
 	s_con = (NMSettingConnection *) nm_setting_connection_new ();
-	g_assert (s_con);
 	nm_connection_add_setting (connection, NM_SETTING (s_con));
-
-	uuid = nm_utils_uuid_generate ();
 	g_object_set (s_con,
 	              NM_SETTING_CONNECTION_ID, "Test Write Wifi Dynamic WEP LEAP",
-	              NM_SETTING_CONNECTION_UUID, uuid,
+	              NM_SETTING_CONNECTION_UUID, nm_utils_uuid_generate_a (),
 	              NM_SETTING_CONNECTION_TYPE, NM_SETTING_WIRELESS_SETTING_NAME,
 	              NULL);
-	g_free (uuid);
 
 	/* Wifi setting */
 	s_wifi = (NMSettingWireless *) nm_setting_wireless_new ();
-	g_assert (s_wifi);
 	nm_connection_add_setting (connection, NM_SETTING (s_wifi));
 
 	ssid = g_bytes_new (ssid_data, strlen (ssid_data));
@@ -6449,14 +6255,12 @@ test_write_wifi_dynamic_wep_leap (void)
 
 	/* Wireless security setting */
 	s_wsec = (NMSettingWirelessSecurity *) nm_setting_wireless_security_new ();
-	g_assert (s_wsec);
 	nm_connection_add_setting (connection, NM_SETTING (s_wsec));
 
 	g_object_set (s_wsec, NM_SETTING_WIRELESS_SECURITY_KEY_MGMT, "ieee8021x", NULL);
 
 	/* Wireless security setting */
 	s_8021x = (NMSetting8021x *) nm_setting_802_1x_new ();
-	g_assert (s_8021x);
 	nm_connection_add_setting (connection, NM_SETTING (s_8021x));
 
 	nm_setting_802_1x_add_eap_method (s_8021x, "leap");
@@ -6468,13 +6272,11 @@ test_write_wifi_dynamic_wep_leap (void)
 
 	/* IP4 setting */
 	s_ip4 = (NMSettingIPConfig *) nm_setting_ip4_config_new ();
-	g_assert (s_ip4);
 	g_object_set (s_ip4, NM_SETTING_IP_CONFIG_METHOD, NM_SETTING_IP4_CONFIG_METHOD_AUTO, NULL);
 	nm_connection_add_setting (connection, NM_SETTING (s_ip4));
 
 	/* IP6 setting */
 	s_ip6 = (NMSettingIPConfig *) nm_setting_ip6_config_new ();
-	g_assert (s_ip6);
 	nm_connection_add_setting (connection, NM_SETTING (s_ip6));
 
 	g_object_set (s_ip6,
@@ -6491,7 +6293,6 @@ test_write_wifi_dynamic_wep_leap (void)
 	reread = _connection_from_file (testfile, NULL, TYPE_WIRELESS, NULL);
 
 	keyfile = utils_get_keys_path (testfile);
-	unlink (keyfile);
 
 	nmtst_assert_connection_equals (connection, TRUE, reread, FALSE);
 
@@ -6499,38 +6300,23 @@ test_write_wifi_dynamic_wep_leap (void)
 	 * did not get written.  Check first that the auth alg is not set to "LEAP"
 	 * and next that the only IEEE 802.1x EAP method is "LEAP".
 	 */
-	ifcfg = svOpenFile (testfile, &error);
-	g_assert_no_error (error);
-	g_assert (ifcfg);
-	tmp = svGetValue (ifcfg, "SECURITYMODE", FALSE);
-	g_assert_cmpstr (tmp, ==, NULL);
-	g_free (tmp);
-
-	tmp = svGetValue (ifcfg, "IEEE_8021X_EAP_METHODS", FALSE);
-	g_assert_cmpstr (tmp, ==, "LEAP");
-	g_free (tmp);
-
+	ifcfg = _svOpenFile (testfile);
+	_svGetValue_check (ifcfg, "SECURITYMODE", NULL);
+	_svGetValue_check (ifcfg, "IEEE_8021X_EAP_METHODS", "LEAP");
 	svCloseFile (ifcfg);
-	unlink (testfile);
-
-	g_free (testfile);
-	g_free (keyfile);
-	g_object_unref (connection);
-	g_object_unref (reread);
 }
 
 static void
 test_write_wired_qeth_dhcp (void)
 {
-	NMConnection *connection;
-	NMConnection *reread;
+	nmtst_auto_unlinkfile char *testfile = NULL;
+	gs_unref_object NMConnection *connection = NULL;
+	gs_unref_object NMConnection *reread = NULL;
 	NMSettingConnection *s_con;
 	NMSettingWired *s_wired;
 	NMSettingIPConfig *s_ip4;
 	NMSettingIPConfig *s_ip6;
-	char *uuid;
 	char **subchans;
-	char *testfile = NULL;
 
 	connection = nm_simple_connection_new ();
 
@@ -6538,14 +6324,12 @@ test_write_wired_qeth_dhcp (void)
 	s_con = (NMSettingConnection *) nm_setting_connection_new ();
 	nm_connection_add_setting (connection, NM_SETTING (s_con));
 
-	uuid = nm_utils_uuid_generate ();
 	g_object_set (s_con,
 	              NM_SETTING_CONNECTION_ID, "Test Write Wired qeth Static",
-	              NM_SETTING_CONNECTION_UUID, uuid,
+	              NM_SETTING_CONNECTION_UUID, nm_utils_uuid_generate_a (),
 	              NM_SETTING_CONNECTION_AUTOCONNECT, TRUE,
 	              NM_SETTING_CONNECTION_TYPE, NM_SETTING_WIRED_SETTING_NAME,
 	              NULL);
-	g_free (uuid);
 
 	/* Wired setting */
 	s_wired = (NMSettingWired *) nm_setting_wired_new ();
@@ -6587,50 +6371,37 @@ test_write_wired_qeth_dhcp (void)
 	                        &testfile);
 
 	reread = _connection_from_file (testfile, NULL, TYPE_ETHERNET, NULL);
-	unlink (testfile);
 
 	nmtst_assert_connection_equals (connection, TRUE, reread, FALSE);
-
-	g_free (testfile);
-	g_object_unref (connection);
-	g_object_unref (reread);
 }
 
 static void
 test_write_wired_ctc_dhcp (void)
 {
-	NMConnection *connection;
-	NMConnection *reread;
+	nmtst_auto_unlinkfile char *testfile = NULL;
+	gs_unref_object NMConnection *connection = NULL;
+	gs_unref_object NMConnection *reread = NULL;
 	NMSettingConnection *s_con;
 	NMSettingWired *s_wired;
 	NMSettingIPConfig *s_ip4;
 	NMSettingIPConfig *s_ip6;
-	char *uuid;
 	char **subchans;
-	GError *error = NULL;
-	char *testfile = NULL;
 	shvarFile *ifcfg;
-	char *tmp;
 
 	connection = nm_simple_connection_new ();
-	g_assert (connection);
 
 	/* Connection setting */
 	s_con = (NMSettingConnection *) nm_setting_connection_new ();
-	g_assert (s_con);
 	nm_connection_add_setting (connection, NM_SETTING (s_con));
 
-	uuid = nm_utils_uuid_generate ();
 	g_object_set (s_con,
 	              NM_SETTING_CONNECTION_ID, "Test Write Wired ctc Static",
-	              NM_SETTING_CONNECTION_UUID, uuid,
+	              NM_SETTING_CONNECTION_UUID, nm_utils_uuid_generate_a (),
 	              NM_SETTING_CONNECTION_TYPE, NM_SETTING_WIRED_SETTING_NAME,
 	              NULL);
-	g_free (uuid);
 
 	/* Wired setting */
 	s_wired = (NMSettingWired *) nm_setting_wired_new ();
-	g_assert (s_wired);
 	nm_connection_add_setting (connection, NM_SETTING (s_wired));
 
 	subchans = g_strsplit ("0.0.600,0.0.601", ",", -1);
@@ -6643,13 +6414,11 @@ test_write_wired_ctc_dhcp (void)
 
 	/* IP4 setting */
 	s_ip4 = (NMSettingIPConfig *) nm_setting_ip4_config_new ();
-	g_assert (s_ip4);
 	nm_connection_add_setting (connection, NM_SETTING (s_ip4));
 	g_object_set (s_ip4, NM_SETTING_IP_CONFIG_METHOD, NM_SETTING_IP4_CONFIG_METHOD_AUTO, NULL);
 
 	/* IP6 setting */
 	s_ip6 = (NMSettingIPConfig *) nm_setting_ip6_config_new ();
-	g_assert (s_ip6);
 	nm_connection_add_setting (connection, NM_SETTING (s_ip6));
 
 	g_object_set (s_ip6,
@@ -6664,43 +6433,30 @@ test_write_wired_ctc_dhcp (void)
 	                        &testfile);
 
 	/* Ensure the CTCPROT item gets written out as it's own option */
-	ifcfg = svOpenFile (testfile, &error);
-	g_assert_no_error (error);
-	g_assert (ifcfg);
+	ifcfg = _svOpenFile (testfile);
 
-	tmp = svGetValue (ifcfg, "CTCPROT", TRUE);
-	g_assert (tmp);
-	g_assert_cmpstr (tmp, ==, "0");
-	g_free (tmp);
+	_svGetValue_check (ifcfg, "CTCPROT", "0");
 
 	/* And that it's not in the generic OPTIONS string */
-	tmp = svGetValue (ifcfg, "OPTIONS", TRUE);
-	g_assert (tmp == NULL);
-	g_free (tmp);
+	_svGetValue_check (ifcfg, "OPTIONS", NULL);
 
 	svCloseFile (ifcfg);
 
 	reread = _connection_from_file (testfile, NULL, TYPE_ETHERNET, NULL);
-	unlink (testfile);
 
 	nmtst_assert_connection_equals (connection, TRUE, reread, FALSE);
-
-	g_free (testfile);
-	g_object_unref (connection);
-	g_object_unref (reread);
 }
 
 static void
 test_write_permissions (void)
 {
-	NMConnection *connection;
-	NMConnection *reread;
+	nmtst_auto_unlinkfile char *testfile = NULL;
+	gs_unref_object NMConnection *connection = NULL;
+	gs_unref_object NMConnection *reread = NULL;
 	NMSettingConnection *s_con;
 	NMSettingWired *s_wired;
 	NMSettingIPConfig *s_ip4;
 	NMSettingIPConfig *s_ip6;
-	char *uuid;
-	char *testfile = NULL;
 
 	connection = nm_simple_connection_new ();
 
@@ -6708,14 +6464,12 @@ test_write_permissions (void)
 	s_con = (NMSettingConnection *) nm_setting_connection_new ();
 	nm_connection_add_setting (connection, NM_SETTING (s_con));
 
-	uuid = nm_utils_uuid_generate ();
 	g_object_set (s_con,
 	              NM_SETTING_CONNECTION_ID, "Test Write Permissions",
-	              NM_SETTING_CONNECTION_UUID, uuid,
+	              NM_SETTING_CONNECTION_UUID, nm_utils_uuid_generate_a (),
 	              NM_SETTING_CONNECTION_AUTOCONNECT, TRUE,
 	              NM_SETTING_CONNECTION_TYPE, NM_SETTING_WIRED_SETTING_NAME,
 	              NULL);
-	g_free (uuid);
 
 	nm_setting_connection_add_permission (s_con, "user", "blahblah", NULL);
 	nm_setting_connection_add_permission (s_con, "user", "foobar", NULL);
@@ -6749,55 +6503,44 @@ test_write_permissions (void)
 	                        &testfile);
 
 	reread = _connection_from_file (testfile, NULL, TYPE_ETHERNET, NULL);
-	unlink (testfile);
 
 	nmtst_assert_connection_equals (connection, TRUE, reread, FALSE);
-
-	g_free (testfile);
-	g_object_unref (connection);
-	g_object_unref (reread);
 }
 
 static void
 test_write_wifi_wep_agent_keys (void)
 {
-	NMConnection *connection;
-	NMConnection *reread;
+	nmtst_auto_unlinkfile char *testfile = NULL;
+	gs_unref_object NMConnection *connection = NULL;
+	gs_unref_object NMConnection *reread = NULL;
 	NMSettingConnection *s_con;
 	NMSettingWireless *s_wifi;
 	NMSettingWirelessSecurity *s_wsec;
 	NMSettingIPConfig *s_ip4;
 	NMSettingIPConfig *s_ip6;
-	char *uuid;
 	const char *str_ssid = "foobarbaz";
 	GBytes *ssid;
-	char *testfile = NULL;
 
 	connection = nm_simple_connection_new ();
 	g_assert (connection != NULL);
 
 	/* Connection setting */
 	s_con = (NMSettingConnection *) nm_setting_connection_new ();
-	g_assert (s_con);
 	nm_connection_add_setting (connection, NM_SETTING (s_con));
 
-	uuid = nm_utils_uuid_generate ();
 	g_object_set (s_con,
 	              NM_SETTING_CONNECTION_ID, "Test Write Wifi WEP Agent Owned",
-	              NM_SETTING_CONNECTION_UUID, uuid,
+	              NM_SETTING_CONNECTION_UUID, nm_utils_uuid_generate_a (),
 	              NM_SETTING_CONNECTION_TYPE, NM_SETTING_WIRELESS_SETTING_NAME,
 	              NULL);
-	g_free (uuid);
 
 	/* IP4 setting */
 	s_ip4 = (NMSettingIPConfig *) nm_setting_ip4_config_new ();
-	g_assert (s_ip4);
 	nm_connection_add_setting (connection, NM_SETTING (s_ip4));
 	g_object_set (s_ip4, NM_SETTING_IP_CONFIG_METHOD, NM_SETTING_IP4_CONFIG_METHOD_AUTO, NULL);
 
 	/* IP6 setting */
 	s_ip6 = (NMSettingIPConfig *) nm_setting_ip6_config_new ();
-	g_assert (s_ip6);
 	nm_connection_add_setting (connection, NM_SETTING (s_ip6));
 
 	g_object_set (s_ip6,
@@ -6807,7 +6550,6 @@ test_write_wifi_wep_agent_keys (void)
 
 	/* Wifi setting */
 	s_wifi = (NMSettingWireless *) nm_setting_wireless_new ();
-	g_assert (s_wifi);
 	nm_connection_add_setting (connection, NM_SETTING (s_wifi));
 
 	ssid = g_bytes_new (str_ssid, strlen (str_ssid));
@@ -6819,7 +6561,6 @@ test_write_wifi_wep_agent_keys (void)
 
 	/* Wifi security setting */
 	s_wsec = (NMSettingWirelessSecurity *) nm_setting_wireless_security_new ();
-	g_assert (s_wsec);
 	nm_connection_add_setting (connection, NM_SETTING (s_wsec));
 
 	g_object_set (s_wsec,
@@ -6836,7 +6577,6 @@ test_write_wifi_wep_agent_keys (void)
 	                        &testfile);
 
 	reread = _connection_from_file (testfile, NULL, TYPE_WIRELESS, NULL);
-	unlink (testfile);
 
 	/* Remove the WEP key from the original, because it should not have been
 	 * written out to disk as it was agent-owned.  The new connection should
@@ -6849,10 +6589,6 @@ test_write_wifi_wep_agent_keys (void)
 	              NULL);
 
 	nmtst_assert_connection_equals (connection, TRUE, reread, FALSE);
-
-	g_free (testfile);
-	g_object_unref (connection);
-	g_object_unref (reread);
 }
 
 static void
@@ -6864,7 +6600,6 @@ test_write_wired_pppoe (void)
 	NMSettingIPConfig *s_ip4;
 	NMSettingPppoe *s_pppoe;
 	NMSettingPpp *s_ppp;
-	char *uuid;
 	GError *error = NULL;
 
 	connection = nm_simple_connection_new ();
@@ -6873,14 +6608,12 @@ test_write_wired_pppoe (void)
 	s_con = (NMSettingConnection *) nm_setting_connection_new ();
 	nm_connection_add_setting (connection, NM_SETTING (s_con));
 
-	uuid = nm_utils_uuid_generate ();
 	g_object_set (s_con,
 	              NM_SETTING_CONNECTION_ID, "Test Write Wired PPPoE",
-	              NM_SETTING_CONNECTION_UUID, uuid,
+	              NM_SETTING_CONNECTION_UUID, nm_utils_uuid_generate_a (),
 	              NM_SETTING_CONNECTION_AUTOCONNECT, TRUE,
 	              NM_SETTING_CONNECTION_TYPE, NM_SETTING_WIRED_SETTING_NAME,
 	              NULL);
-	g_free (uuid);
 
 	/* Wired setting */
 	s_wired = (NMSettingWired *) nm_setting_wired_new ();
@@ -6925,7 +6658,6 @@ test_write_vpn (void)
 	NMSettingConnection *s_con;
 	NMSettingIPConfig *s_ip4;
 	NMSettingVpn *s_vpn;
-	char *uuid;
 	GError *error = NULL;
 
 	connection = nm_simple_connection_new ();
@@ -6934,14 +6666,12 @@ test_write_vpn (void)
 	s_con = (NMSettingConnection *) nm_setting_connection_new ();
 	nm_connection_add_setting (connection, NM_SETTING (s_con));
 
-	uuid = nm_utils_uuid_generate ();
 	g_object_set (s_con,
 	              NM_SETTING_CONNECTION_ID, "Test Write VPN",
-	              NM_SETTING_CONNECTION_UUID, uuid,
+	              NM_SETTING_CONNECTION_UUID, nm_utils_uuid_generate_a (),
 	              NM_SETTING_CONNECTION_AUTOCONNECT, TRUE,
 	              NM_SETTING_CONNECTION_TYPE, NM_SETTING_VPN_SETTING_NAME,
 	              NULL);
-	g_free (uuid);
 
 	/* VPN setting */
 	s_vpn = (NMSettingVpn *) nm_setting_vpn_new ();
@@ -6983,7 +6713,6 @@ test_write_mobile_broadband (gconstpointer data)
 	NMSettingCdma *s_cdma;
 	NMSettingPpp *s_ppp;
 	NMSettingSerial *s_serial;
-	char *uuid;
 	GError *error = NULL;
 	gboolean gsm = GPOINTER_TO_UINT (data);
 
@@ -6993,14 +6722,12 @@ test_write_mobile_broadband (gconstpointer data)
 	s_con = (NMSettingConnection *) nm_setting_connection_new ();
 	nm_connection_add_setting (connection, NM_SETTING (s_con));
 
-	uuid = nm_utils_uuid_generate ();
 	g_object_set (s_con,
 	              NM_SETTING_CONNECTION_ID, gsm ? "Test Write GSM" : "Test Write CDMA",
-	              NM_SETTING_CONNECTION_UUID, uuid,
+	              NM_SETTING_CONNECTION_UUID, nm_utils_uuid_generate_a (),
 	              NM_SETTING_CONNECTION_AUTOCONNECT, TRUE,
 	              NM_SETTING_CONNECTION_TYPE, gsm ? NM_SETTING_GSM_SETTING_NAME : NM_SETTING_CDMA_SETTING_NAME,
 	              NULL);
-	g_free (uuid);
 
 	if (gsm) {
 		/* GSM setting */
@@ -7085,39 +6812,34 @@ test_read_bridge_main (void)
 static void
 test_write_bridge_main (void)
 {
-	NMConnection *connection;
-	NMConnection *reread;
+	nmtst_auto_unlinkfile char *testfile = NULL;
+	gs_unref_object NMConnection *connection = NULL;
+	gs_unref_object NMConnection *reread = NULL;
 	NMSettingConnection *s_con;
 	NMSettingBridge *s_bridge;
 	NMSettingIPConfig *s_ip4;
 	NMSettingIPConfig *s_ip6;
-	char *uuid;
 	NMIPAddress *addr;
 	static const char *mac = "31:33:33:37:be:cd";
 	GError *error = NULL;
-	char *testfile = NULL;
 
 	connection = nm_simple_connection_new ();
 	g_assert (connection);
 
 	/* Connection setting */
 	s_con = (NMSettingConnection *) nm_setting_connection_new ();
-	g_assert (s_con);
 	nm_connection_add_setting (connection, NM_SETTING (s_con));
 
-	uuid = nm_utils_uuid_generate ();
 	g_object_set (s_con,
 	              NM_SETTING_CONNECTION_ID, "Test Write Bridge Main",
-	              NM_SETTING_CONNECTION_UUID, uuid,
+	              NM_SETTING_CONNECTION_UUID, nm_utils_uuid_generate_a (),
 	              NM_SETTING_CONNECTION_AUTOCONNECT, TRUE,
 	              NM_SETTING_CONNECTION_INTERFACE_NAME, "br0",
 	              NM_SETTING_CONNECTION_TYPE, NM_SETTING_BRIDGE_SETTING_NAME,
 	              NULL);
-	g_free (uuid);
 
 	/* bridge setting */
 	s_bridge = (NMSettingBridge *) nm_setting_bridge_new ();
-	g_assert (s_bridge);
 	nm_connection_add_setting (connection, NM_SETTING (s_bridge));
 
 	g_object_set (s_bridge,
@@ -7126,7 +6848,6 @@ test_write_bridge_main (void)
 
 	/* IP4 setting */
 	s_ip4 = (NMSettingIPConfig *) nm_setting_ip4_config_new ();
-	g_assert (s_ip4);
 	nm_connection_add_setting (connection, NM_SETTING (s_ip4));
 
 	g_object_set (s_ip4,
@@ -7142,13 +6863,14 @@ test_write_bridge_main (void)
 
 	/* IP6 setting */
 	s_ip6 = (NMSettingIPConfig *) nm_setting_ip6_config_new ();
-	g_assert (s_ip6);
 	nm_connection_add_setting (connection, NM_SETTING (s_ip6));
 
 	g_object_set (s_ip6,
 	              NM_SETTING_IP_CONFIG_METHOD, NM_SETTING_IP6_CONFIG_METHOD_IGNORE,
 	              NULL);
 
+	nm_connection_add_setting (connection, nm_setting_proxy_new ());
+
 	nmtst_assert_connection_verifies_without_normalization (connection);
 
 	_writer_new_connection (connection,
@@ -7156,13 +6878,8 @@ test_write_bridge_main (void)
 	                        &testfile);
 
 	reread = _connection_from_file (testfile, NULL, TYPE_BRIDGE, NULL);
-	unlink (testfile);
 
 	nmtst_assert_connection_equals (connection, TRUE, reread, FALSE);
-
-	g_free (testfile);
-	g_object_unref (connection);
-	g_object_unref (reread);
 }
 
 static void
@@ -7192,38 +6909,33 @@ test_read_bridge_component (void)
 static void
 test_write_bridge_component (void)
 {
-	NMConnection *connection;
-	NMConnection *reread;
+	nmtst_auto_unlinkfile char *testfile = NULL;
+	gs_unref_object NMConnection *connection = NULL;
+	gs_unref_object NMConnection *reread = NULL;
 	NMSettingConnection *s_con;
 	NMSettingWired *s_wired;
 	NMSetting *s_port;
 	static const char *mac = "31:33:33:37:be:cd";
 	guint32 mtu = 1492;
-	char *uuid;
-	char *testfile = NULL;
 
 	connection = nm_simple_connection_new ();
 	g_assert (connection);
 
 	/* Connection setting */
 	s_con = (NMSettingConnection *) nm_setting_connection_new ();
-	g_assert (s_con);
 	nm_connection_add_setting (connection, NM_SETTING (s_con));
 
-	uuid = nm_utils_uuid_generate ();
 	g_object_set (s_con,
 	              NM_SETTING_CONNECTION_ID, "Test Write Bridge Component",
-	              NM_SETTING_CONNECTION_UUID, uuid,
+	              NM_SETTING_CONNECTION_UUID, nm_utils_uuid_generate_a (),
 	              NM_SETTING_CONNECTION_AUTOCONNECT, TRUE,
 	              NM_SETTING_CONNECTION_TYPE, NM_SETTING_WIRED_SETTING_NAME,
 	              NM_SETTING_CONNECTION_MASTER, "br0",
 	              NM_SETTING_CONNECTION_SLAVE_TYPE, NM_SETTING_BRIDGE_SETTING_NAME,
 	              NULL);
-	g_free (uuid);
 
 	/* Wired setting */
 	s_wired = (NMSettingWired *) nm_setting_wired_new ();
-	g_assert (s_wired);
 	nm_connection_add_setting (connection, NM_SETTING (s_wired));
 
 	g_object_set (s_wired,
@@ -7246,13 +6958,8 @@ test_write_bridge_component (void)
 	                        &testfile);
 
 	reread = _connection_from_file (testfile, NULL, TYPE_ETHERNET, NULL);
-	unlink (testfile);
 
 	nmtst_assert_connection_equals (connection, TRUE, reread, FALSE);
-
-	g_free (testfile);
-	g_object_unref (connection);
-	g_object_unref (reread);
 }
 
 static void
@@ -7485,78 +7192,64 @@ test_read_vlan_flags_2 (void)
 static void
 test_write_vlan (void)
 {
-	NMConnection *connection;
-	char *written = NULL;
+	nmtst_auto_unlinkfile char *testfile = NULL;
+	gs_unref_object NMConnection *connection = NULL;
 
 	connection = _connection_from_file (TEST_IFCFG_VLAN_INTERFACE,
 	                                    NULL, TYPE_VLAN, NULL);
 
 	_writer_new_connection (connection,
 	                        TEST_SCRATCH_DIR "/network-scripts/",
-	                        &written);
-
-	unlink (written);
-	g_free (written);
-
-	g_object_unref (connection);
+	                        &testfile);
 }
 
 static void
 test_write_vlan_flags (void)
 {
-	NMConnection *connection, *reread;
-	char *written = NULL;
+	nmtst_auto_unlinkfile char *testfile = NULL;
+	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",
 	                                    NULL, TYPE_VLAN, NULL);
 
 	_writer_new_connection (connection,
 	                        TEST_SCRATCH_DIR "/network-scripts/",
-	                        &written);
-
-	reread = _connection_from_file (written, NULL, TYPE_ETHERNET, NULL);
+	                        &testfile);
 
-	unlink (written);
-	g_free (written);
+	reread = _connection_from_file (testfile, NULL, TYPE_ETHERNET, NULL);
 
 	nmtst_assert_connection_equals (connection, TRUE, reread, FALSE);
-
-	g_object_unref (connection);
-	g_object_unref (reread);
 }
 
 static void
 test_write_vlan_only_vlanid (void)
 {
-	NMConnection *connection, *reread;
-	char *written = NULL;
+	nmtst_auto_unlinkfile char *testfile = NULL;
+	gs_unref_object NMConnection *connection = NULL;
+	gs_unref_object NMConnection *reread = NULL;
 
 	connection = _connection_from_file (TEST_IFCFG_VLAN_ONLY_VLANID,
 	                                    NULL, TYPE_VLAN, NULL);
 
 	_writer_new_connection (connection,
 	                        TEST_SCRATCH_DIR "/network-scripts/",
-	                        &written);
+	                        &testfile);
 
-	reread = _connection_from_file (written, NULL, TYPE_ETHERNET, NULL);
-	unlink (written);
-	g_free (written);
+	reread = _connection_from_file (testfile, NULL, TYPE_ETHERNET, NULL);
 
 	nmtst_assert_connection_equals (connection, TRUE, reread, FALSE);
-
-	g_object_unref (connection);
-	g_object_unref (reread);
 }
 
 static void
 test_write_vlan_reorder_hdr (void)
 {
-	NMConnection *connection, *reread;
+	nmtst_auto_unlinkfile char *testfile = NULL;
+	gs_unref_object NMConnection *connection = NULL;
+	gs_unref_object NMConnection *reread = NULL;
 	NMSettingConnection *s_con;
 	NMSettingVlan *s_vlan;
 	NMSettingWired *s_wired;
-	char *uuid;
-	char *testfile = NULL;
 
 	connection = nm_simple_connection_new ();
 
@@ -7564,14 +7257,12 @@ test_write_vlan_reorder_hdr (void)
 	s_con = (NMSettingConnection *) nm_setting_connection_new ();
 	nm_connection_add_setting (connection, NM_SETTING (s_con));
 
-	uuid = nm_utils_uuid_generate ();
 	g_object_set (s_con,
 	              NM_SETTING_CONNECTION_ID, "Test Write VLAN reorder_hdr",
-	              NM_SETTING_CONNECTION_UUID, uuid,
+	              NM_SETTING_CONNECTION_UUID, nm_utils_uuid_generate_a (),
 	              NM_SETTING_CONNECTION_AUTOCONNECT, FALSE,
 	              NM_SETTING_CONNECTION_TYPE, NM_SETTING_VLAN_SETTING_NAME,
 	              NULL);
-	g_free (uuid);
 
 	/* Wired setting */
 	s_wired = (NMSettingWired *) nm_setting_wired_new ();
@@ -7592,51 +7283,40 @@ test_write_vlan_reorder_hdr (void)
 	                        &testfile);
 
 	reread = _connection_from_file (testfile, NULL, TYPE_ETHERNET, NULL);
-	unlink (testfile);
 
 	nmtst_assert_connection_equals (connection, TRUE, reread, FALSE);
-
-	g_object_unref (connection);
-	g_object_unref (reread);
-	g_free (testfile);
 }
 
 static void
 test_write_ethernet_missing_ipv6 (void)
 {
-	NMConnection *connection;
-	NMConnection *reread;
+	nmtst_auto_unlinkfile char *testfile = NULL;
+	gs_unref_object NMConnection *connection = NULL;
+	gs_unref_object NMConnection *reread = NULL;
 	NMSettingConnection *s_con;
 	NMSettingWired *s_wired;
 	NMSettingIPConfig *s_ip4;
-	char *uuid;
-	char *testfile = NULL;
 
 	connection = nm_simple_connection_new ();
 	g_assert (connection);
 
 	/* Connection setting */
 	s_con = (NMSettingConnection *) nm_setting_connection_new ();
-	g_assert (s_con);
 	nm_connection_add_setting (connection, NM_SETTING (s_con));
 
-	uuid = nm_utils_uuid_generate ();
 	g_object_set (s_con,
 	              NM_SETTING_CONNECTION_ID, "Test Write Ethernet Without IPv6 Setting",
-	              NM_SETTING_CONNECTION_UUID, uuid,
+	              NM_SETTING_CONNECTION_UUID, nm_utils_uuid_generate_a (),
 	              NM_SETTING_CONNECTION_AUTOCONNECT, TRUE,
 	              NM_SETTING_CONNECTION_TYPE, NM_SETTING_WIRED_SETTING_NAME,
 	              NULL);
-	g_free (uuid);
 
 	/* Wired setting */
 	s_wired = (NMSettingWired *) nm_setting_wired_new ();
-	g_assert (s_wired);
 	nm_connection_add_setting (connection, NM_SETTING (s_wired));
 
 	/* IP4 setting */
 	s_ip4 = (NMSettingIPConfig *) nm_setting_ip4_config_new ();
-	g_assert (s_ip4);
 	nm_connection_add_setting (connection, NM_SETTING (s_ip4));
 	g_object_set (s_ip4,
 	              NM_SETTING_IP_CONFIG_METHOD, NM_SETTING_IP4_CONFIG_METHOD_AUTO,
@@ -7658,13 +7338,8 @@ test_write_ethernet_missing_ipv6 (void)
 	                        &testfile);
 
 	reread = _connection_from_file (testfile, NULL, TYPE_ETHERNET, NULL);
-	unlink (testfile);
 
 	nmtst_assert_connection_equals (connection, TRUE, reread, FALSE);
-
-	g_free (testfile);
-	g_object_unref (connection);
-	g_object_unref (reread);
 }
 
 static void
@@ -7701,17 +7376,16 @@ test_read_bond_main (void)
 static void
 test_write_bond_main (void)
 {
-	NMConnection *connection;
-	NMConnection *reread;
+	nmtst_auto_unlinkfile char *testfile = NULL;
+	gs_unref_object NMConnection *connection = NULL;
+	gs_unref_object NMConnection *reread = NULL;
 	NMSettingConnection *s_con;
 	NMSettingBond *s_bond;
 	NMSettingIPConfig *s_ip4;
 	NMSettingIPConfig *s_ip6;
 	NMSettingWired *s_wired;
-	char *uuid;
 	NMIPAddress *addr;
 	GError *error = NULL;
-	char *testfile = NULL;
 
 	connection = nm_simple_connection_new ();
 
@@ -7719,15 +7393,13 @@ test_write_bond_main (void)
 	s_con = (NMSettingConnection *) nm_setting_connection_new ();
 	nm_connection_add_setting (connection, NM_SETTING (s_con));
 
-	uuid = nm_utils_uuid_generate ();
 	g_object_set (s_con,
 	              NM_SETTING_CONNECTION_ID, "Test Write Bond Main",
-	              NM_SETTING_CONNECTION_UUID, uuid,
+	              NM_SETTING_CONNECTION_UUID, nm_utils_uuid_generate_a (),
 	              NM_SETTING_CONNECTION_AUTOCONNECT, TRUE,
 	              NM_SETTING_CONNECTION_INTERFACE_NAME, "bond0",
 	              NM_SETTING_CONNECTION_TYPE, NM_SETTING_BOND_SETTING_NAME,
 	              NULL);
-	g_free (uuid);
 
 	/* Wired setting */
 	s_wired = (NMSettingWired *) nm_setting_wired_new ();
@@ -7760,6 +7432,8 @@ test_write_bond_main (void)
 	              NM_SETTING_IP_CONFIG_METHOD, NM_SETTING_IP6_CONFIG_METHOD_IGNORE,
 	              NULL);
 
+	nm_connection_add_setting (connection, nm_setting_proxy_new ());
+
 	nmtst_assert_connection_verifies_without_normalization (connection);
 
 	_writer_new_connection (connection,
@@ -7767,13 +7441,8 @@ test_write_bond_main (void)
 	                        &testfile);
 
 	reread = _connection_from_file (testfile, NULL, TYPE_BOND, NULL);
-	unlink (testfile);
 
 	nmtst_assert_connection_equals (connection, TRUE, reread, FALSE);
-
-	g_free (testfile);
-	g_object_unref (connection);
-	g_object_unref (reread);
 }
 
 static void
@@ -7799,14 +7468,13 @@ test_read_bond_slave (void)
 static void
 test_write_bond_slave (void)
 {
-	NMConnection *connection;
-	NMConnection *reread;
+	nmtst_auto_unlinkfile char *testfile = NULL;
+	gs_unref_object NMConnection *connection = NULL;
+	gs_unref_object NMConnection *reread = NULL;
 	NMSettingConnection *s_con;
 	NMSettingWired *s_wired;
 	static const char *mac = "31:33:33:37:be:cd";
 	guint32 mtu = 1492;
-	char *uuid;
-	char *testfile = NULL;
 
 	connection = nm_simple_connection_new ();
 
@@ -7814,16 +7482,14 @@ test_write_bond_slave (void)
 	s_con = (NMSettingConnection *) nm_setting_connection_new ();
 	nm_connection_add_setting (connection, NM_SETTING (s_con));
 
-	uuid = nm_utils_uuid_generate ();
 	g_object_set (s_con,
 	              NM_SETTING_CONNECTION_ID, "Test Write Bond Slave",
-	              NM_SETTING_CONNECTION_UUID, uuid,
+	              NM_SETTING_CONNECTION_UUID, nm_utils_uuid_generate_a (),
 	              NM_SETTING_CONNECTION_AUTOCONNECT, TRUE,
 	              NM_SETTING_CONNECTION_TYPE, NM_SETTING_WIRED_SETTING_NAME,
 	              NM_SETTING_CONNECTION_MASTER, "bond0",
 	              NM_SETTING_CONNECTION_SLAVE_TYPE, NM_SETTING_BOND_SETTING_NAME,
 	              NULL);
-	g_free (uuid);
 
 	/* Wired setting */
 	s_wired = (NMSettingWired *) nm_setting_wired_new ();
@@ -7841,13 +7507,8 @@ test_write_bond_slave (void)
 	                        &testfile);
 
 	reread = _connection_from_file (testfile, NULL, TYPE_ETHERNET, NULL);
-	unlink (testfile);
 
 	nmtst_assert_connection_equals (connection, TRUE, reread, FALSE);
-
-	g_free (testfile);
-	g_object_unref (connection);
-	g_object_unref (reread);
 }
 
 static void
@@ -7885,18 +7546,17 @@ test_read_infiniband (void)
 static void
 test_write_infiniband (void)
 {
-	NMConnection *connection;
-	NMConnection *reread;
+	nmtst_auto_unlinkfile char *testfile = NULL;
+	gs_unref_object NMConnection *connection = NULL;
+	gs_unref_object NMConnection *reread = NULL;
 	NMSettingConnection *s_con;
 	NMSettingInfiniband *s_infiniband;
 	NMSettingIPConfig *s_ip4;
 	NMSettingIPConfig *s_ip6;
 	const char *mac = "80:00:11:22:33:44:55:66:77:88:99:aa:bb:cc:dd:ee:ff:00:11:22";
 	guint32 mtu = 65520;
-	char *uuid;
 	NMIPAddress *addr;
 	GError *error = NULL;
-	char *testfile = NULL;
 
 	connection = nm_simple_connection_new ();
 
@@ -7904,14 +7564,12 @@ test_write_infiniband (void)
 	s_con = (NMSettingConnection *) nm_setting_connection_new ();
 	nm_connection_add_setting (connection, NM_SETTING (s_con));
 
-	uuid = nm_utils_uuid_generate ();
 	g_object_set (s_con,
 	              NM_SETTING_CONNECTION_ID, "Test Write InfiniBand",
-	              NM_SETTING_CONNECTION_UUID, uuid,
+	              NM_SETTING_CONNECTION_UUID, nm_utils_uuid_generate_a (),
 	              NM_SETTING_CONNECTION_AUTOCONNECT, TRUE,
 	              NM_SETTING_CONNECTION_TYPE, NM_SETTING_INFINIBAND_SETTING_NAME,
 	              NULL);
-	g_free (uuid);
 
 	/* InfiniBand setting */
 	s_infiniband = (NMSettingInfiniband *) nm_setting_infiniband_new ();
@@ -7953,19 +7611,14 @@ test_write_infiniband (void)
 	                        &testfile);
 
 	reread = _connection_from_file (testfile, NULL, TYPE_INFINIBAND, NULL);
-	unlink (testfile);
 
 	nmtst_assert_connection_equals (connection, TRUE, reread, FALSE);
-
-	g_free (testfile);
-	g_object_unref (connection);
-	g_object_unref (reread);
 }
 
 static void
 test_read_bond_slave_ib (void)
 {
-	NMConnection *connection;
+	gs_unref_object NMConnection *connection = NULL;
 	NMSettingConnection *s_con;
 
 	connection = _connection_from_file (TEST_IFCFG_DIR "/network-scripts/ifcfg-test-bond-slave-ib",
@@ -7975,22 +7628,18 @@ test_read_bond_slave_ib (void)
 	g_assert (s_con);
 
 	g_assert_cmpstr (nm_setting_connection_get_master (s_con), ==, "bond0");
-
 	g_assert_cmpstr (nm_setting_connection_get_slave_type (s_con), ==, NM_SETTING_BOND_SETTING_NAME);
-
-	g_object_unref (connection);
 }
 
 static void
 test_write_bond_slave_ib (void)
 {
-	NMConnection *connection;
-	NMConnection *reread;
+	nmtst_auto_unlinkfile char *testfile = NULL;
+	gs_unref_object NMConnection *connection = NULL;
+	gs_unref_object NMConnection *reread = NULL;
 	NMSettingConnection *s_con;
 	NMSettingInfiniband *s_infiniband;
 	static const char *mac = "80:00:11:22:33:44:55:66:77:88:99:aa:bb:cc:dd:ee:ff:00:11:22";
-	char *uuid;
-	char *testfile = NULL;
 
 	connection = nm_simple_connection_new ();
 
@@ -7998,16 +7647,14 @@ test_write_bond_slave_ib (void)
 	s_con = (NMSettingConnection *) nm_setting_connection_new ();
 	nm_connection_add_setting (connection, NM_SETTING (s_con));
 
-	uuid = nm_utils_uuid_generate ();
 	g_object_set (s_con,
 	              NM_SETTING_CONNECTION_ID, "Test Write Bond Slave InfiniBand",
-	              NM_SETTING_CONNECTION_UUID, uuid,
+	              NM_SETTING_CONNECTION_UUID, nm_utils_uuid_generate_a (),
 	              NM_SETTING_CONNECTION_AUTOCONNECT, TRUE,
 	              NM_SETTING_CONNECTION_TYPE, NM_SETTING_INFINIBAND_SETTING_NAME,
 	              NM_SETTING_CONNECTION_MASTER, "bond0",
 	              NM_SETTING_CONNECTION_SLAVE_TYPE, NM_SETTING_BOND_SETTING_NAME,
 	              NULL);
-	g_free (uuid);
 
 	/* InfiniBand setting */
 	s_infiniband = (NMSettingInfiniband *) nm_setting_infiniband_new ();
@@ -8026,13 +7673,8 @@ test_write_bond_slave_ib (void)
 	                        &testfile);
 
 	reread = _connection_from_file (testfile, NULL, NULL, NULL);
-	unlink (testfile);
 
 	nmtst_assert_connection_equals (connection, TRUE, reread, FALSE);
-
-	g_free (testfile);
-	g_object_unref (connection);
-	g_object_unref (reread);
 }
 
 static void
@@ -8122,14 +7764,15 @@ test_read_dcb_basic (void)
 static void
 test_write_dcb_basic (void)
 {
-	NMConnection *connection, *reread;
+	nmtst_auto_unlinkfile char *testfile = NULL;
+	gs_unref_object NMConnection *connection = NULL;
+	gs_unref_object NMConnection *reread = NULL;
 	NMSettingConnection *s_con;
 	NMSettingWired *s_wired;
 	NMSettingDcb *s_dcb;
 	NMSettingIPConfig *s_ip4;
 	NMSettingIPConfig *s_ip6;
 	guint i;
-	char *uuid, *testfile;
 	const guint group_ids[8] = { 4, 0xF, 6, 0xF, 1, 7, 3, 0xF };
 	const guint group_bandwidths[8] = { 10, 20, 15, 10, 2, 3, 35, 5 };
 	const guint bandwidths[8] = { 10, 20, 30, 40, 50, 10, 0, 25 };
@@ -8141,14 +7784,12 @@ test_write_dcb_basic (void)
 
 	s_con = (NMSettingConnection *) nm_setting_connection_new ();
 	nm_connection_add_setting (connection, NM_SETTING (s_con));
-	uuid = nm_utils_uuid_generate ();
 	g_object_set (G_OBJECT (s_con),
 	              NM_SETTING_CONNECTION_ID, "dcb-test",
-	              NM_SETTING_CONNECTION_UUID, uuid,
+	              NM_SETTING_CONNECTION_UUID, nm_utils_uuid_generate_a (),
 	              NM_SETTING_CONNECTION_TYPE, NM_SETTING_WIRED_SETTING_NAME,
 	              NM_SETTING_CONNECTION_INTERFACE_NAME, "eth0",
 	              NULL);
-	g_free (uuid);
 
 	/* Wired setting */
 	s_wired = (NMSettingWired *) nm_setting_wired_new ();
@@ -8194,19 +7835,14 @@ test_write_dcb_basic (void)
 	                        &testfile);
 
 	reread = _connection_from_file (testfile, NULL, TYPE_ETHERNET, NULL);
-	unlink (testfile);
 
 	nmtst_assert_connection_equals (connection, TRUE, reread, FALSE);
-
-	g_object_unref (connection);
-	g_object_unref (reread);
-	g_free (testfile);
 }
 
 static void
 test_read_dcb_default_app_priorities (void)
 {
-	NMConnection *connection;
+	gs_unref_object NMConnection *connection = NULL;
 	NMSettingDcb *s_dcb;
 
 	connection = _connection_from_file (TEST_IFCFG_DIR "/network-scripts/ifcfg-test-dcb-default-app-priorities",
@@ -8223,8 +7859,6 @@ test_read_dcb_default_app_priorities (void)
 
 	g_assert_cmpint (nm_setting_dcb_get_app_fip_flags (s_dcb), ==, NM_SETTING_DCB_FLAG_ENABLE);
 	g_assert_cmpint (nm_setting_dcb_get_app_fip_priority (s_dcb), ==, -1);
-
-	g_object_unref (connection);
 }
 
 static void
@@ -8335,49 +7969,45 @@ test_read_dcb_pgpct_not_100 (void)
 static void
 test_read_fcoe_mode (gconstpointer user_data)
 {
+	gs_unref_object NMConnection *connection = NULL;
+	gs_free char *file = NULL;
 	const char *expected_mode = user_data;
-	NMConnection *connection;
 	NMSettingDcb *s_dcb;
-	char *file;
 
 	file = g_strdup_printf (TEST_IFCFG_DIR "/network-scripts/ifcfg-test-fcoe-%s", expected_mode);
 	connection = _connection_from_file (file, NULL, TYPE_ETHERNET, NULL);
-	g_free (file);
 
 	s_dcb = nm_connection_get_setting_dcb (connection);
 	g_assert (s_dcb);
 
 	g_assert_cmpint (nm_setting_dcb_get_app_fcoe_flags (s_dcb), ==, NM_SETTING_DCB_FLAG_ENABLE);
 	g_assert_cmpstr (nm_setting_dcb_get_app_fcoe_mode (s_dcb), ==, expected_mode);
-
-	g_object_unref (connection);
 }
 
 static void
 test_write_fcoe_mode (gconstpointer user_data)
 {
+	nmtst_auto_unlinkfile char *testfile = NULL;
+	gs_unref_object NMConnection *connection = NULL;
+	gs_unref_object NMConnection *reread = NULL;
 	const char *expected_mode = user_data;
-	NMConnection *connection, *reread;
-	GError *error = NULL;
 	NMSettingConnection *s_con;
 	NMSettingWired *s_wired;
 	NMSettingDcb *s_dcb;
 	NMSettingIPConfig *s_ip4;
 	NMSettingIPConfig *s_ip6;
-	char *uuid, *testfile;
+	shvarFile *ifcfg;
 
 	connection = nm_simple_connection_new ();
 
 	s_con = (NMSettingConnection *) nm_setting_connection_new ();
 	nm_connection_add_setting (connection, NM_SETTING (s_con));
-	uuid = nm_utils_uuid_generate ();
 	g_object_set (G_OBJECT (s_con),
 	              NM_SETTING_CONNECTION_ID, "fcoe-test",
-	              NM_SETTING_CONNECTION_UUID, uuid,
+	              NM_SETTING_CONNECTION_UUID, nm_utils_uuid_generate_a (),
 	              NM_SETTING_CONNECTION_TYPE, NM_SETTING_WIRED_SETTING_NAME,
 	              NM_SETTING_CONNECTION_INTERFACE_NAME, "eth0",
 	              NULL);
-	g_free (uuid);
 
 	/* Wired setting */
 	s_wired = (NMSettingWired *) nm_setting_wired_new ();
@@ -8407,26 +8037,13 @@ test_write_fcoe_mode (gconstpointer user_data)
 	                        TEST_SCRATCH_DIR "/network-scripts/",
 	                        &testfile);
 
-	{
-		shvarFile *ifcfg = svOpenFile (testfile, &error);
-		char *written_mode;
-
-		g_assert_no_error (error);
-		g_assert (ifcfg);
-		written_mode = svGetValue (ifcfg, "DCB_APP_FCOE_MODE", FALSE);
-		svCloseFile (ifcfg);
-		g_assert_cmpstr (written_mode, ==, expected_mode);
-		g_free (written_mode);
-	}
+	ifcfg = _svOpenFile (testfile);
+	_svGetValue_check (ifcfg, "DCB_APP_FCOE_MODE", expected_mode);
+	svCloseFile (ifcfg);
 
 	reread = _connection_from_file (testfile, NULL, TYPE_ETHERNET, NULL);
-	unlink (testfile);
 
 	nmtst_assert_connection_equals (connection, TRUE, reread, FALSE);
-
-	g_object_unref (connection);
-	g_object_unref (reread);
-	g_free (testfile);
 }
 
 static void
@@ -8481,16 +8098,15 @@ test_read_team_master_invalid (gconstpointer user_data)
 static void
 test_write_team_master (void)
 {
-	NMConnection *connection, *reread;
+	nmtst_auto_unlinkfile char *testfile = NULL;
+	gs_unref_object NMConnection *connection = NULL;
+	gs_unref_object NMConnection *reread = NULL;
 	NMSettingConnection *s_con;
 	NMSettingTeam *s_team;
 	NMSettingWired *s_wired;
 	NMSettingIPConfig *s_ip4;
 	NMSettingIPConfig *s_ip6;
-	char *uuid, *testfile = NULL, *val;
-	GError *error = NULL;
 	const char *expected_config = "{ \"device\": \"team0\", \"link_watch\": { \"name\": \"ethtool\" } }";
-	const char *escaped_expected_config = "\"{ \\\"device\\\": \\\"team0\\\", \\\"link_watch\\\": { \\\"name\\\": \\\"ethtool\\\" } }\"";
 	shvarFile *f;
 
 	connection = nm_simple_connection_new ();
@@ -8499,14 +8115,12 @@ test_write_team_master (void)
 	s_con = (NMSettingConnection *) nm_setting_connection_new ();
 	nm_connection_add_setting (connection, NM_SETTING (s_con));
 
-	uuid = nm_utils_uuid_generate ();
 	g_object_set (s_con,
 	              NM_SETTING_CONNECTION_ID, "Test Write Team Master",
-	              NM_SETTING_CONNECTION_UUID, uuid,
+	              NM_SETTING_CONNECTION_UUID, nm_utils_uuid_generate_a (),
 	              NM_SETTING_CONNECTION_INTERFACE_NAME, "team0",
 	              NM_SETTING_CONNECTION_TYPE, NM_SETTING_TEAM_SETTING_NAME,
 	              NULL);
-	g_free (uuid);
 
 	/* Team setting */
 	s_team = (NMSettingTeam *) nm_setting_team_new ();
@@ -8522,7 +8136,6 @@ test_write_team_master (void)
 
 	/* IP4 setting */
 	s_ip4 = (NMSettingIPConfig *) nm_setting_ip4_config_new ();
-	g_assert (s_ip4);
 	nm_connection_add_setting (connection, NM_SETTING (s_ip4));
 
 	g_object_set (s_ip4,
@@ -8531,43 +8144,28 @@ test_write_team_master (void)
 
 	/* IP6 setting */
 	s_ip6 = (NMSettingIPConfig *) nm_setting_ip6_config_new ();
-	g_assert (s_ip6);
 	nm_connection_add_setting (connection, NM_SETTING (s_ip6));
 
 	g_object_set (s_ip6,
 	              NM_SETTING_IP_CONFIG_METHOD, NM_SETTING_IP6_CONFIG_METHOD_AUTO,
 	              NULL);
 
+	nm_connection_add_setting (connection, nm_setting_proxy_new ());
+
 	nmtst_assert_connection_verifies_without_normalization (connection);
 
 	_writer_new_connection (connection,
 	                        TEST_SCRATCH_DIR "/network-scripts/",
 	                        &testfile);
 
-	f = svOpenFile (testfile, &error);
-	g_assert_no_error (error);
-	g_assert (f);
-
-	/* re-read the file to check that what key was written. */
-	val = svGetValue (f, "DEVICETYPE", FALSE);
-	g_assert (val);
-	g_assert_cmpstr (val, ==, "Team");
-	g_free (val);
-	val = svGetValue (f, "TEAM_CONFIG", TRUE);
-	g_assert (val);
-	g_assert_cmpstr (val, ==, escaped_expected_config);
-	g_free (val);
+	f = _svOpenFile (testfile);
+	_svGetValue_check (f, "DEVICETYPE", "Team");
+	_svGetValue_check (f, "TEAM_CONFIG", expected_config);
 	svCloseFile (f);
 
 	reread = _connection_from_file (testfile, NULL, TYPE_ETHERNET, NULL);
 
-	unlink (testfile);
-
 	nmtst_assert_connection_equals (connection, TRUE, reread, FALSE);
-
-	g_free (testfile);
-	g_object_unref (connection);
-	g_object_unref (reread);
 }
 
 static void
@@ -8596,14 +8194,13 @@ test_read_team_port (gconstpointer user_data)
 static void
 test_write_team_port (void)
 {
-	NMConnection *connection, *reread;
+	nmtst_auto_unlinkfile char *testfile = NULL;
+	gs_unref_object NMConnection *connection = NULL;
+	gs_unref_object NMConnection *reread = NULL;
 	NMSettingConnection *s_con;
 	NMSettingTeamPort *s_team_port;
 	NMSettingWired *s_wired;
-	char *uuid, *testfile = NULL, *val;
-	GError *error = NULL;
 	const char *expected_config = "{ \"p4p1\": { \"prio\": -10, \"sticky\": true } }";
-	const char *escaped_expected_config = "\"{ \\\"p4p1\\\": { \\\"prio\\\": -10, \\\"sticky\\\": true } }\"";
 	shvarFile *f;
 
 	connection = nm_simple_connection_new ();
@@ -8612,15 +8209,13 @@ test_write_team_port (void)
 	s_con = (NMSettingConnection *) nm_setting_connection_new ();
 	nm_connection_add_setting (connection, NM_SETTING (s_con));
 
-	uuid = nm_utils_uuid_generate ();
 	g_object_set (s_con,
 	              NM_SETTING_CONNECTION_ID, "Test Write Team Port",
-	              NM_SETTING_CONNECTION_UUID, uuid,
+	              NM_SETTING_CONNECTION_UUID, nm_utils_uuid_generate_a (),
 	              NM_SETTING_CONNECTION_TYPE, NM_SETTING_WIRED_SETTING_NAME,
 	              NM_SETTING_CONNECTION_MASTER, "team0",
 	              NM_SETTING_CONNECTION_SLAVE_TYPE, NM_SETTING_TEAM_SETTING_NAME,
 	              NULL);
-	g_free (uuid);
 
 	/* Team setting */
 	s_team_port = (NMSettingTeamPort *) nm_setting_team_port_new ();
@@ -8637,36 +8232,17 @@ test_write_team_port (void)
 	                        TEST_SCRATCH_DIR "/network-scripts/",
 	                        &testfile);
 
-	f = svOpenFile (testfile, &error);
-	g_assert_no_error (error);
-	g_assert (f);
-
-	/* re-read the file to check that what key was written. */
-	val = svGetValue (f, "TYPE", FALSE);
-	g_assert (!val);
-	val = svGetValue (f, "DEVICETYPE", FALSE);
-	g_assert (val);
-	g_assert_cmpstr (val, ==, "TeamPort");
-	g_free (val);
-	val = svGetValue (f, "TEAM_PORT_CONFIG", TRUE);
-	g_assert (val);
-	g_assert_cmpstr (val, ==, escaped_expected_config);
-	g_free (val);
-	val = svGetValue (f, "TEAM_MASTER", TRUE);
-	g_assert (val);
-	g_assert_cmpstr (val, ==, "team0");
-	g_free (val);
+	f = _svOpenFile (testfile);
+	_svGetValue_check (f, "TYPE", NULL);
+	_svGetValue_check (f, "DEVICETYPE", "TeamPort");
+	_svGetValue_check (f, "TEAM_PORT_CONFIG", expected_config);
+	_svGetValue_check (f, "TEAM_MASTER", "team0");
 	svCloseFile (f);
 
 	reread = _connection_from_file (testfile, NULL, TYPE_ETHERNET,
 	                                NULL);
-	unlink (testfile);
 
 	nmtst_assert_connection_equals (connection, TRUE, reread, FALSE);
-
-	g_free (testfile);
-	g_object_unref (connection);
-	g_object_unref (reread);
 }
 
 static void
@@ -8692,108 +8268,456 @@ test_read_team_port_empty_config (void)
 	g_object_unref (connection);
 }
 
-/* Old algorithm for "remove escaped characters in place".
- *
- * This function is obsolete because it has O(n^2) runtime
- * complexity and got replaced. Keep it here for testing,
- * that both functions behave identical.
- **/
-static void
-svUnescape_On2 (char *s)
-{
-	int len, i;
-
-	len = strlen(s);
-	if (len >= 2 && (s[0] == '"' || s[0] == '\'') && s[0] == s[len-1]) {
-		i = len - 2;
-		if (i == 0)
-			s[0] = '\0';
-		else {
-			memmove(s, s+1, i);
-			s[i+1] = '\0';
-			len = i;
-		}
+static void
+test_read_proxy_basic (void)
+{
+	NMConnection *connection;
+	NMSettingProxy *s_proxy;
+
+	/* Test basic proxy configuration */
+
+	connection = _connection_from_file (TEST_IFCFG_DIR"/network-scripts/ifcfg-test-read-proxy-basic",
+	                                    NULL, TYPE_ETHERNET, NULL);
+
+	/* ===== Proxy setting ===== */
+	s_proxy = nm_connection_get_setting_proxy (connection);
+	g_assert (s_proxy);
+
+	/* Proxy method */
+	g_assert_cmpint (nm_setting_proxy_get_method (s_proxy), ==, NM_SETTING_PROXY_METHOD_AUTO);
+	g_assert (nm_setting_proxy_get_browser_only (s_proxy));
+	g_assert_cmpstr (nm_setting_proxy_get_pac_url (s_proxy), ==, "http://wpad.mycompany.com/wpad.dat");
+
+	g_object_unref (connection);
+}
+
+static void
+test_write_proxy_basic (void)
+{
+	nmtst_auto_unlinkfile char *testfile = NULL;
+	gs_unref_object NMConnection *connection = NULL;
+	gs_unref_object NMConnection *reread = NULL;
+	NMSettingConnection *s_con;
+	NMSettingWired *s_wired;
+	NMSettingProxy *s_proxy;
+	const char *expected_url = "https://wpad.neverland.org/wpad.dat";
+	shvarFile *f;
+
+	connection = nm_simple_connection_new ();
+
+	/* Connection setting */
+	s_con = (NMSettingConnection *) nm_setting_connection_new ();
+	nm_connection_add_setting (connection, NM_SETTING (s_con));
+
+	g_object_set (s_con,
+	              NM_SETTING_CONNECTION_ID, "Test Write Proxy Basic",
+	              NM_SETTING_CONNECTION_UUID, nm_utils_uuid_generate_a (),
+	              NM_SETTING_CONNECTION_TYPE, NM_SETTING_WIRED_SETTING_NAME,
+	              NULL);
+
+	/* Proxy setting */
+	s_proxy = (NMSettingProxy *) nm_setting_proxy_new ();
+	nm_connection_add_setting (connection, NM_SETTING (s_proxy));
+	g_object_set (s_proxy, NM_SETTING_PROXY_METHOD, NM_SETTING_PROXY_METHOD_AUTO, NULL);
+	g_object_set (s_proxy, NM_SETTING_PROXY_PAC_URL, expected_url, NULL);
+
+	/* Wired setting */
+	s_wired = (NMSettingWired *) nm_setting_wired_new ();
+	nm_connection_add_setting (connection, NM_SETTING (s_wired));
+
+	nmtst_assert_connection_verifies (connection);
+
+	_writer_new_connection (connection,
+	                        TEST_SCRATCH_DIR "/network-scripts/",
+	                        &testfile);
+
+	f = _svOpenFile (testfile);
+	_svGetValue_check (f, "TYPE", "Ethernet");
+	_svGetValue_check (f, "PROXY_METHOD", "auto");
+	_svGetValue_check (f, "PAC_URL", expected_url);
+	svCloseFile (f);
+
+	reread = _connection_from_file (testfile, NULL, TYPE_ETHERNET,
+	                                NULL);
+
+	nmtst_assert_connection_equals (connection, TRUE, reread, FALSE);
+}
+
+/*****************************************************************************/
+
+static const char *
+_svUnescape (const char *str, char **to_free)
+{
+	const char *s;
+	gs_free char *str_free = NULL;
+
+	g_assert (str);
+	g_assert (to_free);
+
+	if (str[0] == '\0') {
+		/* avoid static string "" */
+		str = (str_free = g_strdup (str));
 	}
-	for (i = 0; i < len; i++) {
-		if (s[i] == '\\') {
-			memmove(s+i, s+i+1, len-(i+1));
-			len--;
-		}
-		s[len] = '\0';
+
+	s = svUnescape (str, to_free);
+	if (*to_free) {
+		g_assert (s == *to_free);
+		g_assert (s[0]);
+	} else {
+		g_assert (   s == NULL
+		          || (!s[0] && (s <  str || s >  strchr (str, '\0')))
+		          || ( s[0] &&  s >= str && s <= strchr (str, '\0') ));
 	}
+	return s;
 }
 
+typedef struct {
+	const char *val;
+	const char *exp;
+	bool can_concat:1;
+	bool needs_ascii_separator:1;
+} UnescapeTestData;
+
 static void
-test_svUnescape_assert (const char *str)
+do_svUnescape_assert (const char *str, const char *expected)
 {
-	char *s1 = g_strdup (str);
-	char *s2 = g_strdup (str);
+	gs_free char *to_free = NULL;
+	const char *s;
+
+	s = _svUnescape (str, &to_free);
+	g_assert_cmpstr (s, ==, expected);
 
-	svUnescape (s1);
-	svUnescape_On2 (s2);
+	/* check we can make a round-trip */
+	if (expected) {
+		gs_free char *s1_free = NULL;
+		gs_free char *s2_free = NULL;
+		const char *s1, *s2;
 
-	g_assert_cmpstr (s1, ==, s2);
+		s1 = svEscape (expected, &s1_free);
+		g_assert (s1);
 
-	g_free (s1);
-	g_free (s2);
+		s2 = _svUnescape (s1, &s2_free);
+		g_assert (s2);
+
+		g_assert_cmpstr (s2, ==, expected);
+	}
+}
+
+static void
+do_svUnescape_combine_ansi_append (GString *str_val, GString *str_exp, const UnescapeTestData *data, gboolean honor_needs_ascii_separator)
+{
+	g_string_append (str_val, data->val);
+	g_string_append (str_exp, data->exp);
+	if (honor_needs_ascii_separator && data->needs_ascii_separator) {
+		/* the string has an open escape sequence. We must ensure that when
+		 * combining it with another sequence, that they don't merge into
+		 * something diffent. for example "\xa" + "a" must not result in
+		 * "\xaa". Instead, we add a space in between to get "\xa a". */
+		g_string_append (str_val, " ");
+		g_string_append (str_exp, " ");
+	}
+}
+
+static void
+do_svUnescape_combine_ansi (GString *str_val, GString *str_exp, const UnescapeTestData *data_ansi, gsize data_len, gssize idx)
+{
+	gsize i, j;
+
+	g_string_set_size (str_val, 0);
+	g_string_set_size (str_exp, 0);
+	g_string_append (str_val, "$'");
+	if (idx < 0) {
+		for (i = -idx; i > 0; i--) {
+			j = nmtst_get_rand_int () % data_len;
+			if (!data_ansi[j].can_concat) {
+				i++;
+				continue;
+			}
+			do_svUnescape_combine_ansi_append (str_val, str_exp, &data_ansi[j], i > 1);
+		}
+	} else {
+		g_assert_cmpint (idx, <, data_len);
+		do_svUnescape_combine_ansi_append (str_val, str_exp, &data_ansi[idx], FALSE);
+	}
+	g_string_append (str_val, "'");
 }
 
 static void
 test_svUnescape (void)
 {
-	int len, repeat, i, k;
-	GRand *r = g_rand_new ();
-	guint32 seed = g_random_int ();
-
-	g_rand_set_seed (r, seed);
-
-	test_svUnescape_assert ("");
-	test_svUnescape_assert ("'");
-	test_svUnescape_assert ("\"");
-	test_svUnescape_assert ("\\");
-	test_svUnescape_assert ("x");
-	test_svUnescape_assert (" ");
-	test_svUnescape_assert ("'  '");
-	test_svUnescape_assert ("'x'");
-	test_svUnescape_assert ("\'some string\'");
-	test_svUnescape_assert ("Bob outside LAN");
-	test_svUnescape_assert ("{ \"device\": \"team0\", \"link_watch\": { \"name\": \"ethtool\" } }");
-
-	for (len = 1; len < 25; len++) {
-		char *s = g_new0 (char, len+1);
-
-		for (repeat = 0; repeat < MAX (4*len, 20); repeat++) {
-
-			/* fill the entire string with random. */
-			for (i = 0; i < len; i++)
-				s[i] = g_rand_int (r);
-
-			/* randomly place escape characters into the string */
-			k = g_rand_int (r) % (len);
-			while (k-- > 0)
-				s[g_rand_int (r) % len] = '\\';
-
-			if (len > 1) {
-				/* quote the string. */
-				k = g_rand_int (r) % (10);
-				if (k < 4) {
-					char quote = k < 2 ? '"' : '\'';
-
-					s[0] = quote;
-					s[len-1] = quote;
-				}
+#define V0(v_value, v_expected) { .val = ""v_value"", .exp = v_expected, .can_concat = FALSE, }
+#define V1(v_value, v_expected) { .val = ""v_value"", .exp = v_expected, .can_concat = !!v_expected, }
+#define V2(v_value, v_expected) { .val = ""v_value"", .exp = v_expected, .can_concat = TRUE, .needs_ascii_separator = TRUE, }
+	const UnescapeTestData data_full[] = {
+		V1 ("", ""),
+		V0 ("'", NULL),
+		V1 ("'x'", "x"),
+		V1 ("'  '", "  "),
+		V1 ("'x'", "x"),
+		V0 ("\"", NULL),
+		V0 ("\\", NULL),
+		V0 (" ", ""),
+		V0 ("   ", ""),
+		V0 ("a;   #", "a"),
+		V0 (" ;   #", ""),
+		V0 (";   ", ""),
+		V0 ("; ;", NULL),
+		V0 (" ; a #", NULL),
+		V0 (" ; a;;  #", NULL),
+		V0 ("a; ; #", NULL),
+		V0 ("\t  # ", ""),
+		V0 ("\t  #a", ""),
+		V0 ("\t  #a\r", ""),
+		V0 ("\r", ""),
+		V1 ("\\\"", "\""),
+		V1 ("\\`", "`"),
+		V1 ("\\$", "$"),
+		V1 ("\\\\", "\\"),
+		V1 ("\\a", "a"),
+		V1 ("\\b", "b"),
+		V1 ("\\'", "'"),
+		V1 ("\\~", "~"),
+		V1 ("\\\t", "\t"),
+		V1 ("\"\\\"\"", "\""),
+		V1 ("\"\\`\"", "`"),
+		V1 ("\"\\$\"", "$"),
+		V1 ("\"\\\\\"", "\\"),
+		V1 ("\"\\a\"", "\\a"),
+		V1 ("\"\\b\"", "\\b"),
+		V1 ("\"\\\t\"", "\\\t"),
+		V0 ("ab\r", "ab"),
+		V0 ("a'b'\r ", "ab"),
+		V0 ("a'b' \r", "ab"),
+		V0 ("a#b", "a#b"),
+		V0 ("#b", "#b"),
+		V1 ("\'some string\'", "some string"),
+		V0 ("Bob outside LAN", NULL),
+		V1 ("x", "x"),
+		V1 ("'{ \"device\": \"team0\", \"link_watch\": { \"name\": \"ethtool\" } }'",
+	       "{ \"device\": \"team0\", \"link_watch\": { \"name\": \"ethtool\" } }"),
+		V1 ("x\"\"b", "xb"),
+		V1 ("x\"c\"b", "xcb"),
+		V1 ("\"c\"b", "cb"),
+		V1 ("\"c\"\\'b", "c'b"),
+		V1 ("$''", ""),
+		V1 ("$'\\n'", "\n"),
+		V0 ("$'\\'", NULL),
+		V1 ("$'\\x'", "\\x"),
+		V1 ("$'\\xa'", "\xa"),
+		V0 ("$'\\x0'", ""),
+		V1 ("$'\\x12'", "\x12"),
+		V1 ("$'\\x12A'", "\x12""A"),
+		V1 ("$'\\x12t'", "\x12t"),
+		V1 ("\"aa\\\"\"", "aa\""),
+		V1 ("\"aa\\\"b\"c", "aa\"bc"),
+		V1 ("\"aa\\\"\"b", "aa\"b"),
+
+		/* the following is not shell behavior, but kept for backward compatibility
+		 * with old svEscape(). */
+		V0 ("\"\\'\"", "'"),
+		V0 ("\"\\~\"", "~"),
+		V0 ("\"b\\~b\"", "b~b"),
+		V0 ("\"\\~\\~\"", "~~"),
+		V0 ("\"\\~\\'\"", "~'"),
+
+		/* the following is shell-behavior, because it doesn't look like written
+		 * by old svEscape(). */
+		V1 ("\"\\~~\"", "\\~~"),
+		V1 ("\"\\a\\'\"", "\\a\\'"),
+		V1 ("x\"\\~\"", "x\\~"),
+		V1 ("\"\\'\"''", "\\'"),
+		V0 ("\"b\\~b\" ", "b\\~b"),
+		V1 ("\"b\\~b\"x", "b\\~bx"),
+	};
+	const UnescapeTestData data_ansi[] = {
+		/* strings inside $''. They cannot be compared directly, but must
+		 * be wrapped by do_svUnescape_combine_ansi(). */
+		V1 ("", ""),
+		V1 ("a", "a"),
+		V1 ("b", "b"),
+		V1 ("x", "x"),
+		V1 (" ", " "),
+		V1 ("\\a", "\a"),
+		V1 ("\\b", "\b"),
+		V1 ("\\e", "\e"),
+		V1 ("\\E", "\E"),
+		V1 ("\\f", "\f"),
+		V1 ("\\n", "\n"),
+		V1 ("\\r", "\r"),
+		V1 ("\\t", "\t"),
+		V1 ("\\v", "\v"),
+		V1 ("\\\\", "\\"),
+		V1 ("\\'", "'"),
+		V1 ("\\\"", "\""),
+		V1 ("\\?", "\?"),
+		V1 ("\\?", "?"),
+		V2 ("\\8", "\\8"),
+		V2 ("\\1", "\1"),
+		V1 ("\\1A", "\1A"),
+		V1 ("\\18", "\18"),
+		V2 ("\\01", "\1"),
+		V1 ("\\001", "\1"),
+		V0 ("\\008", ""),
+		V1 ("\\018", "\0018"),
+		V0 ("\\08", ""),
+		V1 ("\\18", "\0018"),
+		V1 ("\\x", "\\x"),
+		V2 ("\\xa", "\xa"),
+		V1 ("\\x12", "\x12"),
+		V1 ("\\x12A", "\x12""A"),
+		V1 ("\\x12a", "\x12""a"),
+		V1 ("\\x12t", "\x12t"),
+		V1 ("\\x1a", "\x1a"),
+		V1 ("\\x1A", "\x1A"),
+		V1 ("\\ut", "\\ut"),
+		V2 ("\\ua", "\xa"),
+		V1 ("\\uat", "\xat"),
+		V2 ("\\uab", "\xc2\xab"),
+		V1 ("\\uabt", "\xc2\xabt"),
+		V2 ("\\uabc", "\xe0\xaa\xbc"),
+		V1 ("\\uabct", "\xe0\xaa\xbct"),
+		V2 ("\\uabcd", "\xea\xaf\x8d"),
+		V1 ("\\uabcdt", "\xea\xaf\x8dt"),
+		V2 ("\\uabcde", "\xea\xaf\x8d""e"),
+		V1 ("\\uabcdet", "\xea\xaf\x8d""et"),
+		V1 ("\\Ut", "\\Ut"),
+		V2 ("\\Ua", "\xa"),
+		V1 ("\\Uat", "\xat"),
+		V2 ("\\Uab", "\xc2\xab"),
+		V1 ("\\Uabt", "\xc2\xabt"),
+		V2 ("\\Uabc", "\xe0\xaa\xbc"),
+		V1 ("\\Uabct", "\xe0\xaa\xbct"),
+		V2 ("\\Uabcd", "\xea\xaf\x8d"),
+		V1 ("\\Uabcdt", "\xea\xaf\x8dt"),
+		V2 ("\\Uabcde", "\xf2\xab\xb3\x9e"),
+		V1 ("\\Uabcdet", "\xf2\xab\xb3\x9et"),
+		V2 ("\\Uabcde0", "\xf8\xaa\xbc\xb7\xa0"),
+		V1 ("\\Uabcde0t", "\xf8\xaa\xbc\xb7\xa0t"),
+		V2 ("\\Uabcde01", "\xfc\x8a\xaf\x8d\xb8\x81"),
+		V1 ("\\Uabcde01t", "\xfc\x8a\xaf\x8d\xb8\x81t"),
+		V2 ("\\U0abcde01", "\xfc\x8a\xaf\x8d\xb8\x81"),
+		V1 ("\\U0abcde01t", "\xfc\x8a\xaf\x8d\xb8\x81t"),
+		V1 ("\\U00abcde01", "\xf8\xaa\xbc\xb7\xa0""1"),
+		V1 ("\\U00abcde01t", "\xf8\xaa\xbc\xb7\xa0""1t"),
+
+		/* control-x sequence is not supported */
+		V1 ("\\c", "\\c"),
+		V1 ("\\c1", "\\c1"),
+	};
+#undef V0
+#undef V1
+#undef V2
+	gsize i;
+	nm_auto_free_gstring GString *str_val = g_string_new (NULL);
+	nm_auto_free_gstring GString *str_val2 = g_string_new (NULL);
+	nm_auto_free_gstring GString *str_exp = g_string_new (NULL);
+	nm_auto_free_gstring GString *str_exp2 = g_string_new (NULL);
+
+	do_svUnescape_assert ( "'  ''  '", "    ");
+
+	for (i = 0; i < G_N_ELEMENTS (data_full); i++)
+		do_svUnescape_assert (data_full[i].val, data_full[i].exp);
+
+	for (i = 0; i < G_N_ELEMENTS (data_ansi); i++) {
+		do_svUnescape_combine_ansi (str_val, str_exp, data_ansi, G_N_ELEMENTS (data_ansi), i);
+		do_svUnescape_assert (str_val->str, str_exp->str);
+	}
+
+	/* different values can be just concatenated... */
+	for (i = 0; i < 200; i++) {
+		gsize num_concat = (nmtst_get_rand_int () % 5) + 2;
+
+		g_string_set_size (str_val, 0);
+		g_string_set_size (str_exp, 0);
+
+		while (num_concat > 0) {
+			gsize idx;
+
+			if ((nmtst_get_rand_int () % 3 == 0)) {
+				do_svUnescape_combine_ansi (str_val2, str_exp2, data_ansi, G_N_ELEMENTS (data_ansi), -((int) ((nmtst_get_rand_int () % 5) + 1)));
+				continue;
 			}
 
-			/*g_message (">>%s<<", s);*/
-			test_svUnescape_assert (s);
+			idx = nmtst_get_rand_int () % G_N_ELEMENTS (data_full);
+			if (!data_full[idx].can_concat)
+				continue;
+			g_string_append (str_val, data_full[idx].val);
+			g_string_append (str_exp, data_full[idx].exp);
+			num_concat--;
+		}
+
+		switch (nmtst_get_rand_int () % 3) {
+		case 0:
+			g_string_append (str_val, " ");
+			break;
+		case 1:
+			g_string_append (str_val, "    ");
+			break;
+		}
+		switch (nmtst_get_rand_int () % 3) {
+		case 0:
+			g_string_append (str_val, " #");
+			break;
+		case 1:
+			g_string_append (str_val, " #foo");
+			break;
 		}
+		do_svUnescape_assert (str_val->str, str_exp->str);
+	}
+}
+
+/*****************************************************************************/
+
+static void
+test_write_unknown (gconstpointer test_data)
+{
+	nmtst_auto_unlinkfile char *filename_tmp_1 = g_strdup (TEST_SCRATCH_DIR_TMP"/tmp-1");
+	const char *testfile = test_data;
+	gs_free char *testfile_expected = g_strconcat (testfile, ".expected", NULL);
+	shvarFile *sv;
+	gs_free_error GError *error = NULL;
+	gboolean success;
+	gs_free char *file_contents_out = NULL;
+	gs_free char *file_contents_exp = NULL;
+
+	sv = _svOpenFile (testfile);
+
+	svFileSetName (sv, filename_tmp_1);
+	svFileSetModified (sv);
+
+	if (g_str_has_suffix (testfile, "ifcfg-test-write-unknown-4")) {
+		_svGetValue_check (sv, "NAME", "l4x");
+		_svGetValue_check (sv, "NAME2", NULL);
+		_svGetValue_check (sv, "NAME3", "name3-value");
 
-		g_free (s);
+		svSetValue (sv, "NAME", "set-by-test1");
+		svSetValue (sv, "NAME2", NULL);
+		svSetValue (sv, "NAME2", "set-by-test2");
+		svSetValue (sv, "NAME3", "set-by-test3");
+
+		_svGetValue_check (sv, "some_key", NULL);
+		_svGetValue_check (sv, "some_key1", "");
+		_svGetValue_check (sv, "some_key2", "");
+		_svGetValue_check (sv, "some_key3", "x");
+
+		_svGetValue_check (sv, "NAME", "set-by-test1");
+		_svGetValue_check (sv, "NAME2", "set-by-test2");
+		_svGetValue_check (sv, "NAME3", "set-by-test3");
 	}
 
-	g_rand_free (r);
+	success = svWriteFile (sv, 0644, &error);
+	nmtst_assert_success (success, error);
+
+	file_contents_out = nmtst_file_get_contents (filename_tmp_1);
+	file_contents_exp = nmtst_file_get_contents (testfile_expected);
+
+	g_assert_cmpstr (file_contents_out, ==, file_contents_exp);
+
+	svCloseFile (sv);
 }
 
+/*****************************************************************************/
+
 static void
 test_read_vlan_trailing_spaces (void)
 {
@@ -8842,10 +8766,123 @@ test_sit_read_ignore (void)
 
 /*****************************************************************************/
 
+static void
+do_test_utils_name (const char *desc,
+                    const char *path,
+                    gboolean only_ifcfg,
+                    const char *expected)
+{
+	const char *result;
+
+	result = utils_get_ifcfg_name (path, only_ifcfg);
+	g_assert_cmpstr (result, ==, expected);
+}
+
+static void
+test_utils_name (void)
+{
+	do_test_utils_name ("get-ifcfg-name-bad", "/foo/bar/adfasdfadf", FALSE, NULL);
+	do_test_utils_name ("get-ifcfg-name-good", "/foo/bar/ifcfg-FooBar", FALSE, "FooBar");
+	do_test_utils_name ("get-ifcfg-name-keys", "/foo/bar/keys-BlahLbah", FALSE, "BlahLbah");
+	do_test_utils_name ("get-ifcfg-name-route", "/foo/bar/route-Lalalala", FALSE, "Lalalala");
+	do_test_utils_name ("get-ifcfg-name-only-ifcfg-route", "/foo/bar/route-Lalalala", TRUE, NULL);
+	do_test_utils_name ("get-ifcfg-name-only-ifcfg-keys", "/foo/bar/keys-Lalalala", TRUE, NULL);
+	do_test_utils_name ("get-ifcfg-name-no-path-ifcfg", "ifcfg-Lalalala", FALSE, "Lalalala");
+	do_test_utils_name ("get-ifcfg-name-no-path-keys", "keys-Lalalala", FALSE, "Lalalala");
+	do_test_utils_name ("get-ifcfg-name-no-path-route", "route-Lalalala", FALSE, "Lalalala");
+
+	do_test_utils_name ("get-ifcfg-name-bad2-ifcfg", "/foo/bar/asdfasifcfg-Foobar", FALSE, NULL);
+	do_test_utils_name ("get-ifcfg-name-bad2-keys", "/foo/bar/asdfaskeys-Foobar", FALSE, NULL);
+	do_test_utils_name ("get-ifcfg-name-bad2-route", "/foo/bar/asdfasroute-Foobar", FALSE, NULL);
+}
+
+/*****************************************************************************/
+
+static void
+do_test_utils_path_ifcfg (const char *desc,
+                          const char *path,
+                          const char *expected)
+{
+	char *result;
+
+	result = utils_get_ifcfg_path (path);
+	g_assert_cmpstr (result, ==, expected);
+	g_free (result);
+}
+
+static void
+do_test_utils_path_keys (const char *desc,
+                         const char *path,
+                         const char *expected)
+{
+	char *result;
+
+	result = utils_get_keys_path (path);
+	g_assert_cmpstr (result, ==, expected);
+	g_free (result);
+}
+
+static void
+do_test_utils_path_route (const char *desc,
+                          const char *path,
+                          const char *expected)
+{
+	char *result;
+
+	result = utils_get_route_path (path);
+	g_assert_cmpstr (result, ==, expected);
+	g_free (result);
+}
+
+static void
+test_utils_path (void)
+{
+	do_test_utils_path_ifcfg ("ifcfg-path-bad", "/foo/bar/adfasdfasdf", NULL);
+	do_test_utils_path_ifcfg ("ifcfg-path-from-keys-no-path", "keys-BlahBlah", "ifcfg-BlahBlah");
+	do_test_utils_path_ifcfg ("ifcfg-path-from-keys", "/foo/bar/keys-BlahBlah", "/foo/bar/ifcfg-BlahBlah");
+	do_test_utils_path_ifcfg ("ifcfg-path-from-route", "/foo/bar/route-BlahBlah", "/foo/bar/ifcfg-BlahBlah");
+
+	do_test_utils_path_keys ("keys-path-bad", "/foo/bar/asdfasdfasdfasdf", NULL);
+	do_test_utils_path_keys ("keys-path-from-ifcfg-no-path", "ifcfg-FooBar", "keys-FooBar");
+	do_test_utils_path_keys ("keys-path-from-ifcfg", "/foo/bar/ifcfg-FooBar", "/foo/bar/keys-FooBar");
+	do_test_utils_path_keys ("keys-path-from-route", "/foo/bar/route-FooBar", "/foo/bar/keys-FooBar");
+
+	do_test_utils_path_route ("route-path-bad", "/foo/bar/asdfasdfasdfasdf", NULL);
+	do_test_utils_path_route ("route-path-from-ifcfg-no-path", "ifcfg-FooBar", "route-FooBar");
+	do_test_utils_path_route ("route-path-from-ifcfg", "/foo/bar/ifcfg-FooBar", "/foo/bar/route-FooBar");
+	do_test_utils_path_route ("route-path-from-keys", "/foo/bar/keys-FooBar", "/foo/bar/route-FooBar");
+}
+
+/*****************************************************************************/
+
+static void
+do_test_utils_ignored (const char *desc, const char *path, gboolean expected_ignored)
+{
+	gboolean result;
+
+	result = utils_should_ignore_file (path, FALSE);
+	g_assert (result == expected_ignored);
+}
+
+static void
+test_utils_ignore (void)
+{
+	do_test_utils_ignored ("ignored-ifcfg", "ifcfg-FooBar", FALSE);
+	do_test_utils_ignored ("ignored-keys", "keys-FooBar", FALSE);
+	do_test_utils_ignored ("ignored-route", "route-FooBar", FALSE);
+	do_test_utils_ignored ("ignored-bak", "ifcfg-FooBar" BAK_TAG, TRUE);
+	do_test_utils_ignored ("ignored-tilde", "ifcfg-FooBar" TILDE_TAG, TRUE);
+	do_test_utils_ignored ("ignored-orig", "ifcfg-FooBar" ORIG_TAG, TRUE);
+	do_test_utils_ignored ("ignored-rej", "ifcfg-FooBar" REJ_TAG, TRUE);
+	do_test_utils_ignored ("ignored-rpmnew", "ifcfg-FooBar" RPMNEW_TAG, TRUE);
+	do_test_utils_ignored ("ignored-augnew", "ifcfg-FooBar" AUGNEW_TAG, TRUE);
+	do_test_utils_ignored ("ignored-augtmp", "ifcfg-FooBar" AUGTMP_TAG, TRUE);
+}
+
+/*****************************************************************************/
 
 #define TPATH "/settings/plugins/ifcfg-rh/"
 
-#define TEST_IFCFG_WIFI_OPEN_SSID_BAD_HEX TEST_IFCFG_DIR"/network-scripts/ifcfg-test-wifi-open-ssid-bad-hex"
 #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"
 
@@ -8857,7 +8894,16 @@ int main (int argc, char **argv)
 {
 	nmtst_init_assert_logging (&argc, &argv, "INFO", "DEFAULT");
 
+	if (g_mkdir_with_parents (TEST_SCRATCH_DIR_TMP, 0755) != 0)
+		g_error ("failure to create test directory \"%s\": %s", TEST_SCRATCH_DIR_TMP, g_strerror (errno));
+
 	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_func (TPATH "vlan-trailing-spaces", test_read_vlan_trailing_spaces);
 
 	g_test_add_func (TPATH "unmanaged", test_read_unmanaged);
@@ -8883,6 +8929,7 @@ int main (int argc, char **argv)
 	g_test_add_func (TPATH "read-dhcp-plus-ip", test_read_wired_dhcp_plus_ip);
 	g_test_add_func (TPATH "read-shared-plus-ip", test_read_wired_shared_plus_ip);
 	g_test_add_func (TPATH "read-dhcp-send-hostname", test_read_write_wired_dhcp_send_hostname);
+	g_test_add_func (TPATH "read-dhcpv6-hostname-fallback", test_read_wired_dhcpv6_hostname_fallback);
 	g_test_add_func (TPATH "read-global-gateway", test_read_wired_global_gateway);
 	g_test_add_func (TPATH "read-global-gateway-ignore", test_read_wired_global_gateway_ignore);
 	g_test_add_func (TPATH "read-obsolete-gateway-n", test_read_wired_obsolete_gateway_n);
@@ -8919,7 +8966,7 @@ int main (int argc, char **argv)
 	g_test_add_func (TPATH "wifi/read/open", test_read_wifi_open);
 	g_test_add_func (TPATH "wifi/read/open/auto", test_read_wifi_open_auto);
 	g_test_add_func (TPATH "wifi/read/open/hex-ssid", test_read_wifi_open_ssid_hex);
-	g_test_add_data_func (TPATH "wifi/read/open-ssid/bad-hex", TEST_IFCFG_WIFI_OPEN_SSID_BAD_HEX, test_read_wifi_open_ssid_bad);
+	g_test_add_func (TPATH "wifi/read/open-ssid/bad-hex", test_read_wifi_open_ssid_hex_bad);
 	g_test_add_data_func (TPATH "wifi/read/open-ssid/long-hex", TEST_IFCFG_WIFI_OPEN_SSID_LONG_HEX, test_read_wifi_open_ssid_bad);
 	g_test_add_data_func (TPATH "wifi/read/open-ssid/long-quoted", TEST_IFCFG_WIFI_OPEN_SSID_LONG_QUOTED, test_read_wifi_open_ssid_bad);
 	g_test_add_func (TPATH "wifi/read/open/quoted-ssid", test_read_wifi_open_ssid_quoted);
@@ -8970,6 +9017,9 @@ int main (int argc, char **argv)
 	g_test_add_func (TPATH "vlan/read/reorder-hdr-1", test_read_vlan_reorder_hdr_1);
 	g_test_add_func (TPATH "vlan/read/reorder-hdr-2", test_read_vlan_reorder_hdr_2);
 	g_test_add_func (TPATH "wired/read/read-wake-on-lan", test_read_wired_wake_on_lan);
+	g_test_add_func (TPATH "wired/read/read-auto-negotiate-off", test_read_wired_auto_negotiate_off);
+	g_test_add_func (TPATH "wired/read/read-auto-negotiate-on", test_read_wired_auto_negotiate_on);
+	g_test_add_func (TPATH "wired/read/unkwnown-ethtool-opt", test_read_wired_unknown_ethtool_opt);
 
 	g_test_add_func (TPATH "wired/write/static", test_write_wired_static);
 	g_test_add_func (TPATH "wired/write/static-ip6-only", test_write_wired_static_ip6_only);
@@ -8989,6 +9039,8 @@ int main (int argc, char **argv)
 	g_test_add_func (TPATH "wired/write-aliases", test_write_wired_aliases);
 	g_test_add_func (TPATH "ipv4/write-static-addresses-GATEWAY", test_write_gateway);
 	g_test_add_func (TPATH "wired/write-wake-on-lan", test_write_wired_wake_on_lan);
+	g_test_add_func (TPATH "wired/write-auto-negotiate-off", test_write_wired_auto_negotiate_off);
+	g_test_add_func (TPATH "wired/write-auto-negotiate-on", test_write_wired_auto_negotiate_on);
 	g_test_add_func (TPATH "wifi/write/open", test_write_wifi_open);
 	g_test_add_func (TPATH "wifi/write/open/hex-ssid", test_write_wifi_open_hex_ssid);
 	g_test_add_func (TPATH "wifi/write/wep", test_write_wifi_wep);
@@ -9082,6 +9134,9 @@ int main (int argc, char **argv)
 	g_test_add_func (TPATH "team/write-port", test_write_team_port);
 	g_test_add_func (TPATH "team/read-port-empty-config", test_read_team_port_empty_config);
 
+	g_test_add_func (TPATH "proxy/read-proxy-basic", test_read_proxy_basic);
+	g_test_add_func (TPATH "proxy/write-proxy-basic", test_write_proxy_basic);
+
 	g_test_add_func (TPATH "sit/read/ignore", test_sit_read_ignore);
 
 	/* Stuff we expect to fail for now */
@@ -9090,6 +9145,11 @@ int main (int argc, char **argv)
 	g_test_add_data_func (TPATH "wwan/write-gsm", GUINT_TO_POINTER (TRUE), test_write_mobile_broadband);
 	g_test_add_data_func (TPATH "wwan/write-cdma", GUINT_TO_POINTER (FALSE), test_write_mobile_broadband);
 
+	g_test_add_func (TPATH "no-trailing-newline", test_ifcfg_no_trailing_newline);
+
+	g_test_add_func (TPATH "utils/name", test_utils_name);
+	g_test_add_func (TPATH "utils/path", test_utils_path);
+	g_test_add_func (TPATH "utils/ignore", test_utils_ignore);
+
 	return g_test_run ();
 }
-