tst_test.sh: More readable syntax
PATCH 1/1 tst_test.sh: More readable syntax
"for cmd; do" works the same way as "for cmd in $*; do", but the latter is more readable. Also sync the code with tst_require_cmds().
Fixes dba1d50cb ("tst_test.sh: Add test cmd helper tst_check_cmds()")
Signed-off-by Petr Vorel <[email protected]>
--- testcases/lib/tst_test.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
testcases/lib/tst_test.sh +1 -1
@@ -350,7 +350,7 @@ tst_require_cmds() tst_check_cmds() { local cmd - for cmd; do + for cmd in $*; do if ! tst_cmd_available $cmd; then tst_res TCONF "'$cmd' not found" return 1
Signature · 1 line
2.28.0
PATCH 1/1 tst_test.sh: More readable syntax
Quoted 7 lines · Petr Vorel
"for cmd; do" works the same way as "for cmd in $*; do", but the latter is more readable. Also sync the code with
tst_require_cmds().Fixes dba1d50cb ("tst_test.sh: Add test cmd helper tst_check_cmds()")Signed-off-by Petr Vorel <[email protected]>
Reviewed-by Li Wang <[email protected]>
Signature · 5 lines
Regards, Li Wang -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.linux.it/pipermail/ltp/attachments/20200923/5332a357/attachment.htm>
PATCH 1/1 tst_test.sh: More readable syntax
Hi Li,
Quoted 11 lines · Petr Vorel
Quoted 7 lines
"for cmd; do" works the same way as "for cmd in $*; do", but the latter is more readable. Also sync the code with
tst_require_cmds().Fixes dba1d50cb ("tst_test.sh: Add test cmd helper tst_check_cmds()")Signed-off-by Petr Vorel <[email protected]>Reviewed-by Li Wang <[email protected]>
Thanks for a review, merged.
Kind regards,
Petr