xfrm_policy.sh in net from ubuntu_kernel_selftests passed with failed sub-cases
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
ubuntu-kernel-tests |
Fix Released
|
Undecided
|
Po-Hsu Lin | ||
linux (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Bionic |
Invalid
|
Undecided
|
Unassigned | ||
Focal |
Fix Released
|
Undecided
|
Unassigned | ||
Groovy |
Fix Released
|
Undecided
|
Po-Hsu Lin | ||
Hirsute |
Fix Released
|
Undecided
|
Unassigned | ||
linux-oem-5.6 (Ubuntu) |
Invalid
|
Undecided
|
Unassigned | ||
Bionic |
Invalid
|
Undecided
|
Unassigned | ||
Focal |
Fix Released
|
Undecided
|
Po-Hsu Lin | ||
Groovy |
Invalid
|
Undecided
|
Unassigned | ||
Hirsute |
Invalid
|
Undecided
|
Unassigned |
Bug Description
[Impact]
Even with failed cases reported in the xfrm_policy.sh test, the overall result is still "PASS"
$ sudo ./xfrm_policy.sh
# selftests: net: xfrm_policy.sh
# PASS: policy before exception matches
# FAIL: expected ping to .254 to fail (exceptions)
# PASS: direct policy matches (exceptions)
# PASS: policy matches (exceptions)
# FAIL: expected ping to .254 to fail (exceptions and block policies)
# PASS: direct policy matches (exceptions and block policies)
# PASS: policy matches (exceptions and block policies)
# FAIL: expected ping to .254 to fail (exceptions and block policies after hresh changes)
# PASS: direct policy matches (exceptions and block policies after hresh changes)
# PASS: policy matches (exceptions and block policies after hresh changes)
# FAIL: expected ping to .254 to fail (exceptions and block policies after hthresh change in ns3)
# PASS: direct policy matches (exceptions and block policies after hthresh change in ns3)
# PASS: policy matches (exceptions and block policies after hthresh change in ns3)
# FAIL: expected ping to .254 to fail (exceptions and block policies after htresh change to normal)
# PASS: direct policy matches (exceptions and block policies after htresh change to normal)
# PASS: policy matches (exceptions and block policies after htresh change to normal)
# PASS: policies with repeated htresh change
ok 12 selftests: net: xfrm_policy.sh
$ echo $?
0
This is because of the variable "lret" in check_xfrm() is not a local variable, and it looks like it will override the one in check_exceptions() thus making the return value become 0 for the passed test case after the failed one.
[Fix]
* f6e9ceb7a7fc32 (" selftests: xfrm: fix test return value override issue in xfrm_policy.sh")
Focal kernel got this patch via stable update, and we don't have this test in Bionic. Only Groovy and OEM-5.6 are affected.
This patch can be cherry-picked into all of the affected kernels.
[Test]
Run the xfrm_policy.sh test, if there is any failed case the final result will not be 0.
[Regression Potential]
This change is just for testing tools, it's unlikely to affect real kernel functionality. However it's expected to generate failures in our test report as it's reflecting the real test result.
Changed in ubuntu-kernel-tests: | |
status: | New → In Progress |
assignee: | nobody → Po-Hsu Lin (cypressyew) |
tags: | added: sru-20201130 |
tags: | added: ubuntu-kernel-selftests |
Changed in linux-oem-5.6 (Ubuntu Bionic): | |
status: | New → Invalid |
Changed in linux-oem-5.6 (Ubuntu Groovy): | |
status: | New → Invalid |
Changed in linux-oem-5.6 (Ubuntu Hirsute): | |
status: | New → Invalid |
Changed in linux (Ubuntu Focal): | |
status: | Incomplete → Fix Released |
Changed in linux (Ubuntu Bionic): | |
status: | Incomplete → Invalid |
Changed in linux (Ubuntu Groovy): | |
assignee: | nobody → Po-Hsu Lin (cypressyew) |
status: | Incomplete → In Progress |
Changed in linux (Ubuntu Hirsute): | |
status: | Incomplete → Fix Released |
Changed in linux-oem-5.6 (Ubuntu Focal): | |
assignee: | nobody → Po-Hsu Lin (cypressyew) |
status: | New → In Progress |
description: | updated |
description: | updated |
tags: | added: groovy |
Changed in linux (Ubuntu Groovy): | |
status: | In Progress → Fix Committed |
Changed in ubuntu-kernel-tests: | |
status: | In Progress → Fix Released |
tags: |
added: verification-done-focal removed: verification-needed-focal |
This bug is missing log files that will aid in diagnosing the problem. While running an Ubuntu kernel (not a mainline or third-party kernel) please enter the following command in a terminal window:
apport-collect 1909647
and then change the status of the bug to 'Confirmed'.
If, due to the nature of the issue you have encountered, you are unable to run this command, please add a comment stating that fact and change the bug status to 'Confirmed'.
This change has been made by an automated script, maintained by the Ubuntu Kernel Team.