[LTP] [PATCH 1/1] tst_test.sh: Print Summary into stderr

Petr Vorel pvorel@suse.cz
Mon Sep 12 12:06:03 CEST 2022


To follow the pattern in C API, where it was changed in
8f560e5dc ("lib: Print everything to stderr").

Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
NOTE: applied on the top of patchset "v5 shell: df01.sh:
$TST_ALL_FILESYSTEMS (.all_filesystems)"

https://lore.kernel.org/ltp/20220909141840.18327-1-pvorel@suse.cz/
https://patchwork.ozlabs.org/project/ltp/list/?series=317639&state=*

Kind regards,
Petr

 testcases/lib/tst_test.sh | 16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)

diff --git a/testcases/lib/tst_test.sh b/testcases/lib/tst_test.sh
index de4599625..84f29af5b 100644
--- a/testcases/lib/tst_test.sh
+++ b/testcases/lib/tst_test.sh
@@ -69,13 +69,15 @@ _tst_do_exit()
 		_tst_check_security_modules
 	fi
 
-	echo
-	echo "Summary:"
-	echo "passed   $TST_PASS"
-	echo "failed   $TST_FAIL"
-	echo "broken   $TST_BROK"
-	echo "skipped  $TST_CONF"
-	echo "warnings $TST_WARN"
+	cat >&2 << EOF
+
+Summary:
+passed   $TST_PASS
+failed   $TST_FAIL
+broken   $TST_BROK
+skipped  $TST_CONF
+warnings $TST_WARN
+EOF
 
 	exit $ret
 }
-- 
2.37.3



More information about the ltp mailing list