lkml.org 
[lkml]   [2018]   [Feb]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 4/5] selftests: size call ksft_print_header() to print TAP header
Date
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 <shuahkh@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
\
 
 \ /
  Last update: 2018-02-23 23:12    [W:0.079 / U:0.284 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site