Skip to contentSkip to conversation

selftests-harness-use-1024-in-place-of-line_max.patch removed from -mm tree

merged mm-nonmm-stable Andrew Morton 1 participant 1 message May 19, 2024

lore
Share & tools
lore

Andrew Morton

author tree notice Applied
#0 lore raw

The quilt patch titled
Subject: selftests/harness: use 1024 in place of LINE_MAX
has been removed from the -mm tree. Its filename was
selftests-harness-use-1024-in-place-of-line_max.patch

This patch was dropped because it was merged into the mm-nonmm-stable branch of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

------------------------------------------------------
From: Tao Su <[email protected]>
Subject: selftests/harness: use 1024 in place of LINE_MAX
Date: Thu, 9 May 2024 13:31:13 +0800

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")
Cc Alexandre Belloni <[email protected]>
Cc Bongsu Jeon <[email protected]>
Cc Dave Hansen <[email protected]>
Cc David S. Miller <[email protected]>
Cc Edward Liaw <[email protected]>
Cc Eric Dumazet <[email protected]>
Cc Ivan Orlov <[email protected]>
Cc Jakub Kicinski <[email protected]>
Cc Jarkko Sakkinen <[email protected]>
Cc Jaroslav Kysela <[email protected]>
Cc Mark Brown <[email protected]>
Cc Paolo Abeni <[email protected]>
Cc Paolo Bonzini <[email protected]>
Cc Sean Christopherson <[email protected]>
Cc Shuah Khan <[email protected]>
Cc Takashi Iwai <[email protected]>

---

 tools/testing/selftests/kselftest_harness.h |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
tools/testing/selftests/kselftest_harness.h renamed from tools/testing/selftests/kselftest_harness.h~selftests-harness-use-1024-in-place-of-line_max +1 -2
@@ -56,7 +56,6 @@ static_assert(0, "kselftest harness requ
 #include <asm/types.h>
 #include <ctype.h>
 #include <errno.h>
-#include <limits.h>
 #include <stdbool.h>
 #include <stdint.h>
 #include <stdio.h>
@@ -1217,7 +1216,7 @@ void __run_test(struct __fixture_metadat
 		struct __test_metadata *t)
 {
 	struct __test_xfail *xfail;
-	char test_name[LINE_MAX];
+	char test_name[1024];
 	const char *diagnostic;
 
 	/* reset test struct */

_

Patches currently in -mm which might be from [email protected] are