Skip to content

Commit 28d2188

Browse files
taosu-linuxakpm00
authored andcommitted
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: 38c957f ("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]>
1 parent 6bb955f commit 28d2188

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

tools/testing/selftests/kselftest_harness.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@ static_assert(0, "kselftest harness requires _GNU_SOURCE to be defined");
5656
#include <asm/types.h>
5757
#include <ctype.h>
5858
#include <errno.h>
59-
#include <limits.h>
6059
#include <stdbool.h>
6160
#include <stdint.h>
6261
#include <stdio.h>
@@ -1217,7 +1216,7 @@ void __run_test(struct __fixture_metadata *f,
12171216
struct __test_metadata *t)
12181217
{
12191218
struct __test_xfail *xfail;
1220-
char test_name[LINE_MAX];
1219+
char test_name[1024];
12211220
const char *diagnostic;
12221221

12231222
/* reset test struct */

0 commit comments

Comments
 (0)