From: Petr Vorel <pvorel@suse.cz>
To: Martin Doucha <mdoucha@suse.cz>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [PATCH v4 4/4] generate_lvm_runfile.sh: Fix bashism
Date: Wed, 10 Aug 2022 18:38:15 +0200 [thread overview]
Message-ID: <YvPe96wKjXH27S2B@pevik> (raw)
In-Reply-To: <b7559faa-50db-a339-8685-1e0f55427513@suse.cz>
Hi Martin,
> Hi,
> I've tested the patchset and the generator script now work correctly.
Thanks! I'll wait unless you suggest anything on 3rd commit and merge with this
style change below. FYI I tested various setup:
for i in y n 0 1 ""; do
echo "== '$i' =="
LTP_COLORIZE_OUTPUT=$i PATH="/opt/ltp/testcases/bin:$PATH" $f
rc=$?
echo "'$i': $rc"
[ $rc -eq 0 ] || break
done
I also added patch for this test
https://lore.kernel.org/ltp/20220808122716.18556-1-pvorel@suse.cz/
Kind regards,
Petr
> Reviewed-by: Martin Doucha <mdoucha@suse.cz>
diff --git testcases/lib/tst_ansi_color.sh testcases/lib/tst_ansi_color.sh
index 517b709d0..04e120cf7 100644
--- testcases/lib/tst_ansi_color.sh
+++ testcases/lib/tst_ansi_color.sh
@@ -24,9 +24,16 @@ tst_flag2color()
tst_color_enabled()
{
- [ "$LTP_COLORIZE_OUTPUT" = "n" -o "$LTP_COLORIZE_OUTPUT" = "0" ] || return 1
- [ "$LTP_COLORIZE_OUTPUT" = "y" -o "$LTP_COLORIZE_OUTPUT" = "1" ] || return 0
+ if [ "$LTP_COLORIZE_OUTPUT" = "n" -o "$LTP_COLORIZE_OUTPUT" = "0" ]; then
+ return 0
+ fi
+
+ if [ "$LTP_COLORIZE_OUTPUT" = "y" -o "$LTP_COLORIZE_OUTPUT" = "1" ]; then
+ return 0
+ fi
+
[ -t 1 ] || return 0
+
return 1
}
--
Mailing list info: https://lists.linux.it/listinfo/ltp
prev parent reply other threads:[~2022-08-10 16:38 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-08 11:37 [LTP] [PATCH v4 0/4] set -e and bashism fixes Petr Vorel
2022-08-08 11:37 ` [LTP] [PATCH v4 1/4] tst_test.sh: runtest.sh: Remove unused code Petr Vorel
2022-08-09 9:25 ` Li Wang
2022-08-10 15:03 ` Martin Doucha
2022-08-08 11:37 ` [LTP] [PATCH v4 2/4] tst_ansi_color.sh: Allow to run with set -e Petr Vorel
2022-08-09 9:31 ` Li Wang
2022-08-09 12:04 ` Petr Vorel
2022-08-10 2:46 ` Li Wang
2022-08-10 6:36 ` Petr Vorel
2022-08-08 11:37 ` [LTP] [PATCH v4 3/4] tst_test.sh: Fix _tst_cleanup_timer() on " Petr Vorel
2022-08-09 9:35 ` Li Wang
2022-08-09 12:13 ` Petr Vorel
2022-08-10 15:08 ` Martin Doucha
2022-08-10 16:29 ` Petr Vorel
2022-08-11 8:00 ` Martin Doucha
2022-08-11 8:08 ` Petr Vorel
2022-08-11 8:35 ` Petr Vorel
2022-08-08 11:37 ` [LTP] [PATCH v4 4/4] generate_lvm_runfile.sh: Fix bashism Petr Vorel
2022-08-09 10:33 ` Li Wang
2022-08-10 15:13 ` Martin Doucha
2022-08-10 16:38 ` Petr Vorel [this message]
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=YvPe96wKjXH27S2B@pevik \
--to=pvorel@suse.cz \
--cc=ltp@lists.linux.it \
--cc=mdoucha@suse.cz \
/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