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] [day] [month] [year] [list]
Message-ID: <3e3d94d5-2a7f-4c05-b4ce-c6c8ca4e1186@linuxfoundation.org>
Date: Fri, 26 Jul 2024 11:32:41 -0600
From: Shuah Khan <skhan@...uxfoundation.org>
To: Zhu Jun <zhujun2@...s.chinamobile.com>, zhang.lyra@...il.com
Cc: shuah@...nel.org, kees@...nel.org, luto@...capital.net, wad@...omium.org,
 linux-kselftest@...r.kernel.org, linux-kernel@...r.kernel.org,
 Shuah Khan <skhan@...uxfoundation.org>
Subject: Re: [PATCH v5] tools/testing:Fix the wrong format specifier

On 7/25/24 20:32, Zhu Jun wrote:
> The format specifier in fprintf is "%u", that "%u" should use
> unsigned int type instead.the problem is discovered by reading code.
> 
> Signed-off-by: Zhu Jun <zhujun2@...s.chinamobile.com>
> ---
>   v1->v2:
>   	modify commit info add how to find the problem in the log
>   v2->v3:
>   	Seems this can use macro WTERMSIG like those above usage, rather than
>   	changing the print format.
>   v3->v4:
>   	Now the commit summary doesn't match the change you are making.
> 	 Also WTERMSIG() is incorrect for this conditional code path.
> 	 See comments below in the code path.
> 
> 	 I would leave the v2 code intact. How are you testing this change?
> 	 Please include the details in the change log.

I am asking you to send the v2 change with updated change log
to show how this change is tested.

> v4->v5:
> 	Compile the kernel for testing using make

Running make isn't sufficient - please verify running the tests
making sure there are no regressions. Since you are changing the
harness, you want to make sure this change You are changing the
harness.

> 
> 
>   tools/testing/selftests/kselftest_harness.h | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tools/testing/selftests/kselftest_harness.h b/tools/testing/selftests/kselftest_harness.h
> index e05ac8261046..675b8f43e148 100644
> --- a/tools/testing/selftests/kselftest_harness.h
> +++ b/tools/testing/selftests/kselftest_harness.h
> @@ -910,7 +910,7 @@ void __wait_for_test(struct __test_metadata *t)
>   		.sa_flags = SA_SIGINFO,
>   	};
>   	struct sigaction saved_action;
> -	int status;
> +	unsigned int status;

I am asking you to send the v2 change with updated change log
to show how this change is tested.
		fprintf(TH_LOG_STREAM,
-			"# %s: Test ended in some other way [%u]\n",
+			"# %s: Test ended in some other way [%d]\n",
  			t->name,

%d makes sense here in this message.

thanks,
-- Shuah

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ