All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Adds colors to kselftest output
@ 2025-02-13 21:28 Marcelo Moreira
  2025-02-13 22:44 ` Bjorn Helgaas
  2025-02-13 23:31 ` Bird, Tim
  0 siblings, 2 replies; 4+ messages in thread
From: Marcelo Moreira @ 2025-02-13 21:28 UTC (permalink / raw)
  To: skhan, linux-kernel-mentees, linux-kselftest, martineau,
	~lkcamp/patches

This commit improves the readability of kselftest results by adding
ANSI color codes to the [ OK ] and FAIL messages.

Signed-off-by: Marcelo Moreira <marcelomoreira1905@gmail.com>
---
 tools/testing/selftests/net/mptcp/mptcp_lib.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/testing/selftests/net/mptcp/mptcp_lib.sh b/tools/testing/selftests/net/mptcp/mptcp_lib.sh
index 051e289d7967..7b55855ff788 100644
--- a/tools/testing/selftests/net/mptcp/mptcp_lib.sh
+++ b/tools/testing/selftests/net/mptcp/mptcp_lib.sh
@@ -83,7 +83,7 @@ mptcp_lib_print_err() {
 
 # shellcheck disable=SC2120 # parameters are optional
 mptcp_lib_pr_ok() {
-	mptcp_lib_print_ok "[ OK ]${1:+ ${*}}"
+	mptcp_lib_print_ok "\033[32m[ OK ]\033[0m${1:+ ${*}}"
 }
 
 mptcp_lib_pr_skip() {
@@ -97,7 +97,7 @@ mptcp_lib_pr_fail() {
 		title="IGNO"
 		cmt=" (flaky)"
 	else
-		title="FAIL"
+		title="\033[31mFAIL\033[0m"
 	fi
 
 	mptcp_lib_print_err "[${title}]${cmt}${1:+ ${*}}"
-- 
2.48.1


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

end of thread, other threads:[~2025-02-14 23:59 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-13 21:28 [PATCH] Adds colors to kselftest output Marcelo Moreira
2025-02-13 22:44 ` Bjorn Helgaas
2025-02-13 23:31 ` Bird, Tim
2025-02-14 23:59   ` Marcelo Moreira

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.