diff options
Diffstat (limited to 'src/platform/tests')
| -rw-r--r-- | src/platform/tests/test-common.c | 6 | ||||
| -rw-r--r-- | src/platform/tests/test-general.c | 1 | ||||
| -rw-r--r-- | src/platform/tests/test-link.c | 12 |
3 files changed, 11 insertions, 8 deletions
diff --git a/src/platform/tests/test-common.c b/src/platform/tests/test-common.c index 7885c083..42569d5b 100644 --- a/src/platform/tests/test-common.c +++ b/src/platform/tests/test-common.c @@ -28,7 +28,7 @@ #include "test-common.h" #define SIGNAL_DATA_FMT "'%s-%s' ifindex %d%s%s%s (%d times received)" -#define SIGNAL_DATA_ARG(data) (data)->name, nm_platform_signal_change_type_to_string ((data)->change_type), (data)->ifindex, (data)->ifname ? " ifname '" : "", (data)->ifname ? (data)->ifname : "", (data)->ifname ? "'" : "", (data)->received_count +#define SIGNAL_DATA_ARG(data) (data)->name, nm_platform_signal_change_type_to_string ((data)->change_type), (data)->ifindex, (data)->ifname ? " ifname '" : "", (data)->ifname ?: "", (data)->ifname ? "'" : "", (data)->received_count int NMTSTP_ENV1_IFINDEX = -1; int NMTSTP_ENV1_EX = -1; @@ -1258,7 +1258,7 @@ nmtstp_link_gre_add (NMPlatform *platform, success = !nmtstp_run_command ("ip tunnel add %s mode gre %s local %s remote %s ttl %u tos %02x %s", name, - dev ? dev : "", + dev ?: "", nm_utils_inet4_ntop (lnk->local, NULL), nm_utils_inet4_ntop (lnk->remote, buffer), lnk->ttl, @@ -1568,7 +1568,7 @@ nmtstp_link_vxlan_add (NMPlatform *platform, err = nmtstp_run_command ("ip link add %s type vxlan id %u %s local %s group %s ttl %u tos %02x dstport %u srcport %u %u ageing %u", name, lnk->id, - dev ? dev : "", + dev ?: "", local, remote, lnk->ttl, diff --git a/src/platform/tests/test-general.c b/src/platform/tests/test-general.c index 342aa0d6..8708c80f 100644 --- a/src/platform/tests/test-general.c +++ b/src/platform/tests/test-general.c @@ -27,7 +27,6 @@ #include "nm-test-utils-core.h" - /*****************************************************************************/ static void diff --git a/src/platform/tests/test-link.c b/src/platform/tests/test-link.c index dcd600ee..cd5880e3 100644 --- a/src/platform/tests/test-link.c +++ b/src/platform/tests/test-link.c @@ -1070,6 +1070,14 @@ test_software_detect (gconstpointer user_data) if (lnk) g_assert (memcmp (plnk, &lnk_tun2, sizeof (NMPlatformLnkTun)) == 0); + if (i_step == 0) { + /* Before we upped the device for the first time the kernel didn't notify + * us of the owner set after the link creation: + * https://bugzilla.redhat.com/show_bug.cgi?id=1566062 + */ + break; + } + g_assert (nm_platform_lnk_tun_cmp (plnk, &lnk_tun) == 0); break; } @@ -1513,7 +1521,6 @@ test_vlan_set_xgress (void) 6, 7); } - { const NMVlanQosMapping ingress_map[] = { { .from = 1, .to = 5 }, @@ -1826,14 +1833,12 @@ test_nl_bugs_veth (void) } g_assert_cmpint (pllink_veth0->parent, ==, ifindex_veth1); - /* The following tests whether we have a workaround for kernel bug * https://bugzilla.redhat.com/show_bug.cgi?id=1285827 in place. */ pllink_veth1 = nm_platform_link_get (NM_PLATFORM_GET, ifindex_veth1); g_assert (pllink_veth1); g_assert_cmpint (pllink_veth1->parent, ==, ifindex_veth0); - /* move one veth peer to another namespace and check that the * parent/IFLA_LINK of the remaining peer properly updates * (https://bugzilla.redhat.com/show_bug.cgi?id=1262908). */ @@ -2381,7 +2386,6 @@ test_netns_push (gpointer fixture, gconstpointer test_data) g_assert_not_reached (); } - for (i = nstack; i >= 1; ) { i--; nmp_netns_pop (nm_platform_netns_get (stack[i].pl->platform)); |