From: Marcelo Moreira <marcelomoreira1905@gmail.com>
To: skhan@linuxfoundation.org, linux-kernel-mentees@lists.linux.dev,
linux-kselftest@vger.kernel.org, martineau@kernel.org,
~lkcamp/patches@lists.sr.ht
Subject: [PATCH] Adds colors to kselftest output
Date: Thu, 13 Feb 2025 18:28:16 -0300 [thread overview]
Message-ID: <20250213212858.710884-1-marcelomoreira1905@gmail.com> (raw)
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
next reply other threads:[~2025-02-13 21:29 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-13 21:28 Marcelo Moreira [this message]
2025-02-13 22:44 ` [PATCH] Adds colors to kselftest output Bjorn Helgaas
2025-02-13 23:31 ` Bird, Tim
2025-02-14 23:59 ` Marcelo Moreira
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250213212858.710884-1-marcelomoreira1905@gmail.com \
--to=marcelomoreira1905@gmail.com \
--cc=linux-kernel-mentees@lists.linux.dev \
--cc=linux-kselftest@vger.kernel.org \
--cc=martineau@kernel.org \
--cc=skhan@linuxfoundation.org \
--cc=~lkcamp/patches@lists.sr.ht \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox