← Back to team overview

canonical-ubuntu-qa team mailing list archive

[Bug 2043198] [NEW] Fix pmtu.sh result checking in ubuntu_kernel_selftests

 

Public bug reported:

[Impact] 
In pmtu.sh test from ubuntu_kernel_selftests, there is a syntax issue for test result checking which will make it always report pass if the last test in the script has passed.

[Fix]
* 63e201916b selftests: pmtu.sh: fix result checking

[Test Plan]
Run the patched pmtu.sh from kernel tree. Also apply the following patch to validate this fix:

diff --git a/tools/testing/selftests/net/pmtu.sh b/tools/testing/selftests/net/pmtu.sh
index f838dd3..cb62a75 100755
--- a/tools/testing/selftests/net/pmtu.sh
+++ b/tools/testing/selftests/net/pmtu.sh
@@ -266,7 +266,9 @@ tests="
        list_flush_ipv4_exception       ipv4: list and flush cached exceptions  1
        list_flush_ipv6_exception       ipv6: list and flush cached exceptions  1
        pmtu_ipv4_route_change          ipv4: PMTU exception w/route replace    1
-       pmtu_ipv6_route_change          ipv6: PMTU exception w/route replace    1"
+       pmtu_ipv6_route_change          ipv6: PMTU exception w/route replace    1
+       emit_fail                       Test that will emit fail result         0
+       emit_pass                       Test that will emit pass result         0"
 
 NS_A="ns-A"
 NS_B="ns-B"
@@ -2232,6 +2234,13 @@ test_pmtu_ipv6_route_change() {
        test_pmtu_ipvX_route_change 6
 }
 
+test_emit_fail() {
+       false
+}
+test_emit_pass() {
+       true
+}
+
 usage() {
        echo
        echo "$0 [OPTIONS] [TEST]..."


Check the return value of this script, it should be 1

[Regression Potential]
This is just changing test result processing behaviour, no actual impact to any kernel function. But we might see new failure discovered by this test.

** Affects: ubuntu-kernel-tests
     Importance: Undecided
         Status: New


** Tags: ubuntu-kernel-selftests

-- 
You received this bug notification because you are a member of Canonical
Platform QA Team, which is subscribed to ubuntu-kernel-tests.
https://bugs.launchpad.net/bugs/2043198

Title:
  Fix pmtu.sh result checking in ubuntu_kernel_selftests

Status in ubuntu-kernel-tests:
  New

Bug description:
  [Impact] 
  In pmtu.sh test from ubuntu_kernel_selftests, there is a syntax issue for test result checking which will make it always report pass if the last test in the script has passed.

  [Fix]
  * 63e201916b selftests: pmtu.sh: fix result checking

  [Test Plan]
  Run the patched pmtu.sh from kernel tree. Also apply the following patch to validate this fix:

  diff --git a/tools/testing/selftests/net/pmtu.sh b/tools/testing/selftests/net/pmtu.sh
  index f838dd3..cb62a75 100755
  --- a/tools/testing/selftests/net/pmtu.sh
  +++ b/tools/testing/selftests/net/pmtu.sh
  @@ -266,7 +266,9 @@ tests="
          list_flush_ipv4_exception       ipv4: list and flush cached exceptions  1
          list_flush_ipv6_exception       ipv6: list and flush cached exceptions  1
          pmtu_ipv4_route_change          ipv4: PMTU exception w/route replace    1
  -       pmtu_ipv6_route_change          ipv6: PMTU exception w/route replace    1"
  +       pmtu_ipv6_route_change          ipv6: PMTU exception w/route replace    1
  +       emit_fail                       Test that will emit fail result         0
  +       emit_pass                       Test that will emit pass result         0"
   
   NS_A="ns-A"
   NS_B="ns-B"
  @@ -2232,6 +2234,13 @@ test_pmtu_ipv6_route_change() {
          test_pmtu_ipvX_route_change 6
   }
   
  +test_emit_fail() {
  +       false
  +}
  +test_emit_pass() {
  +       true
  +}
  +
   usage() {
          echo
          echo "$0 [OPTIONS] [TEST]..."

  
  Check the return value of this script, it should be 1

  [Regression Potential]
  This is just changing test result processing behaviour, no actual impact to any kernel function. But we might see new failure discovered by this test.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu-kernel-tests/+bug/2043198/+subscriptions



Follow ups