[PATCH v2 2/2] kselftest: add ksft_print_msg() function to output general information

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Add a generic information output function: ksft_print_msg()

Signed-off-by: Paul Elder <paul.elder@xxxxxxxx>
---
Changes from v1: Removed auto-inserted newline character.

 tools/testing/selftests/kselftest.h | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/tools/testing/selftests/kselftest.h b/tools/testing/selftests/kselftest.h
index a00844e4c915..08e90c2cc5cb 100644
--- a/tools/testing/selftests/kselftest.h
+++ b/tools/testing/selftests/kselftest.h
@@ -55,6 +55,16 @@ static inline void ksft_print_cnts(void)
 	printf("1..%d\n", ksft_test_num());
 }
 
+static inline void ksft_print_msg(const char *msg, ...)
+{
+	va_list args;
+
+	va_start(args, msg);
+	printf("# ");
+	vprintf(msg, args);
+	va_end(args);
+}
+
 static inline void ksft_test_result_pass(const char *msg, ...)
 {
 	va_list args;
-- 
2.11.0

--
To unsubscribe from this list: send the line "unsubscribe linux-kselftest" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux