On Fri, Jun 13, 2014 at 10:15:00AM +0200, Paolo Bonzini wrote: > libqtest is using g_strdup_printf to format QMP commands, but > this does not work if the argument strings need to be escaped. > Instead, use the fancy %-formatting functionality of QObject. > The only change required in tests is that strings have to be > formatted as %s, not '%s' or \"%s\". Luckily this usage of > parameterized QMP commands is not that frequent. > > The leak is in socket_sendf. Since we are extracting the send > loop to a new function, fix it now. > > Signed-off-by: Paolo Bonzini <pbonz...@redhat.com> > --- > tests/fdc-test.c | 2 +- > tests/libqtest.c | 47 +++++++++++++++++++++++++++++++++++++---------- > tests/qom-test.c | 6 +++--- > tests/tmp105-test.c | 4 ++-- > 4 files changed, 43 insertions(+), 16 deletions(-)
Reviewed-by: Stefan Hajnoczi <stefa...@redhat.com>
pgprMm1bfFc5U.pgp
Description: PGP signature