From: Thomas Huth <thuth@redhat.com>
To: qemu-devel@nongnu.org
Cc: qemu-trivial@nongnu.org, Laurent Vivier <lvivier@redhat.com>,
"Dr. David Alan Gilbert" <dgilbert@redhat.com>,
Peter Maydell <peter.maydell@linaro.org>
Subject: [PATCH] tests/qtest/test-hmp: Improve the check for verbose mode
Date: Mon, 9 Jan 2023 11:13:06 +0100 [thread overview]
Message-ID: <20230109101306.271444-1-thuth@redhat.com> (raw)
Running the test-hmp with V=2 up to V=9 runs the test in verbose mode,
but running for example with V=10 falls back to non-verbose mode ...
Improve this oddity by properly treating the argument as a number.
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
tests/qtest/test-hmp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/qtest/test-hmp.c b/tests/qtest/test-hmp.c
index f8b22abe4c..b4a920df89 100644
--- a/tests/qtest/test-hmp.c
+++ b/tests/qtest/test-hmp.c
@@ -151,7 +151,7 @@ int main(int argc, char **argv)
{
char *v_env = getenv("V");
- if (v_env && *v_env >= '2') {
+ if (v_env && atoi(v_env) >= 2) {
verbose = true;
}
--
2.31.1
next reply other threads:[~2023-01-09 10:13 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-09 10:13 Thomas Huth [this message]
2023-01-09 10:35 ` [PATCH] tests/qtest/test-hmp: Improve the check for verbose mode Philippe Mathieu-Daudé
2023-01-16 17:37 ` Laurent Vivier
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=20230109101306.271444-1-thuth@redhat.com \
--to=thuth@redhat.com \
--cc=dgilbert@redhat.com \
--cc=lvivier@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=qemu-trivial@nongnu.org \
/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;
as well as URLs for NNTP newsgroup(s).