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: <20170805151541.GB3031@lianli.shorne-pla.net>
Date:   Sun, 6 Aug 2017 00:15:41 +0900
From:   Stafford Horne <shorne@...il.com>
To:     Shuah Khan <shuahkh@....samsung.com>
Cc:     dvhart@...radead.org, shuah@...nel.org, tglx@...utronix.de,
        mingo@...hat.com, peterz@...radead.org, naresh.kamboju@...aro.org,
        linux-kernel@...r.kernel.org, linux-kselftest@...r.kernel.org
Subject: Re: [PATCH] selftests: futex: convert test to use ksft TAP13
 framework

On Fri, Aug 04, 2017 at 06:46:50PM -0600, Shuah Khan wrote:
> Convert test to use ksft TAP13 framework.


> --- a/tools/testing/selftests/futex/include/logging.h
> +++ b/tools/testing/selftests/futex/include/logging.h
> @@ -109,22 +109,20 @@ void log_verbosity(int level)
>   */
>  void print_result(const char *test_name, int ret)
>  {
> -	const char *result = "Unknown return code";
> -
>  	switch (ret) {
>  	case RET_PASS:
> -		ksft_inc_pass_cnt();
> -		result = PASS;
> -		break;
> +		ksft_test_result_pass("%s\n", test_name);
> +		ksft_print_cnts();
> +		return;
>  	case RET_ERROR:
> -		result = ERROR;
> -		break;
> +		ksft_test_result_error("%s\n", test_name);
> +		ksft_print_cnts();
> +		return;

This looks ok to me, but this function `ksft_test_result_error` was added
in another patch you just sent, it was a bit hard to review.

If you need to make and updates, could you please send a series next?

-Stafford

>  	case RET_FAIL:
> -		ksft_inc_fail_cnt();
> -		result = FAIL;
> -		break;
> +		ksft_test_result_fail("%s\n", test_name);
> +		ksft_print_cnts();
> +		return;
>  	}
> -	printf("selftests: %s [%s]\n", test_name, result);

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ