Activity log for bug #1890136

Date Who What changed Old value New value Message
2020-08-03 11:22:33 Po-Hsu Lin bug added bug
2020-08-03 11:22:43 Po-Hsu Lin tags ubuntu-kernel-selftests
2020-08-03 11:22:47 Po-Hsu Lin tags ubuntu-kernel-selftests sru-20200720 ubuntu-kernel-selftests
2020-08-03 11:22:50 Po-Hsu Lin ubuntu-kernel-tests: assignee Po-Hsu Lin (cypressyew)
2020-08-03 11:22:54 Po-Hsu Lin ubuntu-kernel-tests: status New In Progress
2020-08-03 11:22:59 Po-Hsu Lin bug task added linux (Ubuntu)
2020-08-03 11:23:50 Po-Hsu Lin summary Return value in rtnetlink.sh from kselftests/net will be overrided in the last test Return value in rtnetlink.sh from kselftests/net will be override in the last test
2020-08-03 11:30:07 Ubuntu Kernel Bot linux (Ubuntu): status New Incomplete
2020-08-12 11:17:39 Po-Hsu Lin nominated for series Ubuntu Eoan
2020-08-12 11:17:39 Po-Hsu Lin bug task added linux (Ubuntu Eoan)
2020-08-12 11:17:39 Po-Hsu Lin nominated for series Ubuntu Groovy
2020-08-12 11:17:39 Po-Hsu Lin bug task added linux (Ubuntu Groovy)
2020-08-12 11:17:39 Po-Hsu Lin nominated for series Ubuntu Bionic
2020-08-12 11:17:39 Po-Hsu Lin bug task added linux (Ubuntu Bionic)
2020-08-12 11:17:39 Po-Hsu Lin nominated for series Ubuntu Focal
2020-08-12 11:17:39 Po-Hsu Lin bug task added linux (Ubuntu Focal)
2020-08-12 11:59:57 Po-Hsu Lin description In this test, it uses ret to store the return value of each test. However, this value will be reset to 0 in the beginning of each test. In the end of this test, it will judge PASS/FAIL base on this value. Thus this will cause false-negative in some cases. Below is an example for the test on Bionic OEM-OSP1, test "ip6erspan", "erspan", "ip6gretap" failed with return value 255, but the return value will soon be overridden with 0 if following test passed without any issue (I made the test to print === RET $ret === line for debugging purpose): PASS: policy routing === RET 0 === PASS: route get === RET 0 === PASS: preferred_lft addresses have expired === RET 0 === PASS: tc htb hierarchy === RET 0 === PASS: gre tunnel endpoint === RET 0 === PASS: gretap === RET 0 === Usage: ... { ip6gre | ip6gretap | ip6erspan} [ remote ADDR ] [ local ADDR ] [ [i|o]seq ] [ [i|o]key KEY ] [ [i|o]csum ] [ hoplimit TTL ] [ encaplimit ELIM ] [ tclass TCLASS ] [ flowlabel FLOWLABEL ] [ dscp inherit ] [ fwmark MARK ] [ dev PHYS_DEV ] [ noencap ] [ encap { fou | gue | none } ] [ encap-sport PORT ] [ encap-dport PORT ] [ [no]encap-csum ] [ [no]encap-csum6 ] [ [no]encap-remcsum ] [ erspan IDX ] Where: ADDR := IPV6_ADDRESS TTL := { 0..255 } (default=64) KEY := { DOTTED_QUAD | NUMBER } ELIM := { none | 0..255 }(default=4) TCLASS := { 0x0..0xff | inherit } FLOWLABEL := { 0x0..0xfffff | inherit } MARK := { 0x0..0xffffffff | inherit } Cannot find device "ip6gretap00" FAIL: ip6gretap === RET 255 === Usage: ... { gre | gretap | erspan } [ remote ADDR ] [ local ADDR ] [ [i|o]seq ] [ [i|o]key KEY ] [ [i|o]csum ] [ ttl TTL ] [ tos TOS ] [ [no]pmtudisc ] [ [no]ignore-df ] [ dev PHYS_DEV ] [ noencap ] [ encap { fou | gue | none } ] [ encap-sport PORT ] [ encap-dport PORT ] [ [no]encap-csum ] [ [no]encap-csum6 ] [ [no]encap-remcsum ] [ external ] [ fwmark MARK ] [ erspan IDX ] Where: ADDR := { IP_ADDRESS | any } TOS := { NUMBER | inherit } TTL := { 1..255 | inherit } KEY := { DOTTED_QUAD | NUMBER } MARK := { 0x0..0xffffffff } Cannot find device "erspan00" Cannot find device "erspan00" Cannot find device "erspan00" Usage: ... { gre | gretap | erspan } [ remote ADDR ] [ local ADDR ] [ [i|o]seq ] [ [i|o]key KEY ] [ [i|o]csum ] [ ttl TTL ] [ tos TOS ] [ [no]pmtudisc ] [ [no]ignore-df ] [ dev PHYS_DEV ] [ noencap ] [ encap { fou | gue | none } ] [ encap-sport PORT ] [ encap-dport PORT ] [ [no]encap-csum ] [ [no]encap-csum6 ] [ [no]encap-remcsum ] [ external ] [ fwmark MARK ] [ erspan IDX ] Where: ADDR := { IP_ADDRESS | any } TOS := { NUMBER | inherit } TTL := { 1..255 | inherit } KEY := { DOTTED_QUAD | NUMBER } MARK := { 0x0..0xffffffff } Cannot find device "erspan00" Cannot find device "erspan00" Cannot find device "erspan00" FAIL: erspan === RET 255 === Usage: ... { ip6gre | ip6gretap | ip6erspan} [ remote ADDR ] [ local ADDR ] [ [i|o]seq ] [ [i|o]key KEY ] [ [i|o]csum ] [ hoplimit TTL ] [ encaplimit ELIM ] [ tclass TCLASS ] [ flowlabel FLOWLABEL ] [ dscp inherit ] [ fwmark MARK ] [ dev PHYS_DEV ] [ noencap ] [ encap { fou | gue | none } ] [ encap-sport PORT ] [ encap-dport PORT ] [ [no]encap-csum ] [ [no]encap-csum6 ] [ [no]encap-remcsum ] [ erspan IDX ] Where: ADDR := IPV6_ADDRESS TTL := { 0..255 } (default=64) KEY := { DOTTED_QUAD | NUMBER } ELIM := { none | 0..255 }(default=4) TCLASS := { 0x0..0xff | inherit } FLOWLABEL := { 0x0..0xfffff | inherit } MARK := { 0x0..0xffffffff | inherit } Cannot find device "ip6erspan00" Cannot find device "ip6erspan00" Cannot find device "ip6erspan00" Usage: ... { ip6gre | ip6gretap | ip6erspan} [ remote ADDR ] [ local ADDR ] [ [i|o]seq ] [ [i|o]key KEY ] [ [i|o]csum ] [ hoplimit TTL ] [ encaplimit ELIM ] [ tclass TCLASS ] [ flowlabel FLOWLABEL ] [ dscp inherit ] [ fwmark MARK ] [ dev PHYS_DEV ] [ noencap ] [ encap { fou | gue | none } ] [ encap-sport PORT ] [ encap-dport PORT ] [ [no]encap-csum ] [ [no]encap-csum6 ] [ [no]encap-remcsum ] [ erspan IDX ] Where: ADDR := IPV6_ADDRESS TTL := { 0..255 } (default=64) KEY := { DOTTED_QUAD | NUMBER } ELIM := { none | 0..255 }(default=4) TCLASS := { 0x0..0xff | inherit } FLOWLABEL := { 0x0..0xfffff | inherit } MARK := { 0x0..0xffffffff | inherit } Cannot find device "ip6erspan00" Cannot find device "ip6erspan00" Cannot find device "ip6erspan00" Usage: ... { ip6gre | ip6gretap | ip6erspan} [ remote ADDR ] [ local ADDR ] [ [i|o]seq ] [ [i|o]key KEY ] [ [i|o]csum ] [ hoplimit TTL ] [ encaplimit ELIM ] [ tclass TCLASS ] [ flowlabel FLOWLABEL ] [ dscp inherit ] [ fwmark MARK ] [ dev PHYS_DEV ] [ noencap ] [ encap { fou | gue | none } ] [ encap-sport PORT ] [ encap-dport PORT ] [ [no]encap-csum ] [ [no]encap-csum6 ] [ [no]encap-remcsum ] [ erspan IDX ] Where: ADDR := IPV6_ADDRESS TTL := { 0..255 } (default=64) KEY := { DOTTED_QUAD | NUMBER } ELIM := { none | 0..255 }(default=4) TCLASS := { 0x0..0xff | inherit } FLOWLABEL := { 0x0..0xfffff | inherit } MARK := { 0x0..0xffffffff | inherit } Cannot find device "ip6erspan00" FAIL: ip6erspan === RET 255 === PASS: bridge setup === RET 0 === PASS: ipv6 addrlabel === RET 0 === PASS: set ifalias a1214e60-3ac4-4fd4-8a98-aac4c0b4bfab for test-dummy0 === RET 0 === PASS: vrf === RET 0 === PASS: vxlan FAIL: can't add fou port 7777, skipping test === RET 0 === PASS: macsec === RET 0 === PASS: ipsec === RET 0 === PASS: ipsec_offload === RET 0 === SKIP: fdb get tests: iproute2 too old === RET 0 === SKIP: fdb get tests: iproute2 too old === RET 0 === === RET 0 === == Justification == All the sub test cases in rtnetlink.sh from kselftests/net use 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 case 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. == 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 so 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 real test result. == Original Bug Report == In this test, it uses ret to store the return value of each test. However, this value will be reset to 0 in the beginning of each test. In the end of this test, it will judge PASS/FAIL base on this value. Thus this will cause false-negative in some cases. Below is an example for the test on Bionic OEM-OSP1, test "ip6erspan", "erspan", "ip6gretap" failed with return value 255, but the return value will soon be overridden with 0 if following test passed without any issue (I made the test to print === RET $ret === line for debugging purpose): PASS: policy routing === RET 0 === PASS: route get === RET 0 === PASS: preferred_lft addresses have expired === RET 0 === PASS: tc htb hierarchy === RET 0 === PASS: gre tunnel endpoint === RET 0 === PASS: gretap === RET 0 === Usage: ... { ip6gre | ip6gretap | ip6erspan} [ remote ADDR ]                                   [ local ADDR ]                                   [ [i|o]seq ]                                   [ [i|o]key KEY ]                                   [ [i|o]csum ]                                   [ hoplimit TTL ]                                   [ encaplimit ELIM ]                                   [ tclass TCLASS ]                                   [ flowlabel FLOWLABEL ]                                   [ dscp inherit ]                                   [ fwmark MARK ]                                   [ dev PHYS_DEV ]                                   [ noencap ]                                   [ encap { fou | gue | none } ]                                   [ encap-sport PORT ]                                   [ encap-dport PORT ]                                   [ [no]encap-csum ]                                   [ [no]encap-csum6 ]                                   [ [no]encap-remcsum ]                                   [ erspan IDX ] Where: ADDR := IPV6_ADDRESS        TTL := { 0..255 } (default=64)        KEY := { DOTTED_QUAD | NUMBER }        ELIM := { none | 0..255 }(default=4)        TCLASS := { 0x0..0xff | inherit }        FLOWLABEL := { 0x0..0xfffff | inherit }        MARK := { 0x0..0xffffffff | inherit } Cannot find device "ip6gretap00" FAIL: ip6gretap === RET 255 === Usage: ... { gre | gretap | erspan } [ remote ADDR ]                             [ local ADDR ]                             [ [i|o]seq ]                             [ [i|o]key KEY ]                             [ [i|o]csum ]                             [ ttl TTL ]                             [ tos TOS ]                             [ [no]pmtudisc ]                             [ [no]ignore-df ]                             [ dev PHYS_DEV ]                             [ noencap ]                             [ encap { fou | gue | none } ]                             [ encap-sport PORT ]                             [ encap-dport PORT ]                             [ [no]encap-csum ]                             [ [no]encap-csum6 ]                             [ [no]encap-remcsum ]                             [ external ]                             [ fwmark MARK ]                             [ erspan IDX ] Where: ADDR := { IP_ADDRESS | any }        TOS := { NUMBER | inherit }        TTL := { 1..255 | inherit }        KEY := { DOTTED_QUAD | NUMBER }        MARK := { 0x0..0xffffffff } Cannot find device "erspan00" Cannot find device "erspan00" Cannot find device "erspan00" Usage: ... { gre | gretap | erspan } [ remote ADDR ]                             [ local ADDR ]                             [ [i|o]seq ]                             [ [i|o]key KEY ]                             [ [i|o]csum ]                             [ ttl TTL ]                             [ tos TOS ]                             [ [no]pmtudisc ]                             [ [no]ignore-df ]                             [ dev PHYS_DEV ]                             [ noencap ]                             [ encap { fou | gue | none } ]                             [ encap-sport PORT ]                             [ encap-dport PORT ]                             [ [no]encap-csum ]                             [ [no]encap-csum6 ]                             [ [no]encap-remcsum ]                             [ external ]                             [ fwmark MARK ]                             [ erspan IDX ] Where: ADDR := { IP_ADDRESS | any }        TOS := { NUMBER | inherit }        TTL := { 1..255 | inherit }        KEY := { DOTTED_QUAD | NUMBER }        MARK := { 0x0..0xffffffff } Cannot find device "erspan00" Cannot find device "erspan00" Cannot find device "erspan00" FAIL: erspan === RET 255 === Usage: ... { ip6gre | ip6gretap | ip6erspan} [ remote ADDR ]                                   [ local ADDR ]                                   [ [i|o]seq ]                                   [ [i|o]key KEY ]                                   [ [i|o]csum ]                                   [ hoplimit TTL ]                                   [ encaplimit ELIM ]                                   [ tclass TCLASS ]                                   [ flowlabel FLOWLABEL ]                                   [ dscp inherit ]                                   [ fwmark MARK ]                                   [ dev PHYS_DEV ]                                   [ noencap ]                                   [ encap { fou | gue | none } ]                                   [ encap-sport PORT ]                                   [ encap-dport PORT ]                                   [ [no]encap-csum ]                                   [ [no]encap-csum6 ]                                   [ [no]encap-remcsum ]                                   [ erspan IDX ] Where: ADDR := IPV6_ADDRESS        TTL := { 0..255 } (default=64)        KEY := { DOTTED_QUAD | NUMBER }        ELIM := { none | 0..255 }(default=4)        TCLASS := { 0x0..0xff | inherit }        FLOWLABEL := { 0x0..0xfffff | inherit }        MARK := { 0x0..0xffffffff | inherit } Cannot find device "ip6erspan00" Cannot find device "ip6erspan00" Cannot find device "ip6erspan00" Usage: ... { ip6gre | ip6gretap | ip6erspan} [ remote ADDR ]                                   [ local ADDR ]                                   [ [i|o]seq ]                                   [ [i|o]key KEY ]                                   [ [i|o]csum ]                                   [ hoplimit TTL ]                                   [ encaplimit ELIM ]                                   [ tclass TCLASS ]                                   [ flowlabel FLOWLABEL ]                                   [ dscp inherit ]                                   [ fwmark MARK ]                                   [ dev PHYS_DEV ]                                   [ noencap ]                                   [ encap { fou | gue | none } ]                                   [ encap-sport PORT ]                                   [ encap-dport PORT ]                                   [ [no]encap-csum ]                                   [ [no]encap-csum6 ]                                   [ [no]encap-remcsum ]                                   [ erspan IDX ] Where: ADDR := IPV6_ADDRESS        TTL := { 0..255 } (default=64)        KEY := { DOTTED_QUAD | NUMBER }        ELIM := { none | 0..255 }(default=4)        TCLASS := { 0x0..0xff | inherit }        FLOWLABEL := { 0x0..0xfffff | inherit }        MARK := { 0x0..0xffffffff | inherit } Cannot find device "ip6erspan00" Cannot find device "ip6erspan00" Cannot find device "ip6erspan00" Usage: ... { ip6gre | ip6gretap | ip6erspan} [ remote ADDR ]                                   [ local ADDR ]                                   [ [i|o]seq ]                                   [ [i|o]key KEY ]                                   [ [i|o]csum ]                                   [ hoplimit TTL ]                                   [ encaplimit ELIM ]                                   [ tclass TCLASS ]                                   [ flowlabel FLOWLABEL ]                                   [ dscp inherit ]                                   [ fwmark MARK ]                                   [ dev PHYS_DEV ]                                   [ noencap ]                                   [ encap { fou | gue | none } ]                                   [ encap-sport PORT ]                                   [ encap-dport PORT ]                                   [ [no]encap-csum ]                                   [ [no]encap-csum6 ]                                   [ [no]encap-remcsum ]                                   [ erspan IDX ] Where: ADDR := IPV6_ADDRESS        TTL := { 0..255 } (default=64)        KEY := { DOTTED_QUAD | NUMBER }        ELIM := { none | 0..255 }(default=4)        TCLASS := { 0x0..0xff | inherit }        FLOWLABEL := { 0x0..0xfffff | inherit }        MARK := { 0x0..0xffffffff | inherit } Cannot find device "ip6erspan00" FAIL: ip6erspan === RET 255 === PASS: bridge setup === RET 0 === PASS: ipv6 addrlabel === RET 0 === PASS: set ifalias a1214e60-3ac4-4fd4-8a98-aac4c0b4bfab for test-dummy0 === RET 0 === PASS: vrf === RET 0 === PASS: vxlan FAIL: can't add fou port 7777, skipping test === RET 0 === PASS: macsec === RET 0 === PASS: ipsec === RET 0 === PASS: ipsec_offload === RET 0 === SKIP: fdb get tests: iproute2 too old === RET 0 === SKIP: fdb get tests: iproute2 too old === RET 0 === === RET 0 ===
2020-08-12 12:03:37 Po-Hsu Lin description == Justification == All the sub test cases in rtnetlink.sh from kselftests/net use 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 case 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. == 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 so 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 real test result. == Original Bug Report == In this test, it uses ret to store the return value of each test. However, this value will be reset to 0 in the beginning of each test. In the end of this test, it will judge PASS/FAIL base on this value. Thus this will cause false-negative in some cases. Below is an example for the test on Bionic OEM-OSP1, test "ip6erspan", "erspan", "ip6gretap" failed with return value 255, but the return value will soon be overridden with 0 if following test passed without any issue (I made the test to print === RET $ret === line for debugging purpose): PASS: policy routing === RET 0 === PASS: route get === RET 0 === PASS: preferred_lft addresses have expired === RET 0 === PASS: tc htb hierarchy === RET 0 === PASS: gre tunnel endpoint === RET 0 === PASS: gretap === RET 0 === Usage: ... { ip6gre | ip6gretap | ip6erspan} [ remote ADDR ]                                   [ local ADDR ]                                   [ [i|o]seq ]                                   [ [i|o]key KEY ]                                   [ [i|o]csum ]                                   [ hoplimit TTL ]                                   [ encaplimit ELIM ]                                   [ tclass TCLASS ]                                   [ flowlabel FLOWLABEL ]                                   [ dscp inherit ]                                   [ fwmark MARK ]                                   [ dev PHYS_DEV ]                                   [ noencap ]                                   [ encap { fou | gue | none } ]                                   [ encap-sport PORT ]                                   [ encap-dport PORT ]                                   [ [no]encap-csum ]                                   [ [no]encap-csum6 ]                                   [ [no]encap-remcsum ]                                   [ erspan IDX ] Where: ADDR := IPV6_ADDRESS        TTL := { 0..255 } (default=64)        KEY := { DOTTED_QUAD | NUMBER }        ELIM := { none | 0..255 }(default=4)        TCLASS := { 0x0..0xff | inherit }        FLOWLABEL := { 0x0..0xfffff | inherit }        MARK := { 0x0..0xffffffff | inherit } Cannot find device "ip6gretap00" FAIL: ip6gretap === RET 255 === Usage: ... { gre | gretap | erspan } [ remote ADDR ]                             [ local ADDR ]                             [ [i|o]seq ]                             [ [i|o]key KEY ]                             [ [i|o]csum ]                             [ ttl TTL ]                             [ tos TOS ]                             [ [no]pmtudisc ]                             [ [no]ignore-df ]                             [ dev PHYS_DEV ]                             [ noencap ]                             [ encap { fou | gue | none } ]                             [ encap-sport PORT ]                             [ encap-dport PORT ]                             [ [no]encap-csum ]                             [ [no]encap-csum6 ]                             [ [no]encap-remcsum ]                             [ external ]                             [ fwmark MARK ]                             [ erspan IDX ] Where: ADDR := { IP_ADDRESS | any }        TOS := { NUMBER | inherit }        TTL := { 1..255 | inherit }        KEY := { DOTTED_QUAD | NUMBER }        MARK := { 0x0..0xffffffff } Cannot find device "erspan00" Cannot find device "erspan00" Cannot find device "erspan00" Usage: ... { gre | gretap | erspan } [ remote ADDR ]                             [ local ADDR ]                             [ [i|o]seq ]                             [ [i|o]key KEY ]                             [ [i|o]csum ]                             [ ttl TTL ]                             [ tos TOS ]                             [ [no]pmtudisc ]                             [ [no]ignore-df ]                             [ dev PHYS_DEV ]                             [ noencap ]                             [ encap { fou | gue | none } ]                             [ encap-sport PORT ]                             [ encap-dport PORT ]                             [ [no]encap-csum ]                             [ [no]encap-csum6 ]                             [ [no]encap-remcsum ]                             [ external ]                             [ fwmark MARK ]                             [ erspan IDX ] Where: ADDR := { IP_ADDRESS | any }        TOS := { NUMBER | inherit }        TTL := { 1..255 | inherit }        KEY := { DOTTED_QUAD | NUMBER }        MARK := { 0x0..0xffffffff } Cannot find device "erspan00" Cannot find device "erspan00" Cannot find device "erspan00" FAIL: erspan === RET 255 === Usage: ... { ip6gre | ip6gretap | ip6erspan} [ remote ADDR ]                                   [ local ADDR ]                                   [ [i|o]seq ]                                   [ [i|o]key KEY ]                                   [ [i|o]csum ]                                   [ hoplimit TTL ]                                   [ encaplimit ELIM ]                                   [ tclass TCLASS ]                                   [ flowlabel FLOWLABEL ]                                   [ dscp inherit ]                                   [ fwmark MARK ]                                   [ dev PHYS_DEV ]                                   [ noencap ]                                   [ encap { fou | gue | none } ]                                   [ encap-sport PORT ]                                   [ encap-dport PORT ]                                   [ [no]encap-csum ]                                   [ [no]encap-csum6 ]                                   [ [no]encap-remcsum ]                                   [ erspan IDX ] Where: ADDR := IPV6_ADDRESS        TTL := { 0..255 } (default=64)        KEY := { DOTTED_QUAD | NUMBER }        ELIM := { none | 0..255 }(default=4)        TCLASS := { 0x0..0xff | inherit }        FLOWLABEL := { 0x0..0xfffff | inherit }        MARK := { 0x0..0xffffffff | inherit } Cannot find device "ip6erspan00" Cannot find device "ip6erspan00" Cannot find device "ip6erspan00" Usage: ... { ip6gre | ip6gretap | ip6erspan} [ remote ADDR ]                                   [ local ADDR ]                                   [ [i|o]seq ]                                   [ [i|o]key KEY ]                                   [ [i|o]csum ]                                   [ hoplimit TTL ]                                   [ encaplimit ELIM ]                                   [ tclass TCLASS ]                                   [ flowlabel FLOWLABEL ]                                   [ dscp inherit ]                                   [ fwmark MARK ]                                   [ dev PHYS_DEV ]                                   [ noencap ]                                   [ encap { fou | gue | none } ]                                   [ encap-sport PORT ]                                   [ encap-dport PORT ]                                   [ [no]encap-csum ]                                   [ [no]encap-csum6 ]                                   [ [no]encap-remcsum ]                                   [ erspan IDX ] Where: ADDR := IPV6_ADDRESS        TTL := { 0..255 } (default=64)        KEY := { DOTTED_QUAD | NUMBER }        ELIM := { none | 0..255 }(default=4)        TCLASS := { 0x0..0xff | inherit }        FLOWLABEL := { 0x0..0xfffff | inherit }        MARK := { 0x0..0xffffffff | inherit } Cannot find device "ip6erspan00" Cannot find device "ip6erspan00" Cannot find device "ip6erspan00" Usage: ... { ip6gre | ip6gretap | ip6erspan} [ remote ADDR ]                                   [ local ADDR ]                                   [ [i|o]seq ]                                   [ [i|o]key KEY ]                                   [ [i|o]csum ]                                   [ hoplimit TTL ]                                   [ encaplimit ELIM ]                                   [ tclass TCLASS ]                                   [ flowlabel FLOWLABEL ]                                   [ dscp inherit ]                                   [ fwmark MARK ]                                   [ dev PHYS_DEV ]                                   [ noencap ]                                   [ encap { fou | gue | none } ]                                   [ encap-sport PORT ]                                   [ encap-dport PORT ]                                   [ [no]encap-csum ]                                   [ [no]encap-csum6 ]                                   [ [no]encap-remcsum ]                                   [ erspan IDX ] Where: ADDR := IPV6_ADDRESS        TTL := { 0..255 } (default=64)        KEY := { DOTTED_QUAD | NUMBER }        ELIM := { none | 0..255 }(default=4)        TCLASS := { 0x0..0xff | inherit }        FLOWLABEL := { 0x0..0xfffff | inherit }        MARK := { 0x0..0xffffffff | inherit } Cannot find device "ip6erspan00" FAIL: ip6erspan === RET 255 === PASS: bridge setup === RET 0 === PASS: ipv6 addrlabel === RET 0 === PASS: set ifalias a1214e60-3ac4-4fd4-8a98-aac4c0b4bfab for test-dummy0 === RET 0 === PASS: vrf === RET 0 === PASS: vxlan FAIL: can't add fou port 7777, skipping test === RET 0 === PASS: macsec === RET 0 === PASS: ipsec === RET 0 === PASS: ipsec_offload === RET 0 === SKIP: fdb get tests: iproute2 too old === RET 0 === SKIP: fdb get tests: iproute2 too old === RET 0 === === RET 0 === == 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. == Original Bug Report == In this test, it uses ret to store the return value of each test. However, this value will be reset to 0 in the beginning of each test. In the end of this test, it will judge PASS/FAIL base on this value. Thus this will cause false-negative in some cases. Below is an example for the test on Bionic OEM-OSP1, test "ip6erspan", "erspan", "ip6gretap" failed with return value 255, but the return value will soon be overridden with 0 if following test passed without any issue (I made the test to print === RET $ret === line for debugging purpose): PASS: policy routing === RET 0 === PASS: route get === RET 0 === PASS: preferred_lft addresses have expired === RET 0 === PASS: tc htb hierarchy === RET 0 === PASS: gre tunnel endpoint === RET 0 === PASS: gretap === RET 0 === Usage: ... { ip6gre | ip6gretap | ip6erspan} [ remote ADDR ]                                   [ local ADDR ]                                   [ [i|o]seq ]                                   [ [i|o]key KEY ]                                   [ [i|o]csum ]                                   [ hoplimit TTL ]                                   [ encaplimit ELIM ]                                   [ tclass TCLASS ]                                   [ flowlabel FLOWLABEL ]                                   [ dscp inherit ]                                   [ fwmark MARK ]                                   [ dev PHYS_DEV ]                                   [ noencap ]                                   [ encap { fou | gue | none } ]                                   [ encap-sport PORT ]                                   [ encap-dport PORT ]                                   [ [no]encap-csum ]                                   [ [no]encap-csum6 ]                                   [ [no]encap-remcsum ]                                   [ erspan IDX ] Where: ADDR := IPV6_ADDRESS        TTL := { 0..255 } (default=64)        KEY := { DOTTED_QUAD | NUMBER }        ELIM := { none | 0..255 }(default=4)        TCLASS := { 0x0..0xff | inherit }        FLOWLABEL := { 0x0..0xfffff | inherit }        MARK := { 0x0..0xffffffff | inherit } Cannot find device "ip6gretap00" FAIL: ip6gretap === RET 255 === Usage: ... { gre | gretap | erspan } [ remote ADDR ]                             [ local ADDR ]                             [ [i|o]seq ]                             [ [i|o]key KEY ]                             [ [i|o]csum ]                             [ ttl TTL ]                             [ tos TOS ]                             [ [no]pmtudisc ]                             [ [no]ignore-df ]                             [ dev PHYS_DEV ]                             [ noencap ]                             [ encap { fou | gue | none } ]                             [ encap-sport PORT ]                             [ encap-dport PORT ]                             [ [no]encap-csum ]                             [ [no]encap-csum6 ]                             [ [no]encap-remcsum ]                             [ external ]                             [ fwmark MARK ]                             [ erspan IDX ] Where: ADDR := { IP_ADDRESS | any }        TOS := { NUMBER | inherit }        TTL := { 1..255 | inherit }        KEY := { DOTTED_QUAD | NUMBER }        MARK := { 0x0..0xffffffff } Cannot find device "erspan00" Cannot find device "erspan00" Cannot find device "erspan00" Usage: ... { gre | gretap | erspan } [ remote ADDR ]                             [ local ADDR ]                             [ [i|o]seq ]                             [ [i|o]key KEY ]                             [ [i|o]csum ]                             [ ttl TTL ]                             [ tos TOS ]                             [ [no]pmtudisc ]                             [ [no]ignore-df ]                             [ dev PHYS_DEV ]                             [ noencap ]                             [ encap { fou | gue | none } ]                             [ encap-sport PORT ]                             [ encap-dport PORT ]                             [ [no]encap-csum ]                             [ [no]encap-csum6 ]                             [ [no]encap-remcsum ]                             [ external ]                             [ fwmark MARK ]                             [ erspan IDX ] Where: ADDR := { IP_ADDRESS | any }        TOS := { NUMBER | inherit }        TTL := { 1..255 | inherit }        KEY := { DOTTED_QUAD | NUMBER }        MARK := { 0x0..0xffffffff } Cannot find device "erspan00" Cannot find device "erspan00" Cannot find device "erspan00" FAIL: erspan === RET 255 === Usage: ... { ip6gre | ip6gretap | ip6erspan} [ remote ADDR ]                                   [ local ADDR ]                                   [ [i|o]seq ]                                   [ [i|o]key KEY ]                                   [ [i|o]csum ]                                   [ hoplimit TTL ]                                   [ encaplimit ELIM ]                                   [ tclass TCLASS ]                                   [ flowlabel FLOWLABEL ]                                   [ dscp inherit ]                                   [ fwmark MARK ]                                   [ dev PHYS_DEV ]                                   [ noencap ]                                   [ encap { fou | gue | none } ]                                   [ encap-sport PORT ]                                   [ encap-dport PORT ]                                   [ [no]encap-csum ]                                   [ [no]encap-csum6 ]                                   [ [no]encap-remcsum ]                                   [ erspan IDX ] Where: ADDR := IPV6_ADDRESS        TTL := { 0..255 } (default=64)        KEY := { DOTTED_QUAD | NUMBER }        ELIM := { none | 0..255 }(default=4)        TCLASS := { 0x0..0xff | inherit }        FLOWLABEL := { 0x0..0xfffff | inherit }        MARK := { 0x0..0xffffffff | inherit } Cannot find device "ip6erspan00" Cannot find device "ip6erspan00" Cannot find device "ip6erspan00" Usage: ... { ip6gre | ip6gretap | ip6erspan} [ remote ADDR ]                                   [ local ADDR ]                                   [ [i|o]seq ]                                   [ [i|o]key KEY ]                                   [ [i|o]csum ]                                   [ hoplimit TTL ]                                   [ encaplimit ELIM ]                                   [ tclass TCLASS ]                                   [ flowlabel FLOWLABEL ]                                   [ dscp inherit ]                                   [ fwmark MARK ]                                   [ dev PHYS_DEV ]                                   [ noencap ]                                   [ encap { fou | gue | none } ]                                   [ encap-sport PORT ]                                   [ encap-dport PORT ]                                   [ [no]encap-csum ]                                   [ [no]encap-csum6 ]                                   [ [no]encap-remcsum ]                                   [ erspan IDX ] Where: ADDR := IPV6_ADDRESS        TTL := { 0..255 } (default=64)        KEY := { DOTTED_QUAD | NUMBER }        ELIM := { none | 0..255 }(default=4)        TCLASS := { 0x0..0xff | inherit }        FLOWLABEL := { 0x0..0xfffff | inherit }        MARK := { 0x0..0xffffffff | inherit } Cannot find device "ip6erspan00" Cannot find device "ip6erspan00" Cannot find device "ip6erspan00" Usage: ... { ip6gre | ip6gretap | ip6erspan} [ remote ADDR ]                                   [ local ADDR ]                                   [ [i|o]seq ]                                   [ [i|o]key KEY ]                                   [ [i|o]csum ]                                   [ hoplimit TTL ]                                   [ encaplimit ELIM ]                                   [ tclass TCLASS ]                                   [ flowlabel FLOWLABEL ]                                   [ dscp inherit ]                                   [ fwmark MARK ]                                   [ dev PHYS_DEV ]                                   [ noencap ]                                   [ encap { fou | gue | none } ]                                   [ encap-sport PORT ]                                   [ encap-dport PORT ]                                   [ [no]encap-csum ]                                   [ [no]encap-csum6 ]                                   [ [no]encap-remcsum ]                                   [ erspan IDX ] Where: ADDR := IPV6_ADDRESS        TTL := { 0..255 } (default=64)        KEY := { DOTTED_QUAD | NUMBER }        ELIM := { none | 0..255 }(default=4)        TCLASS := { 0x0..0xff | inherit }        FLOWLABEL := { 0x0..0xfffff | inherit }        MARK := { 0x0..0xffffffff | inherit } Cannot find device "ip6erspan00" FAIL: ip6erspan === RET 255 === PASS: bridge setup === RET 0 === PASS: ipv6 addrlabel === RET 0 === PASS: set ifalias a1214e60-3ac4-4fd4-8a98-aac4c0b4bfab for test-dummy0 === RET 0 === PASS: vrf === RET 0 === PASS: vxlan FAIL: can't add fou port 7777, skipping test === RET 0 === PASS: macsec === RET 0 === PASS: ipsec === RET 0 === PASS: ipsec_offload === RET 0 === SKIP: fdb get tests: iproute2 too old === RET 0 === SKIP: fdb get tests: iproute2 too old === RET 0 === === RET 0 ===
2020-08-12 12:03:56 Po-Hsu Lin description == 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. == Original Bug Report == In this test, it uses ret to store the return value of each test. However, this value will be reset to 0 in the beginning of each test. In the end of this test, it will judge PASS/FAIL base on this value. Thus this will cause false-negative in some cases. Below is an example for the test on Bionic OEM-OSP1, test "ip6erspan", "erspan", "ip6gretap" failed with return value 255, but the return value will soon be overridden with 0 if following test passed without any issue (I made the test to print === RET $ret === line for debugging purpose): PASS: policy routing === RET 0 === PASS: route get === RET 0 === PASS: preferred_lft addresses have expired === RET 0 === PASS: tc htb hierarchy === RET 0 === PASS: gre tunnel endpoint === RET 0 === PASS: gretap === RET 0 === Usage: ... { ip6gre | ip6gretap | ip6erspan} [ remote ADDR ]                                   [ local ADDR ]                                   [ [i|o]seq ]                                   [ [i|o]key KEY ]                                   [ [i|o]csum ]                                   [ hoplimit TTL ]                                   [ encaplimit ELIM ]                                   [ tclass TCLASS ]                                   [ flowlabel FLOWLABEL ]                                   [ dscp inherit ]                                   [ fwmark MARK ]                                   [ dev PHYS_DEV ]                                   [ noencap ]                                   [ encap { fou | gue | none } ]                                   [ encap-sport PORT ]                                   [ encap-dport PORT ]                                   [ [no]encap-csum ]                                   [ [no]encap-csum6 ]                                   [ [no]encap-remcsum ]                                   [ erspan IDX ] Where: ADDR := IPV6_ADDRESS        TTL := { 0..255 } (default=64)        KEY := { DOTTED_QUAD | NUMBER }        ELIM := { none | 0..255 }(default=4)        TCLASS := { 0x0..0xff | inherit }        FLOWLABEL := { 0x0..0xfffff | inherit }        MARK := { 0x0..0xffffffff | inherit } Cannot find device "ip6gretap00" FAIL: ip6gretap === RET 255 === Usage: ... { gre | gretap | erspan } [ remote ADDR ]                             [ local ADDR ]                             [ [i|o]seq ]                             [ [i|o]key KEY ]                             [ [i|o]csum ]                             [ ttl TTL ]                             [ tos TOS ]                             [ [no]pmtudisc ]                             [ [no]ignore-df ]                             [ dev PHYS_DEV ]                             [ noencap ]                             [ encap { fou | gue | none } ]                             [ encap-sport PORT ]                             [ encap-dport PORT ]                             [ [no]encap-csum ]                             [ [no]encap-csum6 ]                             [ [no]encap-remcsum ]                             [ external ]                             [ fwmark MARK ]                             [ erspan IDX ] Where: ADDR := { IP_ADDRESS | any }        TOS := { NUMBER | inherit }        TTL := { 1..255 | inherit }        KEY := { DOTTED_QUAD | NUMBER }        MARK := { 0x0..0xffffffff } Cannot find device "erspan00" Cannot find device "erspan00" Cannot find device "erspan00" Usage: ... { gre | gretap | erspan } [ remote ADDR ]                             [ local ADDR ]                             [ [i|o]seq ]                             [ [i|o]key KEY ]                             [ [i|o]csum ]                             [ ttl TTL ]                             [ tos TOS ]                             [ [no]pmtudisc ]                             [ [no]ignore-df ]                             [ dev PHYS_DEV ]                             [ noencap ]                             [ encap { fou | gue | none } ]                             [ encap-sport PORT ]                             [ encap-dport PORT ]                             [ [no]encap-csum ]                             [ [no]encap-csum6 ]                             [ [no]encap-remcsum ]                             [ external ]                             [ fwmark MARK ]                             [ erspan IDX ] Where: ADDR := { IP_ADDRESS | any }        TOS := { NUMBER | inherit }        TTL := { 1..255 | inherit }        KEY := { DOTTED_QUAD | NUMBER }        MARK := { 0x0..0xffffffff } Cannot find device "erspan00" Cannot find device "erspan00" Cannot find device "erspan00" FAIL: erspan === RET 255 === Usage: ... { ip6gre | ip6gretap | ip6erspan} [ remote ADDR ]                                   [ local ADDR ]                                   [ [i|o]seq ]                                   [ [i|o]key KEY ]                                   [ [i|o]csum ]                                   [ hoplimit TTL ]                                   [ encaplimit ELIM ]                                   [ tclass TCLASS ]                                   [ flowlabel FLOWLABEL ]                                   [ dscp inherit ]                                   [ fwmark MARK ]                                   [ dev PHYS_DEV ]                                   [ noencap ]                                   [ encap { fou | gue | none } ]                                   [ encap-sport PORT ]                                   [ encap-dport PORT ]                                   [ [no]encap-csum ]                                   [ [no]encap-csum6 ]                                   [ [no]encap-remcsum ]                                   [ erspan IDX ] Where: ADDR := IPV6_ADDRESS        TTL := { 0..255 } (default=64)        KEY := { DOTTED_QUAD | NUMBER }        ELIM := { none | 0..255 }(default=4)        TCLASS := { 0x0..0xff | inherit }        FLOWLABEL := { 0x0..0xfffff | inherit }        MARK := { 0x0..0xffffffff | inherit } Cannot find device "ip6erspan00" Cannot find device "ip6erspan00" Cannot find device "ip6erspan00" Usage: ... { ip6gre | ip6gretap | ip6erspan} [ remote ADDR ]                                   [ local ADDR ]                                   [ [i|o]seq ]                                   [ [i|o]key KEY ]                                   [ [i|o]csum ]                                   [ hoplimit TTL ]                                   [ encaplimit ELIM ]                                   [ tclass TCLASS ]                                   [ flowlabel FLOWLABEL ]                                   [ dscp inherit ]                                   [ fwmark MARK ]                                   [ dev PHYS_DEV ]                                   [ noencap ]                                   [ encap { fou | gue | none } ]                                   [ encap-sport PORT ]                                   [ encap-dport PORT ]                                   [ [no]encap-csum ]                                   [ [no]encap-csum6 ]                                   [ [no]encap-remcsum ]                                   [ erspan IDX ] Where: ADDR := IPV6_ADDRESS        TTL := { 0..255 } (default=64)        KEY := { DOTTED_QUAD | NUMBER }        ELIM := { none | 0..255 }(default=4)        TCLASS := { 0x0..0xff | inherit }        FLOWLABEL := { 0x0..0xfffff | inherit }        MARK := { 0x0..0xffffffff | inherit } Cannot find device "ip6erspan00" Cannot find device "ip6erspan00" Cannot find device "ip6erspan00" Usage: ... { ip6gre | ip6gretap | ip6erspan} [ remote ADDR ]                                   [ local ADDR ]                                   [ [i|o]seq ]                                   [ [i|o]key KEY ]                                   [ [i|o]csum ]                                   [ hoplimit TTL ]                                   [ encaplimit ELIM ]                                   [ tclass TCLASS ]                                   [ flowlabel FLOWLABEL ]                                   [ dscp inherit ]                                   [ fwmark MARK ]                                   [ dev PHYS_DEV ]                                   [ noencap ]                                   [ encap { fou | gue | none } ]                                   [ encap-sport PORT ]                                   [ encap-dport PORT ]                                   [ [no]encap-csum ]                                   [ [no]encap-csum6 ]                                   [ [no]encap-remcsum ]                                   [ erspan IDX ] Where: ADDR := IPV6_ADDRESS        TTL := { 0..255 } (default=64)        KEY := { DOTTED_QUAD | NUMBER }        ELIM := { none | 0..255 }(default=4)        TCLASS := { 0x0..0xff | inherit }        FLOWLABEL := { 0x0..0xfffff | inherit }        MARK := { 0x0..0xffffffff | inherit } Cannot find device "ip6erspan00" FAIL: ip6erspan === RET 255 === PASS: bridge setup === RET 0 === PASS: ipv6 addrlabel === RET 0 === PASS: set ifalias a1214e60-3ac4-4fd4-8a98-aac4c0b4bfab for test-dummy0 === RET 0 === PASS: vrf === RET 0 === PASS: vxlan FAIL: can't add fou port 7777, skipping test === RET 0 === PASS: macsec === RET 0 === PASS: ipsec === RET 0 === PASS: ipsec_offload === RET 0 === SKIP: fdb get tests: iproute2 too old === RET 0 === SKIP: fdb get tests: iproute2 too old === RET 0 === === RET 0 === == 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. == Original Bug Report == In this test, it uses ret to store the return value of each test. However, this value will be reset to 0 in the beginning of each test. In the end of this test, it will judge PASS/FAIL base on this value. Thus this will cause false-negative in some cases. Below is an example for the test on Bionic OEM-OSP1, test "ip6erspan", "erspan", "ip6gretap" failed with return value 255, but the return value will soon be overridden with 0 if following test passed without any issue (I made the test to print === RET $ret === line for debugging purpose): PASS: policy routing === RET 0 === PASS: route get === RET 0 === PASS: preferred_lft addresses have expired === RET 0 === PASS: tc htb hierarchy === RET 0 === PASS: gre tunnel endpoint === RET 0 === PASS: gretap === RET 0 === Usage: ... { ip6gre | ip6gretap | ip6erspan} [ remote ADDR ]                                   [ local ADDR ]                                   [ [i|o]seq ]                                   [ [i|o]key KEY ]                                   [ [i|o]csum ]                                   [ hoplimit TTL ]                                   [ encaplimit ELIM ]                                   [ tclass TCLASS ]                                   [ flowlabel FLOWLABEL ]                                   [ dscp inherit ]                                   [ fwmark MARK ]                                   [ dev PHYS_DEV ]                                   [ noencap ]                                   [ encap { fou | gue | none } ]                                   [ encap-sport PORT ]                                   [ encap-dport PORT ]                                   [ [no]encap-csum ]                                   [ [no]encap-csum6 ]                                   [ [no]encap-remcsum ]                                   [ erspan IDX ] Where: ADDR := IPV6_ADDRESS        TTL := { 0..255 } (default=64)        KEY := { DOTTED_QUAD | NUMBER }        ELIM := { none | 0..255 }(default=4)        TCLASS := { 0x0..0xff | inherit }        FLOWLABEL := { 0x0..0xfffff | inherit }        MARK := { 0x0..0xffffffff | inherit } Cannot find device "ip6gretap00" FAIL: ip6gretap === RET 255 === Usage: ... { gre | gretap | erspan } [ remote ADDR ]                             [ local ADDR ]                             [ [i|o]seq ]                             [ [i|o]key KEY ]                             [ [i|o]csum ]                             [ ttl TTL ]                             [ tos TOS ]                             [ [no]pmtudisc ]                             [ [no]ignore-df ]                             [ dev PHYS_DEV ]                             [ noencap ]                             [ encap { fou | gue | none } ]                             [ encap-sport PORT ]                             [ encap-dport PORT ]                             [ [no]encap-csum ]                             [ [no]encap-csum6 ]                             [ [no]encap-remcsum ]                             [ external ]                             [ fwmark MARK ]                             [ erspan IDX ] Where: ADDR := { IP_ADDRESS | any }        TOS := { NUMBER | inherit }        TTL := { 1..255 | inherit }        KEY := { DOTTED_QUAD | NUMBER }        MARK := { 0x0..0xffffffff } Cannot find device "erspan00" Cannot find device "erspan00" Cannot find device "erspan00" Usage: ... { gre | gretap | erspan } [ remote ADDR ]                             [ local ADDR ]                             [ [i|o]seq ]                             [ [i|o]key KEY ]                             [ [i|o]csum ]                             [ ttl TTL ]                             [ tos TOS ]                             [ [no]pmtudisc ]                             [ [no]ignore-df ]                             [ dev PHYS_DEV ]                             [ noencap ]                             [ encap { fou | gue | none } ]                             [ encap-sport PORT ]                             [ encap-dport PORT ]                             [ [no]encap-csum ]                             [ [no]encap-csum6 ]                             [ [no]encap-remcsum ]                             [ external ]                             [ fwmark MARK ]                             [ erspan IDX ] Where: ADDR := { IP_ADDRESS | any }        TOS := { NUMBER | inherit }        TTL := { 1..255 | inherit }        KEY := { DOTTED_QUAD | NUMBER }        MARK := { 0x0..0xffffffff } Cannot find device "erspan00" Cannot find device "erspan00" Cannot find device "erspan00" FAIL: erspan === RET 255 === Usage: ... { ip6gre | ip6gretap | ip6erspan} [ remote ADDR ]                                   [ local ADDR ]                                   [ [i|o]seq ]                                   [ [i|o]key KEY ]                                   [ [i|o]csum ]                                   [ hoplimit TTL ]                                   [ encaplimit ELIM ]                                   [ tclass TCLASS ]                                   [ flowlabel FLOWLABEL ]                                   [ dscp inherit ]                                   [ fwmark MARK ]                                   [ dev PHYS_DEV ]                                   [ noencap ]                                   [ encap { fou | gue | none } ]                                   [ encap-sport PORT ]                                   [ encap-dport PORT ]                                   [ [no]encap-csum ]                                   [ [no]encap-csum6 ]                                   [ [no]encap-remcsum ]                                   [ erspan IDX ] Where: ADDR := IPV6_ADDRESS        TTL := { 0..255 } (default=64)        KEY := { DOTTED_QUAD | NUMBER }        ELIM := { none | 0..255 }(default=4)        TCLASS := { 0x0..0xff | inherit }        FLOWLABEL := { 0x0..0xfffff | inherit }        MARK := { 0x0..0xffffffff | inherit } Cannot find device "ip6erspan00" Cannot find device "ip6erspan00" Cannot find device "ip6erspan00" Usage: ... { ip6gre | ip6gretap | ip6erspan} [ remote ADDR ]                                   [ local ADDR ]                                   [ [i|o]seq ]                                   [ [i|o]key KEY ]                                   [ [i|o]csum ]                                   [ hoplimit TTL ]                                   [ encaplimit ELIM ]                                   [ tclass TCLASS ]                                   [ flowlabel FLOWLABEL ]                                   [ dscp inherit ]                                   [ fwmark MARK ]                                   [ dev PHYS_DEV ]                                   [ noencap ]                                   [ encap { fou | gue | none } ]                                   [ encap-sport PORT ]                                   [ encap-dport PORT ]                                   [ [no]encap-csum ]                                   [ [no]encap-csum6 ]                                   [ [no]encap-remcsum ]                                   [ erspan IDX ] Where: ADDR := IPV6_ADDRESS        TTL := { 0..255 } (default=64)        KEY := { DOTTED_QUAD | NUMBER }        ELIM := { none | 0..255 }(default=4)        TCLASS := { 0x0..0xff | inherit }        FLOWLABEL := { 0x0..0xfffff | inherit }        MARK := { 0x0..0xffffffff | inherit } Cannot find device "ip6erspan00" Cannot find device "ip6erspan00" Cannot find device "ip6erspan00" Usage: ... { ip6gre | ip6gretap | ip6erspan} [ remote ADDR ]                                   [ local ADDR ]                                   [ [i|o]seq ]                                   [ [i|o]key KEY ]                                   [ [i|o]csum ]                                   [ hoplimit TTL ]                                   [ encaplimit ELIM ]                                   [ tclass TCLASS ]                                   [ flowlabel FLOWLABEL ]                                   [ dscp inherit ]                                   [ fwmark MARK ]                                   [ dev PHYS_DEV ]                                   [ noencap ]                                   [ encap { fou | gue | none } ]                                   [ encap-sport PORT ]                                   [ encap-dport PORT ]                                   [ [no]encap-csum ]                                   [ [no]encap-csum6 ]                                   [ [no]encap-remcsum ]                                   [ erspan IDX ] Where: ADDR := IPV6_ADDRESS        TTL := { 0..255 } (default=64)        KEY := { DOTTED_QUAD | NUMBER }        ELIM := { none | 0..255 }(default=4)        TCLASS := { 0x0..0xff | inherit }        FLOWLABEL := { 0x0..0xfffff | inherit }        MARK := { 0x0..0xffffffff | inherit } Cannot find device "ip6erspan00" FAIL: ip6erspan === RET 255 === PASS: bridge setup === RET 0 === PASS: ipv6 addrlabel === RET 0 === PASS: set ifalias a1214e60-3ac4-4fd4-8a98-aac4c0b4bfab for test-dummy0 === RET 0 === PASS: vrf === RET 0 === PASS: vxlan FAIL: can't add fou port 7777, skipping test === RET 0 === PASS: macsec === RET 0 === PASS: ipsec === RET 0 === PASS: ipsec_offload === RET 0 === SKIP: fdb get tests: iproute2 too old === RET 0 === SKIP: fdb get tests: iproute2 too old === RET 0 === === RET 0 ===
2020-08-12 12:06:55 Po-Hsu Lin summary Return value in rtnetlink.sh from kselftests/net will be override in the last test Fix false-negative return value for rtnetlink.sh in kselftests/net
2020-08-12 12:09:35 Po-Hsu Lin linux (Ubuntu Bionic): assignee Po-Hsu Lin (cypressyew)
2020-08-12 12:09:37 Po-Hsu Lin linux (Ubuntu Eoan): assignee Po-Hsu Lin (cypressyew)
2020-08-12 12:09:39 Po-Hsu Lin linux (Ubuntu Focal): assignee Po-Hsu Lin (cypressyew)
2020-08-12 12:09:40 Po-Hsu Lin linux (Ubuntu Groovy): assignee Po-Hsu Lin (cypressyew)
2020-08-12 12:09:44 Po-Hsu Lin linux (Ubuntu Groovy): status Incomplete In Progress
2020-08-12 12:09:48 Po-Hsu Lin linux (Ubuntu Eoan): status New In Progress
2020-08-12 12:09:51 Po-Hsu Lin linux (Ubuntu Bionic): status New In Progress
2020-08-12 12:09:51 Po-Hsu Lin linux (Ubuntu Focal): status New In Progress
2020-08-20 21:35:22 Ian May linux (Ubuntu Focal): status In Progress Fix Committed
2020-08-25 21:22:05 Ian May linux (Ubuntu Bionic): status In Progress Fix Committed
2020-08-28 05:59:07 Kelsey Steele bug task added linux-hwe (Ubuntu)
2020-08-28 05:59:23 Kelsey Steele linux-hwe (Ubuntu Bionic): status New Fix Committed
2020-08-28 05:59:36 Kelsey Steele bug task deleted linux-hwe (Ubuntu Eoan)
2020-08-28 05:59:42 Kelsey Steele bug task deleted linux-hwe (Ubuntu Focal)
2020-08-28 05:59:48 Kelsey Steele bug task deleted linux-hwe (Ubuntu Groovy)
2020-08-28 06:00:07 Kelsey Steele linux (Ubuntu Eoan): status In Progress Invalid
2020-08-31 21:02:50 Ubuntu Kernel Bot tags sru-20200720 ubuntu-kernel-selftests sru-20200720 ubuntu-kernel-selftests verification-needed-focal
2020-09-01 21:32:54 Ubuntu Kernel Bot tags sru-20200720 ubuntu-kernel-selftests verification-needed-focal sru-20200720 ubuntu-kernel-selftests verification-needed-bionic verification-needed-focal
2020-09-02 10:56:52 Kleber Sacilotto de Souza tags sru-20200720 ubuntu-kernel-selftests verification-needed-bionic verification-needed-focal sru-20200720 ubuntu-kernel-selftests verification-done-focal verification-needed-bionic
2020-09-03 12:27:49 Kleber Sacilotto de Souza tags sru-20200720 ubuntu-kernel-selftests verification-done-focal verification-needed-bionic sru-20200720 ubuntu-kernel-selftests verification-done-bionic verification-done-focal
2020-09-03 21:55:34 Launchpad Janitor linux (Ubuntu Groovy): status In Progress Fix Released
2020-09-03 21:55:34 Launchpad Janitor cve linked 2019-19770
2020-09-17 08:36:42 Po-Hsu Lin linux-hwe (Ubuntu): status New Invalid
2020-09-21 10:33:07 Launchpad Janitor linux (Ubuntu Bionic): status Fix Committed Fix Released
2020-09-21 10:33:07 Launchpad Janitor cve linked 2020-12888
2020-09-21 10:38:15 Launchpad Janitor linux (Ubuntu Focal): status Fix Committed Fix Released
2020-09-21 10:42:52 Launchpad Janitor linux-hwe (Ubuntu): status Invalid Fix Released
2020-10-13 22:48:12 Launchpad Janitor linux-hwe (Ubuntu Bionic): status Fix Committed Fix Released
2020-10-13 22:48:12 Launchpad Janitor cve linked 2020-16119
2020-10-13 22:48:12 Launchpad Janitor cve linked 2020-16120
2020-10-19 09:15:07 Po-Hsu Lin ubuntu-kernel-tests: status In Progress Fix Released