From: "Andreas Färber" <afaerber@suse.de>
To: Markus Armbruster <armbru@redhat.com>
Cc: aliguori@us.ibm.com, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 2/2] libqtest: New qtest_end() to go with qtest_start()
Date: Wed, 19 Jun 2013 14:36:47 +0200 [thread overview]
Message-ID: <51C1A5DF.109@suse.de> (raw)
In-Reply-To: <1371627895-27046-3-git-send-email-armbru@redhat.com>
Am 19.06.2013 09:44, schrieb Markus Armbruster:
> Signed-off-by: Markus Armbruster <armbru@redhat.com>
> ---
> tests/fdc-test.c | 2 +-
> tests/hd-geo-test.c | 8 ++++----
> tests/ide-test.c | 2 +-
> tests/libqtest.h | 7 +++++++
> 4 files changed, 13 insertions(+), 6 deletions(-)
>
> diff --git a/tests/fdc-test.c b/tests/fdc-test.c
> index 4b0301d..fd198dc 100644
> --- a/tests/fdc-test.c
> +++ b/tests/fdc-test.c
> @@ -556,7 +556,7 @@ int main(int argc, char **argv)
> ret = g_test_run();
>
> /* Cleanup */
> - qtest_quit(global_qtest);
> + qtest_end();
> unlink(test_image);
>
> return ret;
> diff --git a/tests/hd-geo-test.c b/tests/hd-geo-test.c
> index 9a31e85..b72042e 100644
> --- a/tests/hd-geo-test.c
> +++ b/tests/hd-geo-test.c
> @@ -244,7 +244,7 @@ static void test_ide_none(void)
> setup_common(argv, ARRAY_SIZE(argv));
> qtest_start(g_strjoinv(" ", argv));
> test_cmos();
> - qtest_quit(global_qtest);
> + qtest_end();
> }
>
> static void test_ide_mbr(bool use_device, MBRcontents mbr)
> @@ -262,7 +262,7 @@ static void test_ide_mbr(bool use_device, MBRcontents mbr)
> }
> qtest_start(g_strjoinv(" ", argv));
> test_cmos();
> - qtest_quit(global_qtest);
> + qtest_end();
> }
>
> /*
> @@ -334,7 +334,7 @@ static void test_ide_drive_user(const char *dev, bool trans)
> g_free(opts);
> qtest_start(g_strjoinv(" ", argv));
> test_cmos();
> - qtest_quit(global_qtest);
> + qtest_end();
> }
>
> /*
> @@ -387,7 +387,7 @@ static void test_ide_drive_cd_0(void)
> }
> qtest_start(g_strjoinv(" ", argv));
> test_cmos();
> - qtest_quit(global_qtest);
> + qtest_end();
> }
>
> int main(int argc, char **argv)
> diff --git a/tests/ide-test.c b/tests/ide-test.c
> index 7e2eb94..7307f1d 100644
> --- a/tests/ide-test.c
> +++ b/tests/ide-test.c
> @@ -122,7 +122,7 @@ static void ide_test_start(const char *cmdline_fmt, ...)
>
> static void ide_test_quit(void)
> {
> - qtest_quit(global_qtest);
> + qtest_end();
> }
>
> static QPCIDevice *get_pci_device(uint16_t *bmdma_base)
> diff --git a/tests/libqtest.h b/tests/libqtest.h
> index 437bda3..329325b 100644
> --- a/tests/libqtest.h
> +++ b/tests/libqtest.h
> @@ -17,6 +17,7 @@
> #ifndef LIBQTEST_H
> #define LIBQTEST_H
>
> +#include <stddef.h>
> #include <stdint.h>
> #include <stdbool.h>
> #include <stdarg.h>
> @@ -318,6 +319,12 @@ static inline QTestState *qtest_start(const char *args)
> return global_qtest;
> }
>
> +static inline void qtest_end(void)
> +{
> + qtest_quit(global_qtest);
> + global_qtest = NULL;
> +}
> +
> /**
> * qmp:
> * @fmt...: QMP message to send to qemu
>
Function and usage looks fine, but please add a gtk-doc comment.
qtest_start() does have one.
Thanks,
Andreas
--
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
next prev parent reply other threads:[~2013-06-19 12:36 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-19 7:44 [Qemu-devel] [PATCH 0/2] libqtest leak fix & cleanup Markus Armbruster
2013-06-19 7:44 ` [Qemu-devel] [PATCH 1/2] libqtest: Plug fd and memory leaks in qtest_quit() Markus Armbruster
2013-06-19 12:30 ` Anthony Liguori
2013-06-19 12:31 ` Anthony Liguori
2013-06-19 7:44 ` [Qemu-devel] [PATCH 2/2] libqtest: New qtest_end() to go with qtest_start() Markus Armbruster
2013-06-19 12:36 ` Andreas Färber [this message]
2013-06-19 13:21 ` Markus Armbruster
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=51C1A5DF.109@suse.de \
--to=afaerber@suse.de \
--cc=aliguori@us.ibm.com \
--cc=armbru@redhat.com \
--cc=qemu-devel@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).