Commit 98d14b0c authored by Thomas Haller's avatar Thomas Haller

systemd/tests: add test_lldp_create() test

This test makes sense because "test-systemd" is not
linked against any other systemd library. So this test
verifies that our libsystemd clone is self contained.
parent e0abe36a
......@@ -20,6 +20,7 @@
#include "nm-default.h"
#include "sd-dhcp-client.h"
#include "sd-lldp.h"
#include "nm-test-utils.h"
......@@ -40,6 +41,22 @@ test_dhcp_create (void)
static void
test_lldp_create (void)
sd_lldp *lldp = NULL;
int ifindex = 1;
int r;
r = sd_lldp_new (ifindex, "lo", (struct ether_addr *) ((guint8[]) { 0x01, 0x02, 0x03, 0x04, 0x05, 0x06 }), &lldp);
g_assert (r == 0);
g_assert (lldp);
sd_lldp_unref (lldp);
......@@ -48,6 +65,7 @@ main (int argc, char **argv)
nmtst_init_assert_logging (&argc, &argv, "INFO", "ALL");
g_test_add_func ("/systemd/dhcp/create", test_dhcp_create);
g_test_add_func ("/systemd/lldp/create", test_lldp_create);
return g_test_run ();
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment