APPLIED[F/G]: [F-OEM-5.6/F-OEM-5.10/F/G][SRU][PATCH 2/2] selftests: pmtu.sh: improve the test result processing

Kleber Souza kleber.souza at canonical.com
Wed Jul 7 14:15:05 UTC 2021


On 24.05.21 08:58, Po-Hsu Lin wrote:
> BugLink: https://bugs.launchpad.net/bugs/1887661
> 
> 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 at canonical.com>
> Signed-off-by: Jakub Kicinski <kuba at kernel.org>
> (cherry picked from commit 2a9d3716b810a4f2c8291b7aa8f358d11693f6e5)
> Signed-off-by: Po-Hsu Lin <po-hsu.lin at canonical.com>

My apologies, I failed to apply this second patch to Focal and Groovy
while applying this patchset from the mailing-list.

The verification with the partial fix was successful because on neither
of these series we have skipped testcases, however, pmtu.sh is still
failing in bionic/linux-hwe-5.4 because some features are not available
and some tests are skipped:

https://autopkgtest.ubuntu.com/results/autopkgtest-bionic/bionic/amd64/l/linux-hwe-5.4/20210703_113537_4ed63@/log.gz

I have now applied this patch to focal/linux and groovy/linux and reset
the status of the nomination for these two kernels on the tracking bug.

Thanks,
Kleber


> ---
>   tools/testing/selftests/net/pmtu.sh | 15 ++++++++++++++-
>   1 file changed, 14 insertions(+), 1 deletion(-)
> 
> diff --git a/tools/testing/selftests/net/pmtu.sh b/tools/testing/selftests/net/pmtu.sh
> index 0ae9c19..efa1e51 100755
> --- a/tools/testing/selftests/net/pmtu.sh
> +++ b/tools/testing/selftests/net/pmtu.sh
> @@ -1208,7 +1208,19 @@ run_test() {
>   	return $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
>   }
> @@ -1399,6 +1411,7 @@ usage() {
>   #
>   exitcode=0
>   desc=0
> +all_skipped=true
>   
>   while getopts :ptv o
>   do
> 




More information about the kernel-team mailing list