[network-manager-applet] shared: reorder and reimport shared files



commit 236924743a35e5aeeab8b0ac32f29d860c985d73
Author: Thomas Haller <thaller redhat com>
Date:   Fri Jun 17 09:12:54 2016 +0200

    shared: reorder and reimport shared files
    
    On their origin, the shared files were reorganized and put
    in a subdirectory "shared/nm-utils/". Do the same here, so
    that the directory layout is identical to what we have in
    NetworkManager's and the VPN plugin's repositories.

 shared/Makefile.am                                |   11 +-
 shared/nm-default.h                               |    5 +-
 shared/{ => nm-utils}/gsystem-local-alloc.h       |    0
 shared/{ => nm-utils}/nm-glib.h                   |   20 ++
 shared/{ => nm-utils}/nm-macros-internal.h        |   32 +++
 shared/{ => nm-utils}/nm-test-utils.h             |  307 +++++----------------
 shared/{ => nm-utils}/nm-vpn-editor-plugin-call.h |    1 -
 src/connection-editor/connection-helpers.c        |    3 +-
 src/connection-editor/main.c                      |    1 -
 src/connection-editor/page-vpn.c                  |    5 +-
 src/libnm-gtk/tests/test-mobile-providers.c       |    2 +-
 src/utils/tests/test-utils.c                      |    2 +-
 12 files changed, 143 insertions(+), 246 deletions(-)
---
diff --git a/shared/Makefile.am b/shared/Makefile.am
index c38fcea..d8df46d 100644
--- a/shared/Makefile.am
+++ b/shared/Makefile.am
@@ -1,7 +1,8 @@
 EXTRA_DIST = \
-     gsystem-local-alloc.h \
+     nm-utils/gsystem-local-alloc.h \
+     nm-utils/nm-glib.h \
+     nm-utils/nm-macros-internal.h \
+     nm-utils/nm-test-utils.h \
+     nm-utils/nm-vpn-editor-plugin-call.h \
      nm-default.h \
-     nm-glib.h \
-     nm-macros-internal.h \
-     nm-test-utils.h \
-     nm-vpn-editor-plugin-call.h
+     $(NULL)
diff --git a/shared/nm-default.h b/shared/nm-default.h
index a673eb0..7c6f7fd 100644
--- a/shared/nm-default.h
+++ b/shared/nm-default.h
@@ -46,10 +46,9 @@
 
 #include <stdlib.h>
 
-#include "nm-glib.h"
+#include "nm-utils/nm-macros-internal.h"
+
 #include "nm-version.h"
-#include "gsystem-local-alloc.h"
-#include "nm-macros-internal.h"
 
 #include <gtk/gtk.h>
 
diff --git a/shared/gsystem-local-alloc.h b/shared/nm-utils/gsystem-local-alloc.h
similarity index 100%
rename from shared/gsystem-local-alloc.h
rename to shared/nm-utils/gsystem-local-alloc.h
diff --git a/shared/nm-glib.h b/shared/nm-utils/nm-glib.h
similarity index 97%
rename from shared/nm-glib.h
rename to shared/nm-utils/nm-glib.h
index c92d6f0..46a8bb2 100644
--- a/shared/nm-glib.h
+++ b/shared/nm-utils/nm-glib.h
@@ -24,6 +24,8 @@
 #include <gio/gio.h>
 #include <string.h>
 
+#include "gsystem-local-alloc.h"
+
 #ifdef __clang__
 
 #undef G_GNUC_BEGIN_IGNORE_DEPRECATIONS
@@ -374,4 +376,22 @@ _nm_g_hash_table_get_keys_as_array (GHashTable *hash_table,
                                __VA_ARGS__)
 #endif
 
+#if !GLIB_CHECK_VERSION(2, 44, 0)
+static inline gpointer
+g_steal_pointer (gpointer pp)
+{
+       gpointer *ptr = (gpointer *) pp;
+       gpointer ref;
+
+       ref = *ptr;
+       *ptr = NULL;
+
+       return ref;
+}
+
+/* type safety */
+#define g_steal_pointer(pp) \
+  (0 ? (*(pp)) : (g_steal_pointer) (pp))
+#endif
+
 #endif  /* __NM_GLIB_H__ */
diff --git a/shared/nm-macros-internal.h b/shared/nm-utils/nm-macros-internal.h
similarity index 95%
rename from shared/nm-macros-internal.h
rename to shared/nm-utils/nm-macros-internal.h
index 04e6a1a..603689a 100644
--- a/shared/nm-macros-internal.h
+++ b/shared/nm-utils/nm-macros-internal.h
@@ -24,6 +24,8 @@
 
 #include <stdlib.h>
 
+#include "nm-glib.h"
+
 /********************************************************/
 
 #define _nm_packed __attribute__ ((packed))
@@ -484,6 +486,36 @@ nm_strstrip (char *str)
        return str ? g_strstrip (str) : NULL;
 }
 
+/* g_ptr_array_sort()'s compare function takes pointers to the
+ * value. Thus, you cannot use strcmp directly. You can use
+ * nm_strcmp_p().
+ *
+ * Like strcmp(), this function is not forgiving to accept %NULL. */
+static inline int
+nm_strcmp_p (gconstpointer a, gconstpointer b)
+{
+       const char *s1 = *((const char **) a);
+       const char *s2 = *((const char **) b);
+
+       return strcmp (s1, s2);
+}
+
+/* like nm_strcmp_p(), suitable for g_ptr_array_sort_with_data().
+ * g_ptr_array_sort() just casts nm_strcmp_p() to a function of different
+ * signature. I guess, in glib there are knowledgeable people that ensure
+ * that this additional argument doesn't cause problems due to different ABI
+ * for every architecture that glib supports.
+ * For NetworkManager, we'd rather avoid such stunts.
+ **/
+static inline int
+nm_strcmp_p_with_data (gconstpointer a, gconstpointer b, gpointer user_data)
+{
+       const char *s1 = *((const char **) a);
+       const char *s2 = *((const char **) b);
+
+       return strcmp (s1, s2);
+}
+
 /*****************************************************************************/
 
 static inline guint
diff --git a/shared/nm-test-utils.h b/shared/nm-utils/nm-test-utils.h
similarity index 87%
rename from shared/nm-test-utils.h
rename to shared/nm-utils/nm-test-utils.h
index 6e705dc..dba41c4 100644
--- a/shared/nm-test-utils.h
+++ b/shared/nm-utils/nm-test-utils.h
@@ -71,6 +71,8 @@
  *
  * "TRACE", this is shorthand for "log-level=TRACE".
  *
+ * "D", this is shorthand for "log-level=TRACE,no-expect-message".
+ *
  * "sudo-cmd=PATH": when running root tests as normal user, the test will execute
  *   itself by invoking sudo at PATH.
  *   For example
@@ -90,6 +92,11 @@
 
 #include "nm-default.h"
 
+#if defined(NM_ASSERT_NO_MSG) && NM_ASSERT_NO_MSG
+#undef g_return_if_fail_warning
+#undef g_assertion_message_expr
+#endif
+
 #include <arpa/inet.h>
 #include <stdio.h>
 #include <unistd.h>
@@ -99,12 +106,10 @@
 
 #include "nm-utils.h"
 
-#ifdef __NETWORKMANAGER_LOGGING_H__
-/* We are running tests under src/. Let's include some files by default.
- * They are useful, and affect how nm-test-utils.h itself behaves. */
-#include "NetworkManagerUtils.h"
-#include "nm-keyfile-internal.h"
-#endif
+/*******************************************************************************/
+
+#define NMTST_G_RETURN_MSG_S(expr) "*: assertion '"NM_ASSERT_G_RETURN_EXPR(expr)"' failed"
+#define NMTST_G_RETURN_MSG(expr)   NMTST_G_RETURN_MSG_S(#expr)
 
 /*******************************************************************************/
 
@@ -151,13 +156,11 @@
                        g_assert_not_reached (); \
        } G_STMT_END
 
-inline static void
-_nmtst_assert_success (gboolean success, GError *error, const char *file, int line)
-{
-       if (!success || error)
-               g_error ("(%s:%d) FAILURE success=%d, error=%s", file, line, success, error ? error->message 
: "(no error)");
-}
-#define nmtst_assert_success(success, error) _nmtst_assert_success ((success), (error), __FILE__, __LINE__)
+#define nmtst_assert_success(success, error) \
+       G_STMT_START { \
+               g_assert_no_error (error); \
+               g_assert ((success)); \
+       } G_STMT_END
 
 #define nmtst_assert_no_success(success, error) \
        G_STMT_START { \
@@ -341,9 +344,14 @@ __nmtst_init (int *argc, char ***argv, gboolean assert_logging, const char *log_
                        } else if (!g_ascii_strncasecmp (debug, "log-level=", strlen ("log-level="))) {
                                g_free (c_log_level);
                                log_level = c_log_level = g_strdup (&debug[strlen ("log-level=")]);
+                       } else if (!g_ascii_strcasecmp (debug, "D")) {
+                               /* shorthand for "log-level=TRACE,no-expect-message" */
+                               g_free (c_log_level);
+                               log_level = c_log_level = g_strdup ("TRACE");
+                               no_expect_message = TRUE;
                        } else if (!g_ascii_strcasecmp (debug, "TRACE")) {
                                g_free (c_log_level);
-                               log_level = c_log_level = g_strdup (debug);
+                               log_level = c_log_level = g_strdup ("TRACE");
                        } else if (!g_ascii_strncasecmp (debug, "log-domains=", strlen ("log-domains="))) {
                                g_free (c_log_domains);
                                log_domains = c_log_domains = g_strdup (&debug[strlen ("log-domains=")]);
@@ -505,7 +513,7 @@ __nmtst_init (int *argc, char ***argv, gboolean assert_logging, const char *log_
 
        if (!__nmtst_internal.assert_logging) {
                gboolean success = TRUE;
-#ifdef __NETWORKMANAGER_LOGGING_H__
+#ifdef _NMTST_INSIDE_CORE
                success = nm_logging_setup (log_level, log_domains, NULL, NULL);
                *out_set_logging = TRUE;
 #endif
@@ -522,7 +530,7 @@ __nmtst_init (int *argc, char ***argv, gboolean assert_logging, const char *log_
                 * This transforms g_test_expect_message() into a NOP, but we also have to relax
                 * g_log_set_always_fatal(), which was set by g_test_init(). */
                g_log_set_always_fatal (G_LOG_FATAL_MASK);
-#ifdef __NETWORKMANAGER_LOGGING_H__
+#ifdef _NMTST_INSIDE_CORE
                if (c_log_domains || c_log_level) {
                        /* Normally, tests with assert_logging do not overwrite the logging level/domains 
because
                         * the logging statements are part of the assertions. But if the test is run with
@@ -583,27 +591,7 @@ __nmtst_init (int *argc, char ***argv, gboolean assert_logging, const char *log_
 #endif
 }
 
-#ifdef __NETWORKMANAGER_LOGGING_H__
-inline static void
-nmtst_init_with_logging (int *argc, char ***argv, const char *log_level, const char *log_domains)
-{
-       __nmtst_init (argc, argv, FALSE, log_level, log_domains, NULL);
-}
-inline static void
-nmtst_init_assert_logging (int *argc, char ***argv, const char *log_level, const char *log_domains)
-{
-       gboolean set_logging;
-
-       __nmtst_init (argc, argv, TRUE, NULL, NULL, &set_logging);
-
-       if (!set_logging) {
-               gboolean success;
-
-               success = nm_logging_setup (log_level, log_domains, NULL, NULL);
-               g_assert (success);
-       }
-}
-#else
+#ifndef _NMTST_INSIDE_CORE
 inline static void
 nmtst_init (int *argc, char ***argv, gboolean assert_logging)
 {
@@ -775,6 +763,34 @@ nmtst_get_rand_int (void)
        return g_rand_int (nmtst_get_rand ());
 }
 
+inline static gpointer
+nmtst_rand_buf (GRand *rand, gpointer buffer, gsize buffer_length)
+{
+       guint32 v;
+       guint8 *b = buffer;
+
+       if (!buffer_length)
+               return buffer;
+
+       g_assert (buffer);
+
+       if (!rand)
+               rand = nmtst_get_rand ();
+
+       for (; buffer_length >= sizeof (guint32); buffer_length -= sizeof (guint32), b += sizeof (guint32)) {
+               v = g_rand_int (rand);
+               memcpy (b, &v, sizeof (guint32));
+       }
+       if (buffer_length > 0) {
+               v = g_rand_int (rand);
+               do {
+                       *(b++) = v & 0xFF;
+                       v >>= 8;
+               } while (--buffer_length > 0);
+       }
+       return buffer;
+}
+
 inline static void *
 nmtst_rand_perm (GRand *rand, void *dst, const void *src, gsize elmt_size, gsize n_elmt)
 {
@@ -1142,200 +1158,6 @@ _nmtst_assert_resolve_relative_path_equals (const char *f1, const char *f2, cons
 
 /*******************************************************************************/
 
-#ifdef __NETWORKMANAGER_PLATFORM_H__
-
-inline static NMPlatformIP6Address *
-nmtst_platform_ip6_address (const char *address, const char *peer_address, guint plen)
-{
-       static NMPlatformIP6Address addr;
-
-       memset (&addr, 0, sizeof (addr));
-       addr.address = *nmtst_inet6_from_string (address);
-       addr.peer_address = *nmtst_inet6_from_string (peer_address);
-       addr.plen = plen;
-
-       return &addr;
-}
-
-inline static NMPlatformIP6Address *
-nmtst_platform_ip6_address_full (const char *address, const char *peer_address, guint plen,
-                                 int ifindex, NMIPConfigSource source, guint32 timestamp,
-                                 guint32 lifetime, guint32 preferred, guint32 flags)
-{
-       NMPlatformIP6Address *addr = nmtst_platform_ip6_address (address, peer_address, plen);
-
-       addr->ifindex = ifindex;
-       addr->source = source;
-       addr->timestamp = timestamp;
-       addr->lifetime = lifetime;
-       addr->preferred = preferred;
-       addr->n_ifa_flags = flags;
-
-       return addr;
-}
-
-inline static NMPlatformIP4Route *
-nmtst_platform_ip4_route (const char *network, guint plen, const char *gateway)
-{
-       static NMPlatformIP4Route route;
-
-       memset (&route, 0, sizeof (route));
-       route.network = nmtst_inet4_from_string (network);
-       route.plen = plen;
-       route.gateway = nmtst_inet4_from_string (gateway);
-
-       return &route;
-}
-
-inline static NMPlatformIP4Route *
-nmtst_platform_ip4_route_full (const char *network, guint plen, const char *gateway,
-                               int ifindex, NMIPConfigSource source,
-                               guint metric, guint mss,
-                               guint8 scope,
-                               const char *pref_src)
-{
-       NMPlatformIP4Route *route = nmtst_platform_ip4_route (network, plen, gateway);
-
-       route->ifindex = ifindex;
-       route->source = source;
-       route->metric = metric;
-       route->mss = mss;
-       route->scope_inv = nm_platform_route_scope_inv (scope);
-       route->pref_src = nmtst_inet4_from_string (pref_src);
-
-       return route;
-}
-
-inline static NMPlatformIP6Route *
-nmtst_platform_ip6_route (const char *network, guint plen, const char *gateway)
-{
-       static NMPlatformIP6Route route;
-
-       memset (&route, 0, sizeof (route));
-       route.network = *nmtst_inet6_from_string (network);
-       route.plen = plen;
-       route.gateway = *nmtst_inet6_from_string (gateway);
-
-       return &route;
-}
-
-inline static NMPlatformIP6Route *
-nmtst_platform_ip6_route_full (const char *network, guint plen, const char *gateway,
-                               int ifindex, NMIPConfigSource source,
-                               guint metric, guint mss)
-{
-       NMPlatformIP6Route *route = nmtst_platform_ip6_route (network, plen, gateway);
-
-       route->ifindex = ifindex;
-       route->source = source;
-       route->metric = metric;
-       route->mss = mss;
-
-       return route;
-}
-
-inline static int
-_nmtst_platform_ip4_routes_equal_sort (gconstpointer a, gconstpointer b, gpointer user_data)
-{
-       return nm_platform_ip4_route_cmp ((const NMPlatformIP4Route *) a, (const NMPlatformIP4Route *) b);
-}
-
-inline static void
-nmtst_platform_ip4_routes_equal (const NMPlatformIP4Route *a, const NMPlatformIP4Route *b, gsize len, 
gboolean ignore_order)
-{
-       gsize i;
-       gs_free const NMPlatformIP4Route *c_a = NULL, *c_b = NULL;
-
-       g_assert (a);
-       g_assert (b);
-
-       if (ignore_order) {
-               a = c_a = g_memdup (a, sizeof (NMPlatformIP4Route) * len);
-               b = c_b = g_memdup (b, sizeof (NMPlatformIP4Route) * len);
-               g_qsort_with_data (c_a, len, sizeof (NMPlatformIP4Route), 
_nmtst_platform_ip4_routes_equal_sort, NULL);
-               g_qsort_with_data (c_b, len, sizeof (NMPlatformIP4Route), 
_nmtst_platform_ip4_routes_equal_sort, NULL);
-       }
-
-       for (i = 0; i < len; i++) {
-               if (nm_platform_ip4_route_cmp (&a[i], &b[i]) != 0) {
-                       char buf[sizeof (_nm_utils_to_string_buffer)];
-
-                       g_error ("Error comparing IPv4 route[%lu]: %s vs %s", (long unsigned) i,
-                                nm_platform_ip4_route_to_string (&a[i], NULL, 0),
-                                nm_platform_ip4_route_to_string (&b[i], buf, sizeof (buf)));
-                       g_assert_not_reached ();
-               }
-       }
-}
-
-inline static int
-_nmtst_platform_ip6_routes_equal_sort (gconstpointer a, gconstpointer b, gpointer user_data)
-{
-       return nm_platform_ip6_route_cmp ((const NMPlatformIP6Route *) a, (const NMPlatformIP6Route *) b);
-}
-
-inline static void
-nmtst_platform_ip6_routes_equal (const NMPlatformIP6Route *a, const NMPlatformIP6Route *b, gsize len, 
gboolean ignore_order)
-{
-       gsize i;
-       gs_free const NMPlatformIP6Route *c_a = NULL, *c_b = NULL;
-
-       g_assert (a);
-       g_assert (b);
-
-       if (ignore_order) {
-               a = c_a = g_memdup (a, sizeof (NMPlatformIP6Route) * len);
-               b = c_b = g_memdup (b, sizeof (NMPlatformIP6Route) * len);
-               g_qsort_with_data (c_a, len, sizeof (NMPlatformIP6Route), 
_nmtst_platform_ip6_routes_equal_sort, NULL);
-               g_qsort_with_data (c_b, len, sizeof (NMPlatformIP6Route), 
_nmtst_platform_ip6_routes_equal_sort, NULL);
-       }
-
-       for (i = 0; i < len; i++) {
-               if (nm_platform_ip6_route_cmp (&a[i], &b[i]) != 0) {
-                       char buf[sizeof (_nm_utils_to_string_buffer)];
-
-                       g_error ("Error comparing IPv6 route[%lu]: %s vs %s", (long unsigned) i,
-                                nm_platform_ip6_route_to_string (&a[i], NULL, 0),
-                                nm_platform_ip6_route_to_string (&b[i], buf, sizeof (buf)));
-                       g_assert_not_reached ();
-               }
-       }
-}
-
-#endif
-
-
-#ifdef __NETWORKMANAGER_IP4_CONFIG_H__
-
-inline static NMIP4Config *
-nmtst_ip4_config_clone (NMIP4Config *config)
-{
-       NMIP4Config *copy = nm_ip4_config_new (-1);
-
-       g_assert (copy);
-       g_assert (config);
-       nm_ip4_config_replace (copy, config, NULL);
-       return copy;
-}
-
-#endif
-
-
-#ifdef __NETWORKMANAGER_IP6_CONFIG_H__
-
-inline static NMIP6Config *
-nmtst_ip6_config_clone (NMIP6Config *config)
-{
-       NMIP6Config *copy = nm_ip6_config_new (-1);
-
-       g_assert (copy);
-       g_assert (config);
-       nm_ip6_config_replace (copy, config, NULL);
-       return copy;
-}
-
-#endif
-
 #ifdef NM_SETTING_IP_CONFIG_H
 inline static void
 nmtst_setting_ip_config_add_address (NMSettingIPConfig *s_ip,
@@ -1786,6 +1608,27 @@ nmtst_create_connection_from_keyfile (const char *keyfile_str, const char *keyfi
 
 #ifdef __NM_CONNECTION_H__
 
+inline static GVariant *
+_nmtst_variant_new_vardict (int dummy, ...)
+{
+       GVariantBuilder builder;
+       va_list ap;
+       const char *name;
+       GVariant *variant;
+
+       g_variant_builder_init (&builder, G_VARIANT_TYPE_VARDICT);
+
+       va_start (ap, dummy);
+       while ((name = va_arg (ap, const char *))) {
+               variant = va_arg (ap, GVariant *);
+               g_variant_builder_add (&builder, "{sv}", name, variant);
+       }
+       va_end (ap);
+
+       return g_variant_builder_end (&builder);
+}
+#define nmtst_variant_new_vardict(...) _nmtst_variant_new_vardict (0, __VA_ARGS__, NULL)
+
 #define nmtst_assert_variant_is_of_type(variant, type) \
        G_STMT_START { \
                GVariant *_variantx = (variant); \
@@ -1856,6 +1699,8 @@ typedef enum {
                         \
                        if (__cur_setting_name) \
                                g_variant_builder_add (&__connection_builder, "{sa{sv}}", __cur_setting_name, 
&__setting_builder); \
+                       else \
+                               g_variant_builder_clear (&__setting_builder); \
                        g_variant_iter_free (__setting_iter); \
                } \
                 \
diff --git a/shared/nm-vpn-editor-plugin-call.h b/shared/nm-utils/nm-vpn-editor-plugin-call.h
similarity index 99%
rename from shared/nm-vpn-editor-plugin-call.h
rename to shared/nm-utils/nm-vpn-editor-plugin-call.h
index c6b7ee7..78d041d 100644
--- a/shared/nm-vpn-editor-plugin-call.h
+++ b/shared/nm-utils/nm-vpn-editor-plugin-call.h
@@ -32,7 +32,6 @@
 #include <NetworkManager.h>
 
 /* we make use of other internal header files, you need those too. */
-#include "gsystem-local-alloc.h"
 #include "nm-macros-internal.h"
 
 /*****************************************************************************/
diff --git a/src/connection-editor/connection-helpers.c b/src/connection-editor/connection-helpers.c
index b99cd62..89d499a 100644
--- a/src/connection-editor/connection-helpers.c
+++ b/src/connection-editor/connection-helpers.c
@@ -21,6 +21,7 @@
 #include "nm-default.h"
 
 #include "connection-helpers.h"
+
 #include "nm-connection-list.h"
 #include "nm-connection-editor.h"
 #include "page-ethernet.h"
@@ -35,7 +36,7 @@
 #include "page-vlan.h"
 #include "page-vpn.h"
 #include "vpn-helpers.h"
-#include "nm-vpn-editor-plugin-call.h"
+#include "nm-utils/nm-vpn-editor-plugin-call.h"
 
 #define COL_MARKUP     0
 #define COL_SENSITIVE  1
diff --git a/src/connection-editor/main.c b/src/connection-editor/main.c
index 0735ae3..185e95e 100644
--- a/src/connection-editor/main.c
+++ b/src/connection-editor/main.c
@@ -28,7 +28,6 @@
 
 #include <glib-unix.h>
 
-#include "gsystem-local-alloc.h"
 #include "nm-connection-list.h"
 #include "nm-connection-editor.h"
 
diff --git a/src/connection-editor/page-vpn.c b/src/connection-editor/page-vpn.c
index 44c9684..518b7fb 100644
--- a/src/connection-editor/page-vpn.c
+++ b/src/connection-editor/page-vpn.c
@@ -22,13 +22,14 @@
 
 #include "nm-default.h"
 
+#include "page-vpn.h"
+
 #include <string.h>
 
-#include "page-vpn.h"
 #include "connection-helpers.h"
 #include "nm-connection-editor.h"
 #include "vpn-helpers.h"
-#include "nm-vpn-editor-plugin-call.h"
+#include "nm-utils/nm-vpn-editor-plugin-call.h"
 
 G_DEFINE_TYPE (CEPageVpn, ce_page_vpn, CE_TYPE_PAGE)
 
diff --git a/src/libnm-gtk/tests/test-mobile-providers.c b/src/libnm-gtk/tests/test-mobile-providers.c
index b9fabfb..c99e09b 100644
--- a/src/libnm-gtk/tests/test-mobile-providers.c
+++ b/src/libnm-gtk/tests/test-mobile-providers.c
@@ -20,7 +20,7 @@
 
 #include "nm-mobile-providers.h"
 
-#include "nm-test-utils.h"
+#include "nm-utils/nm-test-utils.h"
 
 #if defined TEST_DATA_DIR
 #  define COUNTRY_CODES_FILE     TEST_DATA_DIR "/iso3166-test.xml"
diff --git a/src/utils/tests/test-utils.c b/src/utils/tests/test-utils.c
index c63b1ef..86090aa 100644
--- a/src/utils/tests/test-utils.c
+++ b/src/utils/tests/test-utils.c
@@ -26,7 +26,7 @@
 
 #include "utils.h"
 
-#include "nm-test-utils.h"
+#include "nm-utils/nm-test-utils.h"
 
 typedef struct {
        char *foobar_infra_open;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]