[PATCH 1/3] kselftest: make ksft_exit_skip() output a reason for skipping

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

 



Make ksft_exit_skip() input an optional message string as the reason
for skipping all the tests and outputs it prior to exiting.

Signed-off-by: Paul Elder <paul.elder@xxxxxxxx>
---
 tools/testing/selftests/kselftest.h | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/tools/testing/selftests/kselftest.h b/tools/testing/selftests/kselftest.h
index 1d874a50d957..be01f2d15472 100644
--- a/tools/testing/selftests/kselftest.h
+++ b/tools/testing/selftests/kselftest.h
@@ -104,9 +104,12 @@ static inline int ksft_exit_xpass(void)
 	exit(KSFT_XPASS);
 }
 
-static inline int ksft_exit_skip(void)
+static inline int ksft_exit_skip(const char *msg)
 {
-	ksft_print_cnts();
+	if (msg)
+		printf("1..%d # Skipped: %s\n", ksft_test_num(), msg);
+	else
+		ksft_print_cnts();
 	exit(KSFT_SKIP);
 }
 
-- 
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