selftests: kselftest.h: fix compilation errors
PATCH 1/1 selftests: kselftest.h: fix compilation errors
In next branch, Various build failed with:
In file included from membarrier_test.c:8:0:../kselftest.h: In function ‘ksft_print_header’:../kselftest.h:61:3: error: expected ‘)’ before ‘printf’
printf("TAP version 13\n");
^../kselftest.h:62:1: error: expected expression before ‘}’ token
}
^
--- tools/testing/selftests/kselftest.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tools/testing/selftests/kselftest.h +1 -1
@@ -57,7 +57,7 @@ static inline int ksft_get_error_cnt(void) { return ksft_cnt.ksft_error; }static inline void ksft_print_header (void ) { - if (!(getenv("KSFT_TAP_LEVEL")) +if (!(getenv ("KSFT_TAP_LEVEL" )))printf ("TAP version 13\n" ); }
Signature · 6 lines
2.11.0 -- To unsubscribe from this list: send the line "unsubscribe linux-kselftest" in the body of a message to majordomo at vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 22 lines · Lei Yang
In next branch, Various build failed with:
In file included from membarrier_test.c:8:0:
../kselftest.h: In function ‘ksft_print_header’:../kselftest.h:61:3: error: expected ‘)’ before ‘printf’printf("TAP version 13\n"); ^
../kselftest.h:62:1: error: expected expression before ‘}’ token
}
^Signed-off-by Lei Yang <Lei.Yang at windriver.com>--- tools/testing/selftests/kselftest.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)tools/testing/selftests/kselftest.h +0
-0
tools/testing/selftests/kselftest.h static inline int ksft_get_error_cnt(void) { return ksft_cnt.ksft_error; } · line 63
Quoted 8 lines
tools/testing/selftests/kselftest.h +1
-1@@ -57,7 +57,7 @@ static inline int ksft_get_error_cnt(void) { return ksft_cnt.ksft_error; }static inline void ksft_print_header (void ) { - if (!(getenv("KSFT_TAP_LEVEL")) +if (!(getenv ("KSFT_TAP_LEVEL" )))printf ("TAP version 13\n" ); }
Thanks for the patch. It was a mistake that the original patch ended up in the linux-kselftest next branch. My bad. I ended up committing the patch my mistake. It is now removed.
thanks,
-- Shuah
--
To unsubscribe from this list: send the line "unsubscribe linux-kselftest" in the body of a message to majordomo at vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html