qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v2 17/23] migration-test: Clean up string interp


From: Eric Blake
Subject: Re: [Qemu-devel] [PATCH v2 17/23] migration-test: Clean up string interpolation into QMP, part 1
Date: Fri, 27 Jul 2018 11:04:11 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0

On 07/27/2018 10:13 AM, Markus Armbruster wrote:
Leaving interpolation into JSON to qmp() is more robust than building
QMP input manually, as explained in the recent commit "tests: Clean up
string interpolation into QMP input (simple cases)".

migrate_recover() builds QMP input manually because wait_command()
can't interpolate.  Well, it can since the previous commit.  Simplify
accordingly.

Bonus: gets rid of a non-literal format string.  A step towards
compile-time format string checking without triggering
-Wformat-nonliteral.

Cc: Juan Quintela <address@hidden>
Cc: Dr. David Alan Gilbert <address@hidden>
Signed-off-by: Markus Armbruster <address@hidden>
Reviewed-by: Juan Quintela <address@hidden>
---
  tests/migration-test.c | 12 ++++++------
  1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/tests/migration-test.c b/tests/migration-test.c
index 0c92f2b1cd..323bb60535 100644
--- a/tests/migration-test.c
+++ b/tests/migration-test.c
@@ -156,6 +156,7 @@ static void stop_cb(void *opaque, const char *name, QDict 
*data)
  /*
   * Events can get in the way of responses we are actually waiting for.
   */
+GCC_FMT_ATTR(2, 3)
  static QDict *wait_command(QTestState *who, const char *command, ...)

Placement of function-level attributes is so weird (before the return type on implementations, but after the () in declarations) - not your fault.

Reviewed-by: Eric Blake <address@hidden>

--
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org



reply via email to

[Prev in Thread] Current Thread [Next in Thread]