APPLIED[G]: [B/D/E/F/G][Unstable][PATCH 0/2][SRU] Fix false-negative return value for rtnetlink.sh in kselftests/net

Seth Forshee seth.forshee at canonical.com
Fri Aug 14 19:59:48 UTC 2020


On Wed, Aug 12, 2020 at 08:08:11PM +0800, Po-Hsu Lin wrote:
> == Justification ==
> All the sub test cases in rtnetlink.sh from kselftests/net were using
> the same variable "ret" to store the return value of their test result,
> and it will be reset to 0 in the beginning of each test.
> 
> This will cause false-negative result if the last case has passed.
> 
> Also, the kci_test_encap() test in rtnetlink.sh is actually composed by
> two different sub-tests, kci_test_encap_vxlan() and kci_test_encap_fou()
> 
> Therefore we should check the test result of these two to avoid
> false-negative result for this test case.
> 
> == Fixes ==
> * c2a4d2747996 ("selftests: rtnetlink: correct the final return value for the test")
> * 72f70c159b53 ("selftests: rtnetlink: make kci_test_encap() return sub-test result")
> 
> This issue is affecting our kernels from B to G, there is no such test
> in X thus it can be skipped.
> 
> The first patch can be cherry-picked for E/F/G, but needs to be
> backported for B/D as they're missing some tests.
> The second patch can be cherry-picked for all affected kernels.
> 
> == Test ==
> Manually tested. The test will fail as expected:
> $ sudo ./rtnetlink.sh
> PASS: policy routing
> PASS: route get
> echo $?
> PASS: preferred_lft addresses have expired
> PASS: promote_secondaries complete
> PASS: tc htb hierarchy
> PASS: gre tunnel endpoint
> PASS: gretap
> PASS: ip6gretap
> PASS: erspan
> PASS: ip6erspan
> PASS: bridge setup
> PASS: ipv6 addrlabel
> PASS: set ifalias a28e0b75-bcc7-4b62-8f5a-381215796229 for test-dummy0
> PASS: vrf
> PASS: vxlan
> FAIL: can't add fou port 7777, skipping test
> PASS: macsec
> PASS: ipsec
> PASS: ipsec_offload
> PASS: bridge fdb get
> PASS: neigh get
> $ echo $?
> 1
> 
> == Regression Potential ==
> Low, changes limited to testing tools. It's expected to see this test
> failing after applying these patches, since it is reflecting the actual
> test result.

Applied to groovy/master-next, thanks!



More information about the kernel-team mailing list