Linux Kernel Selftest development
 help / color / mirror / Atom feed
* [PATCH] kselftests: add per_test_log support
@ 2023-11-02  7:50 Hangbin Liu
  2023-11-23  1:54 ` Hangbin Liu
  0 siblings, 1 reply; 3+ messages in thread
From: Hangbin Liu @ 2023-11-02  7:50 UTC (permalink / raw)
  To: linux-kselftest; +Cc: Shuah Khan, Kees Cook, Hangbin Liu

By default, all the test output will be printed to stdout or output.log if
-s supplied. The kselftest/runner.sh also supports per test log if the
variable per_test_logging is set. So add new option -p to set this
veriable. Note the -p option is conflict with -s option.

Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
---
 tools/testing/selftests/run_kselftest.sh | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/tools/testing/selftests/run_kselftest.sh b/tools/testing/selftests/run_kselftest.sh
index 92743980e553..965220a314ce 100755
--- a/tools/testing/selftests/run_kselftest.sh
+++ b/tools/testing/selftests/run_kselftest.sh
@@ -20,7 +20,8 @@ usage()
 {
 	cat <<EOF
 Usage: $0 [OPTIONS]
-  -s | --summary		Print summary with detailed log in output.log
+  -s | --summary		Print summary with detailed log in output.log (conflict with -p)
+  -p | --per_test_log		Print test log in /tmp with each test name (conflict with -s)
   -t | --test COLLECTION:TEST	Run TEST from COLLECTION
   -c | --collection COLLECTION	Run all tests from COLLECTION
   -l | --list			List the available collection:test entries
@@ -41,6 +42,9 @@ while true; do
 			logfile="$BASE_DIR"/output.log
 			cat /dev/null > $logfile
 			shift ;;
+		-p | --per_test_log)
+			per_test_logging=1
+			shift ;;
 		-t | --test)
 			TESTS="$TESTS $2"
 			shift 2 ;;
-- 
2.41.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-12-11 10:12 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-02  7:50 [PATCH] kselftests: add per_test_log support Hangbin Liu
2023-11-23  1:54 ` Hangbin Liu
2023-12-11 10:12   ` Hangbin Liu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox