diff options
| author | Michael Biebl <biebl@debian.org> | 2016-08-26 02:18:32 +0200 |
|---|---|---|
| committer | Michael Biebl <biebl@debian.org> | 2016-08-26 02:18:32 +0200 |
| commit | 7514efc2f38c9ace4557d4e69d68e7d380389030 (patch) | |
| tree | 7fb00fda86cfcc2ca377f191633a7cfdbfea7ca3 /src/tests/test-systemd.c | |
| parent | d6201f5d8daada3d64a0a3e0038e14eebec683ce (diff) | |
Imported Upstream version 1.4.0 upstream/1.4.0
Diffstat (limited to 'src/tests/test-systemd.c')
| -rw-r--r-- | src/tests/test-systemd.c | 56 |
1 files changed, 53 insertions, 3 deletions
diff --git a/src/tests/test-systemd.c b/src/tests/test-systemd.c index 936bff20..744b55c9 100644 --- a/src/tests/test-systemd.c +++ b/src/tests/test-systemd.c @@ -25,7 +25,52 @@ #include "sd-lldp.h" #include "sd-event.h" -#include "nm-test-utils.h" +#include "nm-test-utils-core.h" + +/***************************************************************************** + * Stub implementations of libNetworkManagerBase symbols + *****************************************************************************/ + +gboolean +nm_utils_get_testing_initialized (void) +{ + return TRUE; +} + +void +_nm_utils_set_testing (NMUtilsTestFlags flags) +{ + g_assert_not_reached (); +} + +gint32 +nm_utils_get_monotonic_timestamp_s (void) +{ + return 1; +} + +NMLogDomain _nm_logging_enabled_state[_LOGL_N_REAL]; + +void +_nm_log_impl (const char *file, + guint line, + const char *func, + NMLogLevel level, + NMLogDomain domain, + int error, + const char *fmt, + ...) +{ +} + +gboolean +nm_logging_setup (const char *level, + const char *domains, + char **bad_domains, + GError **error) +{ + return TRUE; +} /*****************************************************************************/ @@ -39,6 +84,12 @@ test_dhcp_create (void) g_assert (r == 0); g_assert (client4); + if (/* never true */ client4 == (gpointer) &r) { + /* we don't want to call this, but ensure that the linker + * includes all these symbols. */ + sd_dhcp_client_start (client4); + } + sd_dhcp_client_unref (client4); } @@ -48,10 +99,9 @@ static void test_lldp_create (void) { sd_lldp *lldp = NULL; - int ifindex = 1; int r; - r = sd_lldp_new (&lldp, ifindex); + r = sd_lldp_new (&lldp); g_assert (r == 0); g_assert (lldp); |