platform/tests: avoid test failure setting bridge forward_delay

Seems odd numbers may be coerced to the next-smaller even number.
Avoid that by using an even number for the test, as the number
has no particular meaning.

https://bugzilla.gnome.org/show_bug.cgi?id=765835
(cherry picked from commit 895c61a742)
This commit is contained in:
Thomas Haller 2016-08-28 17:59:42 +02:00
parent 1a486a277e
commit 5696a99eec

View file

@ -297,9 +297,9 @@ test_slave (int master, int type, SignalData *master_changed)
switch (type) {
case NM_LINK_TYPE_BRIDGE:
if (nmtstp_is_sysfs_writable ()) {
g_assert (nm_platform_sysctl_slave_set_option (NM_PLATFORM_GET, ifindex, "priority", "789"));
g_assert (nm_platform_sysctl_slave_set_option (NM_PLATFORM_GET, ifindex, "priority", "614"));
value = nm_platform_sysctl_slave_get_option (NM_PLATFORM_GET, ifindex, "priority");
g_assert_cmpstr (value, ==, "789");
g_assert_cmpstr (value, ==, "614");
g_free (value);
}
break;
@ -398,9 +398,9 @@ test_software (NMLinkType link_type, const char *link_typename)
switch (link_type) {
case NM_LINK_TYPE_BRIDGE:
if (nmtstp_is_sysfs_writable ()) {
g_assert (nm_platform_sysctl_master_set_option (NM_PLATFORM_GET, ifindex, "forward_delay", "789"));
g_assert (nm_platform_sysctl_master_set_option (NM_PLATFORM_GET, ifindex, "forward_delay", "628"));
value = nm_platform_sysctl_master_get_option (NM_PLATFORM_GET, ifindex, "forward_delay");
g_assert_cmpstr (value, ==, "789");
g_assert_cmpstr (value, ==, "628");
g_free (value);
}
break;