selftests: pmtu.sh: improve the test result processing
authorPo-Hsu Lin <po-hsu.lin@canonical.com>
Tue, 10 Nov 2020 02:00:49 +0000 (10:00 +0800)
committerJakub Kicinski <kuba@kernel.org>
Thu, 12 Nov 2020 15:56:30 +0000 (07:56 -0800)
commit2a9d3716b810a4f2c8291b7aa8f358d11693f6e5
treeb3950632ab3a462907da3d90ee8f55b9f21cc34f
parentef1220a7d4bbdb5fc435d691776778568dfb69a8
selftests: pmtu.sh: improve the test result processing

This test will treat all non-zero return codes as failures, it will
make the pmtu.sh test script being marked as FAILED when some
sub-test got skipped.

Improve the result processing by
  * Only mark the whole test script as SKIP when all of the
    sub-tests were skipped
  * If the sub-tests were either passed or skipped, the overall
    result will be PASS
  * If any of them has failed with return code 1 or anything bad
    happened (e.g. return code 127 for command not found), the
    overall result will be FAIL

Signed-off-by: Po-Hsu Lin <po-hsu.lin@canonical.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
tools/testing/selftests/net/pmtu.sh