From d5a2b70909e6d9158336cc45f96f297543463b61 Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Thu, 2 May 2019 09:11:43 +0200 Subject: [PATCH] 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 --- src/platform/tests/test-route.c | 3 +-- 1 file changed, 1 insertion(+), 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)