]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commit
selftests: icmp_redirect: pass xfail=0 to log_test()
authorPo-Hsu Lin <po-hsu.lin@canonical.com>
Tue, 28 Dec 2021 09:43:00 +0000 (10:43 +0100)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Thu, 13 Jan 2022 17:43:11 +0000 (18:43 +0100)
commit66dead5b495a940eea5f5dd608aa95d1588e839d
tree1e3f63d6901efa837aa623e90be1083a7d2e1eb0
parent642d49aaa126197d6576c1d6f418bd4e5cc0cd2b
selftests: icmp_redirect: pass xfail=0 to log_test()

BugLink: https://bugs.launchpad.net/bugs/1938964
If any sub-test in this icmp_redirect.sh is failing but not expected
to fail. The script will complain:
    ./icmp_redirect.sh: line 72: [: 1: unary operator expected

This is because when the sub-test is not expected to fail, we won't
pass any value for the xfail local variable in log_test() and thus
it's empty. Fix this by passing 0 as the 4th variable to log_test()
for non-xfail cases.

v2: added fixes tag

Fixes: 0a36a75c6818 ("selftests: icmp_redirect: support expected failures")
Signed-off-by: Po-Hsu Lin <po-hsu.lin@canonical.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit 3748939bce3fc7a15ef07161826507fbe410bb7a)
Signed-off-by: Po-Hsu Lin <po-hsu.lin@canonical.com>
Acked-by: Tim Gardner <tim.gardner@canonical.com>
Acked-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
tools/testing/selftests/net/icmp_redirect.sh