diff options
| author | Sebastien Bacher <seb128@ubuntu.com> | 2019-03-12 15:13:33 +0100 |
|---|---|---|
| committer | Sebastien Bacher <seb128@ubuntu.com> | 2019-03-12 15:13:33 +0100 |
| commit | dd428301eb6f02542015121d7b08d9997f137e50 (patch) | |
| tree | 5530189f63510287d65268fc36025bdbc9414c00 /src/tests | |
| parent | bbae86d3d2997a853ca0365e8eb7a3ca7489ee09 (diff) | |
New upstream version 1.15.91
Diffstat (limited to 'src/tests')
| -rw-r--r-- | src/tests/config/meson.build | 1 | ||||
| -rw-r--r-- | src/tests/config/nm-test-device.c | 3 | ||||
| -rw-r--r-- | src/tests/meson.build | 1 | ||||
| -rw-r--r-- | src/tests/test-dcb.c | 2 | ||||
| -rw-r--r-- | src/tests/test-general-with-expect.c | 5 | ||||
| -rw-r--r-- | src/tests/test-general.c | 18 | ||||
| -rw-r--r-- | src/tests/test-ip4-config.c | 1 | ||||
| -rw-r--r-- | src/tests/test-ip6-config.c | 1 | ||||
| -rw-r--r-- | src/tests/test-systemd.c | 12 | ||||
| -rw-r--r-- | src/tests/test-utils.c | 2 |
10 files changed, 23 insertions, 23 deletions
diff --git a/src/tests/config/meson.build b/src/tests/config/meson.build index dc0a022c..f65f90bb 100644 --- a/src/tests/config/meson.build +++ b/src/tests/config/meson.build @@ -17,4 +17,5 @@ test( 'config/' + test_unit, test_script, args: test_args + [exe.full_path()], + timeout: default_test_timeout, ) diff --git a/src/tests/config/nm-test-device.c b/src/tests/config/nm-test-device.c index 49631583..3a8ef266 100644 --- a/src/tests/config/nm-test-device.c +++ b/src/tests/config/nm-test-device.c @@ -22,8 +22,6 @@ #include "nm-test-device.h" -#include <string.h> - #include "devices/nm-device-private.h" #include "nm-utils.h" @@ -77,6 +75,7 @@ nm_test_device_new (const char *hwaddr) return g_object_new (NM_TYPE_TEST_DEVICE, NM_DEVICE_IFACE, "dummy", NM_DEVICE_PERM_HW_ADDRESS, hwaddr, + NM_DEVICE_DEVICE_TYPE, NM_DEVICE_TYPE_ETHERNET, NULL); } diff --git a/src/tests/meson.build b/src/tests/meson.build index 9c51e8d4..153128f2 100644 --- a/src/tests/meson.build +++ b/src/tests/meson.build @@ -21,6 +21,7 @@ foreach test_unit: test_units 'src/' + test_unit, test_script, args: test_args + [exe.full_path()], + timeout: default_test_timeout, ) endforeach diff --git a/src/tests/test-dcb.c b/src/tests/test-dcb.c index 2ab0f890..6291f254 100644 --- a/src/tests/test-dcb.c +++ b/src/tests/test-dcb.c @@ -20,8 +20,6 @@ #include "nm-default.h" -#include <string.h> - #include "nm-dcb.h" #include "nm-test-utils-core.h" diff --git a/src/tests/test-general-with-expect.c b/src/tests/test-general-with-expect.c index ba8e3ce4..8339fa5d 100644 --- a/src/tests/test-general-with-expect.c +++ b/src/tests/test-general-with-expect.c @@ -20,8 +20,6 @@ #include "nm-default.h" -#include <string.h> -#include <errno.h> #include <time.h> #include <netinet/ether.h> #include <sys/types.h> @@ -42,7 +40,8 @@ test_nm_utils_monotonic_timestamp_as_boottime (void) clockid_t clockid; guint i; - if (clock_gettime (CLOCK_BOOTTIME, &tp) != 0 && errno == EINVAL) + if ( clock_gettime (CLOCK_BOOTTIME, &tp) != 0 + && errno == EINVAL) clockid = CLOCK_MONOTONIC; else clockid = CLOCK_BOOTTIME; diff --git a/src/tests/test-general.c b/src/tests/test-general.c index f065d127..0dee566e 100644 --- a/src/tests/test-general.c +++ b/src/tests/test-general.c @@ -20,8 +20,6 @@ #include "nm-default.h" -#include <string.h> -#include <errno.h> #include <net/if.h> #include <byteswap.h> @@ -1666,7 +1664,7 @@ test_duplicate_decl_specifier (void) /* have some static variables, so that the result is certainly not optimized out. */ static const int v_const[1] = { 1 }; static int v_result[1] = { }; - const const int v2 = 3; + const int v2 = 3; /* Test that we don't get a compiler warning about duplicate const specifier. * C99 allows that and it can easily happen in macros. */ @@ -2014,11 +2012,11 @@ test_machine_id_read (void) nmtst_logging_reenable (logstate); g_assert (machine_id); - g_assert (_nm_utils_bin2hexstr_full (machine_id, - sizeof (NMUuid), - '\0', - FALSE, - machine_id_str) == machine_id_str); + g_assert (nm_utils_bin2hexstr_full (machine_id, + sizeof (NMUuid), + '\0', + FALSE, + machine_id_str) == machine_id_str); g_assert (strlen (machine_id_str) == 32); g_assert_cmpstr (machine_id_str, ==, nm_utils_machine_id_str ()); @@ -2055,14 +2053,14 @@ test_nm_utils_dhcp_client_id_systemd_node_specific (gconstpointer test_data) guint64 duid_id; } d_array[] = { [0] = { - .machine_id = { 0xcb, 0xc2, 0x2e, 0x47, 0x41, 0x8e, 0x40, 0x2a, 0xa7, 0xb3, 0x0d, 0xea, 0x92, 0x83, 0x94, 0xef }, + .machine_id.uuid = { 0xcb, 0xc2, 0x2e, 0x47, 0x41, 0x8e, 0x40, 0x2a, 0xa7, 0xb3, 0x0d, 0xea, 0x92, 0x83, 0x94, 0xef }, .ifname = "lo", .ifname_hash_1 = 0x7297085c2b12c911llu, .iaid_ifname = htobe32 (0x5985c14du), .duid_id = htobe64 (0x3d769bb2c14d29e1u), }, [1] = { - .machine_id = { 0x11, 0x4e, 0xb4, 0xda, 0xd3, 0x22, 0x4a, 0xff, 0x9f, 0xc3, 0x30, 0x83, 0x38, 0xa0, 0xeb, 0xb7 }, + .machine_id.uuid = { 0x11, 0x4e, 0xb4, 0xda, 0xd3, 0x22, 0x4a, 0xff, 0x9f, 0xc3, 0x30, 0x83, 0x38, 0xa0, 0xeb, 0xb7 }, .ifname = "eth0", .ifname_hash_1 = 0x9e1cb083b54cd7b6llu, .iaid_ifname = htobe32 (0x2b506735u), diff --git a/src/tests/test-ip4-config.c b/src/tests/test-ip4-config.c index 9fea6af5..f98c84c3 100644 --- a/src/tests/test-ip4-config.c +++ b/src/tests/test-ip4-config.c @@ -20,7 +20,6 @@ #include "nm-default.h" -#include <string.h> #include <arpa/inet.h> #include "nm-ip4-config.h" diff --git a/src/tests/test-ip6-config.c b/src/tests/test-ip6-config.c index 51807dea..8f5f41d7 100644 --- a/src/tests/test-ip6-config.c +++ b/src/tests/test-ip6-config.c @@ -20,7 +20,6 @@ #include "nm-default.h" -#include <string.h> #include <arpa/inet.h> #include <linux/if_addr.h> diff --git a/src/tests/test-systemd.c b/src/tests/test-systemd.c index 05e22776..91edcab2 100644 --- a/src/tests/test-systemd.c +++ b/src/tests/test-systemd.c @@ -49,8 +49,9 @@ nm_utils_get_monotonic_timestamp_s (void) NMLogDomain _nm_logging_enabled_state[_LOGL_N_REAL]; gboolean -_nm_log_enabled (NMLogLevel level, - NMLogDomain domain) +_nm_log_enabled_impl (gboolean mt_require_locking, + NMLogLevel level, + NMLogDomain domain) { return FALSE; } @@ -59,6 +60,7 @@ void _nm_log_impl (const char *file, guint line, const char *func, + gboolean mt_require_locking, NMLogLevel level, NMLogDomain domain, int error, @@ -78,6 +80,12 @@ nm_logging_setup (const char *level, return TRUE; } +const char * +nm_strerror_native (int errsv) +{ + return g_strerror (errsv); +} + /*****************************************************************************/ static void diff --git a/src/tests/test-utils.c b/src/tests/test-utils.c index 9572ec7a..c326f790 100644 --- a/src/tests/test-utils.c +++ b/src/tests/test-utils.c @@ -20,8 +20,6 @@ #include "nm-default.h" -#include <string.h> -#include <errno.h> #include <arpa/inet.h> #include "nm-test-utils-core.h" |