qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 3/6] tests: Enable the drive_del test also on s3


From: Cleber Rosa
Subject: Re: [Qemu-devel] [PATCH 3/6] tests: Enable the drive_del test also on s390x
Date: Wed, 30 Aug 2017 17:41:01 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1


On 08/17/2017 02:25 AM, Thomas Huth wrote:
> By using the "virtio-xxx" device name aliases instead of the
> "virtio-xxx-pci" names, we can use this test on s390x, too,
> to check that adding and deleting also works fine with the
> virtio-ccw bus.
> 
> Signed-off-by: Thomas Huth <address@hidden>
> ---
>  tests/Makefile.include |  1 +
>  tests/drive_del-test.c | 13 +++++++------
>  2 files changed, 8 insertions(+), 6 deletions(-)
> 
> diff --git a/tests/Makefile.include b/tests/Makefile.include
> index 0bb18b3..ff2a551 100644
> --- a/tests/Makefile.include
> +++ b/tests/Makefile.include
> @@ -363,6 +363,7 @@ check-qtest-s390x-y = tests/boot-serial-test$(EXESUF)
>  check-qtest-s390x-$(CONFIG_SLIRP) += tests/test-netfilter$(EXESUF)
>  check-qtest-s390x-$(CONFIG_POSIX) += tests/test-filter-mirror$(EXESUF)
>  check-qtest-s390x-$(CONFIG_POSIX) += tests/test-filter-redirector$(EXESUF)
> +check-qtest-s390x-y += tests/drive_del-test$(EXESUF)
>  
>  check-qtest-generic-y += tests/qom-test$(EXESUF)
>  check-qtest-generic-y += tests/test-hmp$(EXESUF)
> diff --git a/tests/drive_del-test.c b/tests/drive_del-test.c
> index 2175139..efceb31 100644
> --- a/tests/drive_del-test.c
> +++ b/tests/drive_del-test.c
> @@ -65,12 +65,12 @@ static void test_after_failed_device_add(void)
>  
>      qtest_start("-drive if=none,id=drive0");
>  
> -    /* Make device_add fail.  If this leaks the virtio-blk-pci device then a
> +    /* Make device_add fail.  If this leaks the virtio-blk device then a
>       * reference to drive0 will also be held (via qdev properties).
>       */
>      response = qmp("{'execute': 'device_add',"
>                     " 'arguments': {"
> -                   "   'driver': 'virtio-blk-pci',"
> +                   "   'driver': 'virtio-blk',"
>                     "   'drive': 'drive0'"
>                     "}}");
>      g_assert(response);
> @@ -82,7 +82,7 @@ static void test_after_failed_device_add(void)
>      drive_del();
>  
>      /* Try to re-add the drive.  This fails with duplicate IDs if a leaked
> -     * virtio-blk-pci exists that holds a reference to the old drive0.
> +     * virtio-blk exists that holds a reference to the old drive0.
>       */
>      drive_add();
>  
> @@ -93,7 +93,7 @@ static void test_drive_del_device_del(void)
>  {
>      /* Start with a drive used by a device that unplugs instantaneously */
>      qtest_start("-drive if=none,id=drive0,file=null-co://,format=raw"
> -                " -device virtio-scsi-pci"
> +                " -device virtio-scsi"
>                  " -device scsi-hd,drive=drive0,id=dev0");
>  
>      /*
> @@ -114,9 +114,10 @@ int main(int argc, char **argv)
>  
>      qtest_add_func("/drive_del/without-dev", test_drive_without_dev);
>  
> -    /* TODO I guess any arch with PCI would do */
> +    /* TODO I guess any arch with a hot-pluggable virtio bus would do */
>      if (!strcmp(arch, "i386") || !strcmp(arch, "x86_64") ||
> -        !strcmp(arch, "ppc") || !strcmp(arch, "ppc64")) {
> +        !strcmp(arch, "ppc") || !strcmp(arch, "ppc64") ||
> +        !strcmp(arch, "s390x")) {
>          qtest_add_func("/drive_del/after_failed_device_add",
>                         test_after_failed_device_add);
>          qtest_add_func("/blockdev/drive_del_device_del",
> 

I honestly can't comment on the device to be used on this test (as
others have commented).  Putting that aside, and given the fact  that I
went through the lengths of testing it on the s390x target:

Tested-by: Cleber Rosa <address@hidden>

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]