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-next>] [day] [month] [year] [list]
Message-Id: <20240724062624.5157-1-zhujun2@cmss.chinamobile.com>
Date: Tue, 23 Jul 2024 23:26:24 -0700
From: Zhu Jun <zhujun2@...s.chinamobile.com>
To: 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,
	zhujun2@...s.chinamobile.com
Subject: [PATCH v3] selftests:Fix printf format string in kselftest_harness.h

'%u' in format string requires 'unsigned int' in __wait_for_test()
but the argument type is 'signed int' that this problem was discovered
by reading code.use macro WTERMSIG like those above usage to
fix the wrong format specifier.

Signed-off-by: Zhu Jun <zhujun2@...s.chinamobile.com>
---
Changes 
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.

 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 dbbbcc6c04ee..f41f4435e9a4 100644
--- a/tools/testing/selftests/kselftest_harness.h
+++ b/tools/testing/selftests/kselftest_harness.h
@@ -1086,7 +1086,7 @@ void __wait_for_test(struct __test_metadata *t)
 		fprintf(TH_LOG_STREAM,
 			"# %s: Test ended in some other way [%d]\n",
 			t->name,
-			status);
+			WTERMSIG(status));
 	}
 }
 
-- 
2.17.1




Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ