mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-09 21:40:22 +01:00
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.
This commit is contained in:
parent
4fee05c35b
commit
977626d942
1 changed files with 15 additions and 0 deletions
|
|
@ -20,11 +20,24 @@
|
|||
|
||||
#include "nm-platform-utils.h"
|
||||
|
||||
#include <linux/rtnetlink.h>
|
||||
|
||||
#include "nm-linux-platform.h"
|
||||
#include "nm-logging.h"
|
||||
|
||||
#include "nm-test-utils.h"
|
||||
|
||||
|
||||
/******************************************************************/
|
||||
|
||||
static void
|
||||
test_init_linux_platform ()
|
||||
{
|
||||
gs_unref_object NMPlatform *platform = NULL;
|
||||
|
||||
platform = g_object_new (NM_TYPE_LINUX_PLATFORM, NULL);
|
||||
}
|
||||
|
||||
/******************************************************************/
|
||||
|
||||
NMTST_DEFINE ();
|
||||
|
|
@ -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 ();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue