aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTao Su <[email protected]>2024-05-09 13:31:13 +0800
committerAndrew Morton <[email protected]>2024-05-19 14:36:20 -0700
commit28d2188709d9c19a7c4601c6870edd9fa0527379 (patch)
tree8079ef6cd8cb106271930dff595e2670ce2a42f7
parent6bb955fce08cbc8495a72755130d2d220994faee (diff)
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. Link: https://lkml.kernel.org/r/[email protected] Fixes: 38c957f07038 ("selftests: kselftest_harness: generate test name once") Signed-off-by: Tao Su <[email protected]> Reviewed-by: Simon Horman <[email protected]> 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]> Signed-off-by: Andrew Morton <[email protected]>
-rw-r--r--tools/testing/selftests/kselftest_harness.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/tools/testing/selftests/kselftest_harness.h b/tools/testing/selftests/kselftest_harness.h
index 605372356dd6..98749f5a2e56 100644
--- a/tools/testing/selftests/kselftest_harness.h
+++ b/tools/testing/selftests/kselftest_harness.h
@@ -56,7 +56,6 @@ static_assert(0, "kselftest harness requires _GNU_SOURCE to be defined");
#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_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 */