Call ksft_print_header() to print TAP header. This change helps prevent nested TAP headers when the test is run from run_tests and from script generated by emit_tests as in both of these cases KSFT_TAP_LEVEL will be set and ksft_print_header() will suppress the nested TAP header from size test.
Signed-off-by: Shuah Khan <shua...@osg.samsung.com> --- tools/testing/selftests/size/get_size.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/testing/selftests/size/get_size.c b/tools/testing/selftests/size/get_size.c index d4b59ab979a0..1280b09266f0 100644 --- a/tools/testing/selftests/size/get_size.c +++ b/tools/testing/selftests/size/get_size.c @@ -23,6 +23,8 @@ #include <sys/sysinfo.h> #include <unistd.h> +#include <stdio.h> +#include "../kselftest.h" #define STDOUT_FILENO 1 @@ -77,7 +79,7 @@ void _start(void) unsigned long used; static const char *test_name = " get runtime memory use\n"; - print("TAP version 13\n"); + ksft_print_header(); print("# Testing system size.\n"); ccode = sysinfo(&info); -- 2.14.1