From: Evgeny Bachinin <EABachinin@sberdevices.ru>
To: Simon Glass <sjg@chromium.org>,
Hector Palacios <hector.palacios@digi.com>,
Marek Vasut <marex@denx.de>,
Heinrich Schuchardt <xypron.glpk@gmx.de>,
John Keeping <john@metanate.com>
Cc: <u-boot@lists.denx.de>, <kernel@sberdevices.ru>,
<evgen89bachinin@gmail.com>,
Evgeny Bachinin <EABachinin@sberdevices.ru>
Subject: [PATCH v2 4/4] test: exit: fix run_commandf() warnings
Date: Mon, 20 Mar 2023 11:23:14 +0300 [thread overview]
Message-ID: <20230320082314.2018-5-EABachinin@sberdevices.ru> (raw)
In-Reply-To: <20230320082314.2018-1-EABachinin@sberdevices.ru>
Fix warnings after adding printf-like attribute format for
run_commandf():
warning: too many arguments for format [-Wformat-extra-args]
Signed-off-by: Evgeny Bachinin <EABachinin@sberdevices.ru>
Reviewed-by: Simon Glass <sjg@chromium.org>
---
test/cmd/exit.c | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/test/cmd/exit.c b/test/cmd/exit.c
index ca34abef89..7e160f7e4b 100644
--- a/test/cmd/exit.c
+++ b/test/cmd/exit.c
@@ -60,20 +60,20 @@ static int cmd_exit_test(struct unit_test_state *uts)
/* Validate that 'exit' behaves the same way as 'exit 0' */
ut_assertok(console_record_reset_enable());
- ut_assertok(run_commandf("setenv foo 'echo bar ; exit ; echo baz' ; run foo ; echo $?", i));
+ ut_assertok(run_commandf("setenv foo 'echo bar ; exit ; echo baz' ; run foo ; echo $?"));
ut_assert_nextline("bar");
ut_assert_nextline("0");
ut_assertok(ut_check_console_end(uts));
ut_assertok(console_record_reset_enable());
- ut_assertok(run_commandf("setenv foo 'echo bar ; exit ; echo baz' ; run foo && echo quux ; echo $?", i));
+ ut_assertok(run_commandf("setenv foo 'echo bar ; exit ; echo baz' ; run foo && echo quux ; echo $?"));
ut_assert_nextline("bar");
ut_assert_nextline("quux");
ut_assert_nextline("0");
ut_assertok(ut_check_console_end(uts));
ut_assertok(console_record_reset_enable());
- ut_assertok(run_commandf("setenv foo 'echo bar ; exit ; echo baz' ; run foo || echo quux ; echo $?", i));
+ ut_assertok(run_commandf("setenv foo 'echo bar ; exit ; echo baz' ; run foo || echo quux ; echo $?"));
ut_assert_nextline("bar");
/* Either 'exit' returns 0, or 'echo quux' returns 0 */
ut_assert_nextline("0");
@@ -81,39 +81,39 @@ static int cmd_exit_test(struct unit_test_state *uts)
/* Validate that return value still propagates from 'run' command */
ut_assertok(console_record_reset_enable());
- ut_assertok(run_commandf("setenv foo 'echo bar ; true' ; run foo ; echo $?", i));
+ ut_assertok(run_commandf("setenv foo 'echo bar ; true' ; run foo ; echo $?"));
ut_assert_nextline("bar");
ut_assert_nextline("0");
ut_assertok(ut_check_console_end(uts));
ut_assertok(console_record_reset_enable());
- ut_assertok(run_commandf("setenv foo 'echo bar ; true' ; run foo && echo quux ; echo $?", i));
+ ut_assertok(run_commandf("setenv foo 'echo bar ; true' ; run foo && echo quux ; echo $?"));
ut_assert_nextline("bar");
ut_assert_nextline("quux");
ut_assert_nextline("0");
ut_assertok(ut_check_console_end(uts));
ut_assertok(console_record_reset_enable());
- ut_assertok(run_commandf("setenv foo 'echo bar ; true' ; run foo || echo quux ; echo $?", i));
+ ut_assertok(run_commandf("setenv foo 'echo bar ; true' ; run foo || echo quux ; echo $?"));
ut_assert_nextline("bar");
/* The 'true' returns 0 */
ut_assert_nextline("0");
ut_assertok(ut_check_console_end(uts));
ut_assertok(console_record_reset_enable());
- ut_assertok(run_commandf("setenv foo 'echo bar ; false' ; run foo ; echo $?", i));
+ ut_assertok(run_commandf("setenv foo 'echo bar ; false' ; run foo ; echo $?"));
ut_assert_nextline("bar");
ut_assert_nextline("1");
ut_assertok(ut_check_console_end(uts));
ut_assertok(console_record_reset_enable());
- ut_assertok(run_commandf("setenv foo 'echo bar ; false' ; run foo && echo quux ; echo $?", i));
+ ut_assertok(run_commandf("setenv foo 'echo bar ; false' ; run foo && echo quux ; echo $?"));
ut_assert_nextline("bar");
ut_assert_nextline("1");
ut_assertok(ut_check_console_end(uts));
ut_assertok(console_record_reset_enable());
- ut_assertok(run_commandf("setenv foo 'echo bar ; false' ; run foo || echo quux ; echo $?", i));
+ ut_assertok(run_commandf("setenv foo 'echo bar ; false' ; run foo || echo quux ; echo $?"));
ut_assert_nextline("bar");
ut_assert_nextline("quux");
/* The 'echo quux' returns 0 */
--
2.17.1
next prev parent reply other threads:[~2023-03-20 8:24 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-20 8:23 [PATCH v2 0/4] cli: run_commandf() coverage and small fixups Evgeny Bachinin
2023-03-20 8:23 ` [PATCH v2 1/4] cli: run_commandf(): " Evgeny Bachinin
2023-03-20 18:40 ` Simon Glass
2023-03-31 14:15 ` Tom Rini
2023-03-20 8:23 ` [PATCH v2 2/4] unit-test: cover run_commandf() by test-cases Evgeny Bachinin
2023-03-20 18:40 ` Simon Glass
2023-03-31 14:15 ` Tom Rini
2023-03-20 8:23 ` [PATCH v2 3/4] test: fdt: fix run_commandf() warnings Evgeny Bachinin
2023-03-20 18:40 ` Simon Glass
2023-03-31 14:15 ` Tom Rini
2023-03-20 8:23 ` Evgeny Bachinin [this message]
2023-03-20 18:40 ` [PATCH v2 4/4] test: exit: " Simon Glass
2023-03-31 14:15 ` Tom Rini
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=20230320082314.2018-5-EABachinin@sberdevices.ru \
--to=eabachinin@sberdevices.ru \
--cc=evgen89bachinin@gmail.com \
--cc=hector.palacios@digi.com \
--cc=john@metanate.com \
--cc=kernel@sberdevices.ru \
--cc=marex@denx.de \
--cc=sjg@chromium.org \
--cc=u-boot@lists.denx.de \
--cc=xypron.glpk@gmx.de \
/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