mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-06 10:00:17 +00:00
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>
This commit is contained in:
committed by
Jakub Kicinski
parent
ef1220a7d4
commit
2a9d3716b8
@@ -1652,7 +1652,19 @@ run_test() {
|
|||||||
return $ret
|
return $ret
|
||||||
)
|
)
|
||||||
ret=$?
|
ret=$?
|
||||||
[ $ret -ne 0 ] && exitcode=1
|
case $ret in
|
||||||
|
0)
|
||||||
|
all_skipped=false
|
||||||
|
[ $exitcode=$ksft_skip ] && exitcode=0
|
||||||
|
;;
|
||||||
|
$ksft_skip)
|
||||||
|
[ $all_skipped = true ] && exitcode=$ksft_skip
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
all_skipped=false
|
||||||
|
exitcode=1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
return $ret
|
return $ret
|
||||||
}
|
}
|
||||||
@@ -1786,6 +1798,7 @@ usage() {
|
|||||||
#
|
#
|
||||||
exitcode=0
|
exitcode=0
|
||||||
desc=0
|
desc=0
|
||||||
|
all_skipped=true
|
||||||
|
|
||||||
while getopts :ptv o
|
while getopts :ptv o
|
||||||
do
|
do
|
||||||
|
|||||||
Reference in New Issue
Block a user