qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: John Snow <jsnow@redhat.com>
To: "Andreas Färber" <afaerber@suse.de>, qemu-devel@nongnu.org
Cc: pbonzini@redhat.com, Anthony Liguori <aliguori@amazon.com>,
	stefanha@redhat.com
Subject: Re: [Qemu-devel] [PATCH for-2.3 v2 2/4] qtest: Add qtest_add() wrapper macro
Date: Wed, 25 Mar 2015 18:13:57 -0400	[thread overview]
Message-ID: <55133325.9070207@redhat.com> (raw)
In-Reply-To: <1427307623-2425-3-git-send-email-afaerber@suse.de>



On 03/25/2015 02:20 PM, Andreas Färber wrote:
> It extends g_test_add() macro with the architecture path.
>
> Signed-off-by: Andreas Färber <afaerber@suse.de>
> ---
>   tests/libqtest.h | 20 ++++++++++++++++++++
>   1 file changed, 20 insertions(+)
>
> diff --git a/tests/libqtest.h b/tests/libqtest.h
> index 9281f5c..03469b8 100644
> --- a/tests/libqtest.h
> +++ b/tests/libqtest.h
> @@ -357,6 +357,26 @@ void qtest_add_func(const char *str, void (*fn));
>   void qtest_add_data_func(const char *str, const void *data, void (*fn));
>
>   /**
> + * qtest_add:
> + * @testpath: Test case path
> + * @Fixture: Fixture type
> + * @tdata: Test case data
> + * @fsetup: Test case setup function
> + * @ftest: Test case function
> + * @fteardown: Test case teardown function
> + *
> + * Add a GTester testcase with the given name, data and functions.
> + * The path is prefixed with the architecture under test, as
> + * returned by qtest_get_arch().
> + */
> +#define qtest_add(testpath, Fixture, tdata, fsetup, ftest, fteardown) \
> +    do { \
> +        char *path = g_strdup_printf("/%s/%s", qtest_get_arch(), testpath); \
> +        g_test_add(path, Fixture, tdata, fsetup, ftest, fteardown); \
> +        g_free(path); \
> +    } while (0)
> +
> +/**
>    * qtest_start:
>    * @args: other arguments to pass to QEMU
>    *
>

Reviewed-by: John Snow <jsnow@redhat.com>

  reply	other threads:[~2015-03-25 22:14 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-25 18:20 [Qemu-devel] [PATCH for-2.3 v2 0/4] qtest: Fix remaining test paths to include architecture Andreas Färber
2015-03-25 18:20 ` [Qemu-devel] [PATCH for-2.3 v2 1/4] qtest: Add qtest_add_data_func() wrapper function Andreas Färber
2015-03-25 18:20 ` [Qemu-devel] [PATCH for-2.3 v2 2/4] qtest: Add qtest_add() wrapper macro Andreas Färber
2015-03-25 22:13   ` John Snow [this message]
2015-03-25 18:20 ` [Qemu-devel] [PATCH for-2.3 v2 3/4] i440fx-test: Fix test paths to include architecture Andreas Färber
2015-03-25 22:14   ` John Snow
2015-03-25 18:20 ` [Qemu-devel] [PATCH v2 4/4] tests: Use qtest_add_data_func() consistently Andreas Färber
2015-03-25 22:14   ` John Snow
2015-03-26 15:41     ` Andreas Färber
2015-03-27 18:46       ` John Snow
2015-05-19 12:35         ` Andreas Färber
2015-05-19 15:38           ` John Snow

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=55133325.9070207@redhat.com \
    --to=jsnow@redhat.com \
    --cc=afaerber@suse.de \
    --cc=aliguori@amazon.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@redhat.com \
    /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).