lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20201107150200.509523e3@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com>
Date:   Sat, 7 Nov 2020 15:02:00 -0800
From:   Jakub Kicinski <kuba@...nel.org>
To:     Po-Hsu Lin <po-hsu.lin@...onical.com>
Cc:     netdev@...r.kernel.org, linux-kselftest@...r.kernel.org,
        linux-kernel@...r.kernel.org, davem@...emloft.net,
        skhan@...uxfoundation.org
Subject: Re: [PATCH 2/2] selftests: pmtu.sh: improve the test result
 processing

On Thu,  5 Nov 2020 18:50:51 +0800 Po-Hsu Lin wrote:
> 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, the overall result will be FAIL
>   * Treat other return codes (e.g. 127 for command not found) as FAIL
> 
> Signed-off-by: Po-Hsu Lin <po-hsu.lin@...onical.com>

Patch 1 looks like a cleanup while patch 2 is more of a fix, can we
separate the two and apply the former to -next and latter to 5.10?
They shouldn't conflict, right?

> diff --git a/tools/testing/selftests/net/pmtu.sh b/tools/testing/selftests/net/pmtu.sh
> index fb53987..5c86fb1 100755
> --- a/tools/testing/selftests/net/pmtu.sh
> +++ b/tools/testing/selftests/net/pmtu.sh
> @@ -1652,7 +1652,23 @@ run_test() {
>  	return $ret
>  	)
>  	ret=$?
> -	[ $ret -ne 0 ] && exitcode=1
> +	case $ret in
> +		0)
> +			all_skipped=false
> +			[ $exitcode=$ksft_skip ] && exitcode=0
> +		;;
> +		1)
> +			all_skipped=false
> +			exitcode=1
> +		;;

Does it make sense to remove this case? The handling is identical to
the default case *).

> +		$ksft_skip)
> +			[ $all_skipped = true ] && exitcode=$ksft_skip
> +		;;
> +		*)
> +			all_skipped=false
> +			exitcode=1
> +		;;
> +	esac
>  
>  	return $ret
>  }
> @@ -1786,6 +1802,7 @@ usage() {
>  #
>  exitcode=0
>  desc=0
> +all_skipped=true
>  
>  while getopts :ptv o
>  do

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ