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: <20240509053113.43462-3-tao1.su@linux.intel.com>
Date: Thu,  9 May 2024 13:31:13 +0800
From: Tao Su <tao1.su@...ux.intel.com>
To: linux-kselftest@...r.kernel.org,
	linux-kernel@...r.kernel.org,
	linux-sound@...r.kernel.org,
	kvm@...r.kernel.org,
	netdev@...r.kernel.org,
	linux-rtc@...r.kernel.org,
	linux-sgx@...r.kernel.org
Cc: akpm@...ux-foundation.org,
	edliaw@...gle.com,
	ivan.orlov0322@...il.com,
	broonie@...nel.org,
	perex@...ex.cz,
	tiwai@...e.com,
	shuah@...nel.org,
	seanjc@...gle.com,
	pbonzini@...hat.com,
	bongsu.jeon@...sung.com,
	davem@...emloft.net,
	edumazet@...gle.com,
	kuba@...nel.org,
	pabeni@...hat.com,
	alexandre.belloni@...tlin.com,
	jarkko@...nel.org,
	dave.hansen@...ux.intel.com,
	tao1.su@...ux.intel.com
Subject: [PATCH v2 2/2] selftests/harness: Use 1024 in place of LINE_MAX

Android was seeing a compilation error because its C library does not
define LINE_MAX. Since LINE_MAX is only used to determine the size of
test_name[] and 1024 should be enough for the test name, use 1024
instead of LINE_MAX.

Fixes: 38c957f07038 ("selftests: kselftest_harness: generate test name once")
Signed-off-by: Tao Su <tao1.su@...ux.intel.com>
---
 tools/testing/selftests/kselftest_harness.h | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/tools/testing/selftests/kselftest_harness.h b/tools/testing/selftests/kselftest_harness.h
index ba3ddeda24bf..610642f50977 100644
--- a/tools/testing/selftests/kselftest_harness.h
+++ b/tools/testing/selftests/kselftest_harness.h
@@ -56,7 +56,6 @@
 #include <asm/types.h>
 #include <ctype.h>
 #include <errno.h>
-#include <limits.h>
 #include <stdbool.h>
 #include <stdint.h>
 #include <stdio.h>
@@ -1159,7 +1158,7 @@ void __run_test(struct __fixture_metadata *f,
 		struct __test_metadata *t)
 {
 	struct __test_xfail *xfail;
-	char test_name[LINE_MAX];
+	char test_name[1024];
 	const char *diagnostic;
 
 	/* reset test struct */
-- 
2.34.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ