summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2015-05-03 21:27:39 +0200
committerThomas Haller <thaller@redhat.com>2015-06-17 11:41:42 +0200
commit977626d9429baa2d30c575d045aab12b12a044be (patch)
tree1266464ed7e50abf784010916ed5e37f7169f520
parent4fee05c35b9fee0786ff77b9b7631eb10002352d (diff)
downloadNetworkManager-977626d9429baa2d30c575d045aab12b12a044be.tar.gz
platform/test: add simple test for NMLinuxPlatform
Just create a NMLinuxPlatform instance and unref it again. This already connects to netlink and fetches all objects.
-rw-r--r--src/platform/tests/test-general.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/platform/tests/test-general.c b/src/platform/tests/test-general.c
index 2f29d7de70..9a6a79d44a 100644
--- a/src/platform/tests/test-general.c
+++ b/src/platform/tests/test-general.c
@@ -20,6 +20,9 @@
#include "nm-platform-utils.h"
+#include <linux/rtnetlink.h>
+
+#include "nm-linux-platform.h"
#include "nm-logging.h"
#include "nm-test-utils.h"
@@ -27,6 +30,16 @@
/******************************************************************/
+static void
+test_init_linux_platform ()
+{
+ gs_unref_object NMPlatform *platform = NULL;
+
+ platform = g_object_new (NM_TYPE_LINUX_PLATFORM, NULL);
+}
+
+/******************************************************************/
+
NMTST_DEFINE ();
int
@@ -34,5 +47,7 @@ main (int argc, char **argv)
{
nmtst_init_assert_logging (&argc, &argv, "INFO", "DEFAULT");
+ g_test_add_func ("/general/init_linux_platform", test_init_linux_platform);
+
return g_test_run ();
}