summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2019-05-02 09:11:43 +0200
committerThomas Haller <thaller@redhat.com>2019-05-02 09:28:31 +0200
commitd5a2b70909e6d9158336cc45f96f297543463b61 (patch)
tree764c37d03d127d989ac9e0ec7a8f1f4352ba86b7
parent0a0a8706f8d8170dfc8221d8585c33552b0c39ff (diff)
downloadNetworkManager-d5a2b70909e6d9158336cc45f96f297543463b61.tar.gz
platform/tests: workaround routing-rules test failure due to suppress_prefixlen on older kernels
On Ubuntu 14.04 kernel (4.4.0-146-generic, x86_64) this easily causes test failures: make -j 8 src/platform/tests/test-route-linux \ && while true; do \ NMTST_SEED_RANDOM= ./tools/run-nm-test.sh src/platform/tests/test-route-linux -p /route/rule \ || break; \ done outputs: ... /route/rule/1: nmtst: initialize nmtst_get_rand() with NMTST_SEED_RAND=22892021 OK /route/rule/2: >>> failing... >>> no fuzzy match between: [routing-rule,0x205ab30,1,+alive,+visible; [6] 0: from all suppress_prefixlen 8 none] >>> and: [routing-rule,0x205c0c0,1,+alive,+visible; [6] 0: from all suppress_prefixlen -1579099242 none] ** test:ERROR:src/platform/tests/test-route.c:1695:test_rule: code should not be reached
-rw-r--r--src/platform/tests/test-route.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/platform/tests/test-route.c b/src/platform/tests/test-route.c
index e6ffe1ae0c..eb2f2316aa 100644
--- a/src/platform/tests/test-route.c
+++ b/src/platform/tests/test-route.c
@@ -1345,8 +1345,7 @@ _rule_fuzzy_equal (const NMPObject *obj,
rr_co.tos = 0;
if (rr->ip_proto == 0)
rr_co.ip_proto = 0;
- if (rr->suppress_prefixlen_inverse == 0)
- rr_co.suppress_prefixlen_inverse = 0;
+ rr_co.suppress_prefixlen_inverse = rr->suppress_prefixlen_inverse;
if (rr->suppress_ifgroup_inverse == 0)
rr_co.suppress_ifgroup_inverse = 0;
if (!rr->uid_range_has)