qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Cornelia Huck <cohuck@redhat.com>
To: Thomas Huth <thuth@redhat.com>
Cc: qemu-devel@nongnu.org,
	Christian Borntraeger <borntraeger@de.ibm.com>,
	David Hildenbrand <david@redhat.com>,
	Claudio Imbrenda <imbrenda@linux.vnet.ibm.com>,
	Dong Jia Shi <bjsdjshi@linux.vnet.ibm.com>,
	Farhan Ali <alifm@linux.vnet.ibm.com>,
	Halil Pasic <pasic@linux.vnet.ibm.com>,
	Jason J Herne <jjherne@linux.vnet.ibm.com>,
	Pierre Morel <pmorel@linux.vnet.ibm.com>,
	Cleber Rosa <crosa@redhat.com>,
	Michael S Tsirkin <mst@redhat.com>,
	Stefan Hajnoczi <stefanha@redhat.com>
Subject: Re: [Qemu-devel] [PATCH v2] tests: Enable the drive_del test also on s390x
Date: Fri, 1 Sep 2017 15:43:00 +0200	[thread overview]
Message-ID: <20170901154300.2f83c59a.cohuck@redhat.com> (raw)
In-Reply-To: <1504190408-11143-1-git-send-email-thuth@redhat.com>

On Thu, 31 Aug 2017 16:40:08 +0200
Thomas Huth <thuth@redhat.com> wrote:

> We can use the drive_del test on s390x, too, to check that adding and
> deleting also works fine with the virtio-ccw bus. But we have to make
> sure that we use the devices with the "-ccw" suffix instead of the
> "-pci" suffix for the virtio-ccw transport on s390x. Introduce a helper
> function called qvirtio_get_dev_type() that returns the correct string
> for the current architecture.
> 
> Signed-off-by: Thomas Huth <thuth@redhat.com>
> ---
>  I'm just sending a patch for this test now to get some feedback whether
>  I'm on the right track now. If this approach with qvirtio_get_dev_type()
>  gets accepted, I'll continue converting the other virtio tests, too.

Looks good.

> 
>  tests/Makefile.include |  3 ++-
>  tests/drive_del-test.c | 25 ++++++++++++++++---------
>  tests/libqos/virtio.c  | 17 +++++++++++++++++
>  tests/libqos/virtio.h  |  3 +++
>  4 files changed, 38 insertions(+), 10 deletions(-)
> 

> diff --git a/tests/libqos/virtio.c b/tests/libqos/virtio.c
> index 9880a69..0879a62 100644
> --- a/tests/libqos/virtio.c
> +++ b/tests/libqos/virtio.c
> @@ -339,3 +339,20 @@ void qvirtqueue_set_used_event(QVirtQueue *vq, uint16_t idx)
>      /* vq->avail->used_event */
>      writew(vq->avail + 4 + (2 * vq->size), idx);
>  }
> +
> +/*
> + * qvirtio_get_dev_type:
> + * Returns: the preferred virtio bus/device type for the current architecture.
> + */
> +const char *qvirtio_get_dev_type(void)
> +{
> +    const char *arch = qtest_get_arch();
> +
> +    if (g_str_equal(arch, "arm") || g_str_equal(arch, "aarch64")) {
> +        return "device";  /* for virtio-mmio */

Would not mind a comment from someone familiar with virtio-mmio, though.

> +    } else if (g_str_equal(arch, "s390x")) {
> +        return "ccw";
> +    } else {
> +        return "pci";
> +    }
> +}

I'll take this, unless someone complains.

  parent reply	other threads:[~2017-09-01 13:43 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-31 14:40 [Qemu-devel] [PATCH v2] tests: Enable the drive_del test also on s390x Thomas Huth
2017-08-31 15:36 ` David Hildenbrand
2017-09-01  9:10   ` Markus Armbruster
2017-09-01 10:39     ` Thomas Huth
2017-09-01 10:43       ` Cornelia Huck
2017-09-01 19:46       ` Eric Blake
2017-09-01 13:43 ` Cornelia Huck [this message]
2017-09-04 13:43   ` Cornelia Huck

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=20170901154300.2f83c59a.cohuck@redhat.com \
    --to=cohuck@redhat.com \
    --cc=alifm@linux.vnet.ibm.com \
    --cc=bjsdjshi@linux.vnet.ibm.com \
    --cc=borntraeger@de.ibm.com \
    --cc=crosa@redhat.com \
    --cc=david@redhat.com \
    --cc=imbrenda@linux.vnet.ibm.com \
    --cc=jjherne@linux.vnet.ibm.com \
    --cc=mst@redhat.com \
    --cc=pasic@linux.vnet.ibm.com \
    --cc=pmorel@linux.vnet.ibm.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@redhat.com \
    --cc=thuth@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).