]> git.proxmox.com Git - mirror_qemu.git/commit
migration-test: Make wait_command() cope with '%'
authorMarkus Armbruster <armbru@redhat.com>
Mon, 6 Aug 2018 06:53:38 +0000 (08:53 +0200)
committerMarkus Armbruster <armbru@redhat.com>
Thu, 16 Aug 2018 06:42:06 +0000 (08:42 +0200)
commit4399596b152f6c933a173b0e97ba4e3b6a57458f
tree5b410f9988f43cf3478cf270c29eb2f8d3533d27
parent3cd46d42fe632b4732eca23b15b99d1b26ee6f2c
migration-test: Make wait_command() cope with '%'

wait_command() passes its argument @command to qtest_qmp_send().
Falls apart if @command contain '%'.  Two ways to disarm this trap:
suppress interpretation of '%' by passing @command as argument to
format string "%s", or fix it by having wait_command() take the
variable arguments to go with @command.  Do the latter.

This is another step towards compile-time format string checking
without triggering -Wformat-nonliteral.

Cc: Juan Quintela <quintela@redhat.com>
Cc: Dr. David Alan Gilbert <dgilbert@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-Id: <20180806065344.7103-18-armbru@redhat.com>
tests/migration-test.c