qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Huth <thuth@redhat.com>
To: Laurent Vivier <lvivier@redhat.com>, qemu-devel@nongnu.org
Cc: Paolo Bonzini <pbonzini@redhat.com>,
	Jens Freimann <jfreimann@redhat.com>,
	Juan Quintela <quintela@redhat.com>
Subject: Re: [PATCH v7 2/4] tests/qtest: add some tests for virtio-net failover
Date: Wed, 8 Dec 2021 09:39:34 +0100	[thread overview]
Message-ID: <a54b31e2-0327-6134-517c-71147f3aa6fa@redhat.com> (raw)
In-Reply-To: <20211207172342.4058491-3-lvivier@redhat.com>

On 07/12/2021 18.23, Laurent Vivier wrote:
> Add test cases to test several error cases that must be
> generated by invalid failover configuration.
> 
> Add a combination of coldplug and hotplug test cases to be
> sure the primary is correctly managed according the
> presence or not of the STANDBY feature.
> 
> Signed-off-by: Laurent Vivier <lvivier@redhat.com>
> ---
[...]
> diff --git a/tests/qtest/virtio-net-failover.c b/tests/qtest/virtio-net-failover.c
> new file mode 100644
> index 000000000000..7444d30d2900
> --- /dev/null
> +++ b/tests/qtest/virtio-net-failover.c
[...]
> +static char *get_mac(QTestState *qts, const char *name)
> +{
> +    QDict *resp;
> +    char *mac;
> +
> +    resp = qtest_qmp(qts, "{ 'execute': 'qom-get', "
> +                     "'arguments': { "
> +                     "'path': %s, "
> +                     "'property': 'mac' } }", name);
> +
> +    g_assert(qdict_haskey(resp, "return"));
> +
> +    mac = g_strdup( qdict_get_str(resp, "return"));

FYI, check_patch.pl complains about the space after the "(" here.

I'll fix it up locally, no need to resend just because of this.

> +    qobject_unref(resp);
> +
> +    return mac;
> +}

  Thomas



  parent reply	other threads:[~2021-12-08  8:42 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-07 17:23 [PATCH v7 0/4] tests/qtest: add some tests for virtio-net failover Laurent Vivier
2021-12-07 17:23 ` [PATCH v7 1/4] qtest/libqos: add a function to initialize secondary PCI buses Laurent Vivier
2021-12-07 17:23 ` [PATCH v7 2/4] tests/qtest: add some tests for virtio-net failover Laurent Vivier
2021-12-08  7:33   ` Thomas Huth
2021-12-08  7:35     ` Michael S. Tsirkin
2021-12-08  8:39   ` Thomas Huth [this message]
2021-12-08  8:52     ` Laurent Vivier
2021-12-08  8:55       ` Thomas Huth
2021-12-07 17:23 ` [PATCH v7 3/4] test/libqtest: add some virtio-net failover migration cancelling tests Laurent Vivier
2021-12-07 17:23 ` [PATCH v7 4/4] tests/libqtest: add a migration test with two couples of failover devices Laurent Vivier

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=a54b31e2-0327-6134-517c-71147f3aa6fa@redhat.com \
    --to=thuth@redhat.com \
    --cc=jfreimann@redhat.com \
    --cc=lvivier@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=quintela@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).