qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] tests/qtest/test-hmp: Improve the check for verbose mode
@ 2023-01-09 10:13 Thomas Huth
  2023-01-09 10:35 ` Philippe Mathieu-Daudé
  2023-01-16 17:37 ` Laurent Vivier
  0 siblings, 2 replies; 3+ messages in thread
From: Thomas Huth @ 2023-01-09 10:13 UTC (permalink / raw)
  To: qemu-devel
  Cc: qemu-trivial, Laurent Vivier, Dr. David Alan Gilbert,
	Peter Maydell

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



^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-01-16 17:37 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-01-09 10:13 [PATCH] tests/qtest/test-hmp: Improve the check for verbose mode Thomas Huth
2023-01-09 10:35 ` Philippe Mathieu-Daudé
2023-01-16 17:37 ` Laurent Vivier

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).