[{"id":1761128,"web_url":"http://patchwork.ozlabs.org/comment/1761128/","msgid":"<612870af-f8a4-039c-3e97-7590388b9e77@redhat.com>","list_archive_url":null,"date":"2017-08-31T15:36:45","subject":"Re: [Qemu-devel] [PATCH v2] tests: Enable the drive_del test also\n\ton s390x","submitter":{"id":70402,"url":"http://patchwork.ozlabs.org/api/people/70402/","name":"David Hildenbrand","email":"david@redhat.com"},"content":">  static void test_drive_del_device_del(void)\n>  {\n> +    char *args;\n> +\n>      /* Start with a drive used by a device that unplugs instantaneously */\n> -    qtest_start(\"-drive if=none,id=drive0,file=null-co://,format=raw\"\n> -                \" -device virtio-scsi-pci\"\n> -                \" -device scsi-hd,drive=drive0,id=dev0\");\n> +    args = g_strdup_printf(\"-drive if=none,id=drive0,file=null-co://,format=raw\"\n> +                           \" -device virtio-scsi-%s\"\n> +                           \" -device scsi-hd,drive=drive0,id=dev0\",\n\nWould look better with the spaces at the end of the previous line (so\nall \"-device\" are aligned), but just my taste.\n\n> +                           qvirtio_get_dev_type());\n> +    qtest_start(args);\n>  \n>      /*\n>       * Delete the drive, and then the device\n> @@ -104,6 +109,7 @@ static void test_drive_del_device_del(void)\n>      device_del();\n>  \n>      qtest_end();\n> +    g_free(args);\n>  }\n>  \n>  int main(int argc, char **argv)\n> @@ -114,9 +120,10 @@ int main(int argc, char **argv)\n>  \n>      qtest_add_func(\"/drive_del/without-dev\", test_drive_without_dev);\n>  \n> -    /* TODO I guess any arch with PCI would do */\n> +    /* TODO I guess any arch with a hot-pluggable virtio bus would do */\n>      if (!strcmp(arch, \"i386\") || !strcmp(arch, \"x86_64\") ||\n> -        !strcmp(arch, \"ppc\") || !strcmp(arch, \"ppc64\")) {\n> +        !strcmp(arch, \"ppc\") || !strcmp(arch, \"ppc64\") ||\n> +        !strcmp(arch, \"s390x\")) {\n>          qtest_add_func(\"/drive_del/after_failed_device_add\",\n>                         test_after_failed_device_add);\n>          qtest_add_func(\"/blockdev/drive_del_device_del\",\n> diff --git a/tests/libqos/virtio.c b/tests/libqos/virtio.c\n> index 9880a69..0879a62 100644\n> --- a/tests/libqos/virtio.c\n> +++ b/tests/libqos/virtio.c\n> @@ -339,3 +339,20 @@ void qvirtqueue_set_used_event(QVirtQueue *vq, uint16_t idx)\n>      /* vq->avail->used_event */\n>      writew(vq->avail + 4 + (2 * vq->size), idx);\n>  }\n> +\n> +/*\n> + * qvirtio_get_dev_type:\n> + * Returns: the preferred virtio bus/device type for the current architecture.\n> + */\n> +const char *qvirtio_get_dev_type(void)\n> +{\n> +    const char *arch = qtest_get_arch();\n> +\n> +    if (g_str_equal(arch, \"arm\") || g_str_equal(arch, \"aarch64\")) {\n> +        return \"device\";  /* for virtio-mmio */\n> +    } else if (g_str_equal(arch, \"s390x\")) {\n> +        return \"ccw\";\n> +    } else {\n> +        return \"pci\";\n> +    }\n\nYou could drop the else case and do it unconditionally.\n\n> +}\n> diff --git a/tests/libqos/virtio.h b/tests/libqos/virtio.h\n> index 8fbcd18..0a04740 100644\n> --- a/tests/libqos/virtio.h\n> +++ b/tests/libqos/virtio.h\n> @@ -143,4 +143,7 @@ void qvirtqueue_kick(QVirtioDevice *d, QVirtQueue *vq, uint32_t free_head);\n>  bool qvirtqueue_get_buf(QVirtQueue *vq, uint32_t *desc_idx);\n>  \n>  void qvirtqueue_set_used_event(QVirtQueue *vq, uint16_t idx);\n> +\n> +const char *qvirtio_get_dev_type(void);\n> +\n>  #endif\n> \n\n\nLooks good to me!\n\nReviewed-by: David Hildenbrand <david@redhat.com>","headers":{"Return-Path":"<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=nongnu.org\n\t(client-ip=2001:4830:134:3::11; helo=lists.gnu.org;\n\tenvelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n\treceiver=<UNKNOWN>)","ext-mx01.extmail.prod.ext.phx2.redhat.com;\n\tdmarc=none (p=none dis=none) header.from=redhat.com","ext-mx01.extmail.prod.ext.phx2.redhat.com;\n\tspf=fail smtp.mailfrom=david@redhat.com"],"Received":["from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11])\n\t(using TLSv1 with cipher AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xjmhb6JGPz9s83\n\tfor <incoming@patchwork.ozlabs.org>;\n\tFri,  1 Sep 2017 01:37:19 +1000 (AEST)","from localhost ([::1]:56349 helo=lists.gnu.org)\n\tby lists.gnu.org with esmtp (Exim 4.71) (envelope-from\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>)\n\tid 1dnRWw-0003lL-1g\n\tfor incoming@patchwork.ozlabs.org; Thu, 31 Aug 2017 11:37:18 -0400","from eggs.gnu.org ([2001:4830:134:3::10]:37363)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <david@redhat.com>) id 1dnRWb-0003lC-M3\n\tfor qemu-devel@nongnu.org; Thu, 31 Aug 2017 11:36:58 -0400","from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <david@redhat.com>) id 1dnRWY-0005iG-JG\n\tfor qemu-devel@nongnu.org; Thu, 31 Aug 2017 11:36:57 -0400","from mx1.redhat.com ([209.132.183.28]:35680)\n\tby eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)\n\t(Exim 4.71) (envelope-from <david@redhat.com>) id 1dnRWY-0005hd-9C\n\tfor qemu-devel@nongnu.org; Thu, 31 Aug 2017 11:36:54 -0400","from smtp.corp.redhat.com\n\t(int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13])\n\t(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby mx1.redhat.com (Postfix) with ESMTPS id 22B977F6A5;\n\tThu, 31 Aug 2017 15:36:53 +0000 (UTC)","from [10.36.118.11] (unknown [10.36.118.11])\n\tby smtp.corp.redhat.com (Postfix) with ESMTP id 9DE9CA1041;\n\tThu, 31 Aug 2017 15:36:46 +0000 (UTC)"],"DMARC-Filter":"OpenDMARC Filter v1.3.2 mx1.redhat.com 22B977F6A5","To":"Thomas Huth <thuth@redhat.com>, qemu-devel@nongnu.org,\n\tCornelia Huck <cohuck@redhat.com>,\n\tChristian Borntraeger <borntraeger@de.ibm.com>","References":"<1504190408-11143-1-git-send-email-thuth@redhat.com>","From":"David Hildenbrand <david@redhat.com>","Organization":"Red Hat GmbH","Message-ID":"<612870af-f8a4-039c-3e97-7590388b9e77@redhat.com>","Date":"Thu, 31 Aug 2017 17:36:45 +0200","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101\n\tThunderbird/52.2.1","MIME-Version":"1.0","In-Reply-To":"<1504190408-11143-1-git-send-email-thuth@redhat.com>","Content-Type":"text/plain; charset=utf-8","Content-Language":"en-US","Content-Transfer-Encoding":"7bit","X-Scanned-By":"MIMEDefang 2.79 on 10.5.11.13","X-Greylist":"Sender IP whitelisted, not delayed by milter-greylist-4.5.16\n\t(mx1.redhat.com [10.5.110.25]);\n\tThu, 31 Aug 2017 15:36:53 +0000 (UTC)","X-detected-operating-system":"by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]\n\t[fuzzy]","X-Received-From":"209.132.183.28","Subject":"Re: [Qemu-devel] [PATCH v2] tests: Enable the drive_del test also\n\ton s390x","X-BeenThere":"qemu-devel@nongnu.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Id":"<qemu-devel.nongnu.org>","List-Unsubscribe":"<https://lists.nongnu.org/mailman/options/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=unsubscribe>","List-Archive":"<http://lists.nongnu.org/archive/html/qemu-devel/>","List-Post":"<mailto:qemu-devel@nongnu.org>","List-Help":"<mailto:qemu-devel-request@nongnu.org?subject=help>","List-Subscribe":"<https://lists.nongnu.org/mailman/listinfo/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=subscribe>","Cc":"Halil Pasic <pasic@linux.vnet.ibm.com>,\n\tStefan Hajnoczi <stefanha@redhat.com>,\n\tMichael S Tsirkin <mst@redhat.com>, \n\tFarhan Ali <alifm@linux.vnet.ibm.com>,\n\tPierre Morel <pmorel@linux.vnet.ibm.com>,\n\tClaudio Imbrenda <imbrenda@linux.vnet.ibm.com>,\n\tJason J Herne <jjherne@linux.vnet.ibm.com>,\n\tCleber Rosa <crosa@redhat.com>, \n\tDong Jia Shi <bjsdjshi@linux.vnet.ibm.com>","Errors-To":"qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org","Sender":"\"Qemu-devel\"\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>"}},{"id":1761532,"web_url":"http://patchwork.ozlabs.org/comment/1761532/","msgid":"<87o9qudbsk.fsf@dusky.pond.sub.org>","list_archive_url":null,"date":"2017-09-01T09:10:35","subject":"Re: [Qemu-devel] [PATCH v2] tests: Enable the drive_del test also\n\ton s390x","submitter":{"id":2645,"url":"http://patchwork.ozlabs.org/api/people/2645/","name":"Markus Armbruster","email":"armbru@redhat.com"},"content":"David Hildenbrand <david@redhat.com> writes:\n\n>>  static void test_drive_del_device_del(void)\n>>  {\n>> +    char *args;\n>> +\n>>      /* Start with a drive used by a device that unplugs instantaneously */\n>> -    qtest_start(\"-drive if=none,id=drive0,file=null-co://,format=raw\"\n>> -                \" -device virtio-scsi-pci\"\n>> -                \" -device scsi-hd,drive=drive0,id=dev0\");\n>> +    args = g_strdup_printf(\"-drive if=none,id=drive0,file=null-co://,format=raw\"\n>> +                           \" -device virtio-scsi-%s\"\n>> +                           \" -device scsi-hd,drive=drive0,id=dev0\",\n>\n> Would look better with the spaces at the end of the previous line (so\n> all \"-device\" are aligned), but just my taste.\n\nThe -device *are* aligned, but I get what you mean.\n\nThe advantage of leading rather than trailing space is that the\nintention \"this is still the same string\" is locally obvious both at the\nfirst part's end (no comma) and at the second part's beginning (leading\nspace).\n\n>> +                           qvirtio_get_dev_type());\n>> +    qtest_start(args);\n>>  \n>>      /*\n>>       * Delete the drive, and then the device\n[...]","headers":{"Return-Path":"<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=nongnu.org\n\t(client-ip=2001:4830:134:3::11; helo=lists.gnu.org;\n\tenvelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n\treceiver=<UNKNOWN>)","ext-mx08.extmail.prod.ext.phx2.redhat.com;\n\tdmarc=none (p=none dis=none) header.from=redhat.com","ext-mx08.extmail.prod.ext.phx2.redhat.com;\n\tspf=fail smtp.mailfrom=armbru@redhat.com"],"Received":["from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11])\n\t(using TLSv1 with cipher AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xkD4p5LgHz9t32\n\tfor <incoming@patchwork.ozlabs.org>;\n\tFri,  1 Sep 2017 19:11:22 +1000 (AEST)","from localhost ([::1]:59770 helo=lists.gnu.org)\n\tby lists.gnu.org with esmtp (Exim 4.71) (envelope-from\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>)\n\tid 1dnhyy-0007az-Pf\n\tfor incoming@patchwork.ozlabs.org; Fri, 01 Sep 2017 05:11:20 -0400","from eggs.gnu.org ([2001:4830:134:3::10]:55837)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <armbru@redhat.com>) id 1dnhyU-0007aj-2b\n\tfor qemu-devel@nongnu.org; Fri, 01 Sep 2017 05:10:51 -0400","from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <armbru@redhat.com>) id 1dnhyO-00053Z-PK\n\tfor qemu-devel@nongnu.org; Fri, 01 Sep 2017 05:10:49 -0400","from mx1.redhat.com ([209.132.183.28]:36966)\n\tby eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)\n\t(Exim 4.71) (envelope-from <armbru@redhat.com>) id 1dnhyO-00052K-Ib\n\tfor qemu-devel@nongnu.org; Fri, 01 Sep 2017 05:10:44 -0400","from smtp.corp.redhat.com\n\t(int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14])\n\t(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby mx1.redhat.com (Postfix) with ESMTPS id 2B035C0587D4;\n\tFri,  1 Sep 2017 09:10:43 +0000 (UTC)","from blackfin.pond.sub.org (ovpn-116-75.ams2.redhat.com\n\t[10.36.116.75])\n\tby smtp.corp.redhat.com (Postfix) with ESMTPS id D18217C881;\n\tFri,  1 Sep 2017 09:10:36 +0000 (UTC)","by blackfin.pond.sub.org (Postfix, from userid 1000)\n\tid 5A4241138662; Fri,  1 Sep 2017 11:10:35 +0200 (CEST)"],"DMARC-Filter":"OpenDMARC Filter v1.3.2 mx1.redhat.com 2B035C0587D4","From":"Markus Armbruster <armbru@redhat.com>","To":"David Hildenbrand <david@redhat.com>","References":"<1504190408-11143-1-git-send-email-thuth@redhat.com>\n\t<612870af-f8a4-039c-3e97-7590388b9e77@redhat.com>","Date":"Fri, 01 Sep 2017 11:10:35 +0200","In-Reply-To":"<612870af-f8a4-039c-3e97-7590388b9e77@redhat.com> (David\n\tHildenbrand's message of \"Thu, 31 Aug 2017 17:36:45 +0200\")","Message-ID":"<87o9qudbsk.fsf@dusky.pond.sub.org>","User-Agent":"Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux)","MIME-Version":"1.0","Content-Type":"text/plain","X-Scanned-By":"MIMEDefang 2.79 on 10.5.11.14","X-Greylist":"Sender IP whitelisted, not delayed by milter-greylist-4.5.16\n\t(mx1.redhat.com [10.5.110.32]);\n\tFri, 01 Sep 2017 09:10:43 +0000 (UTC)","X-detected-operating-system":"by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]\n\t[fuzzy]","X-Received-From":"209.132.183.28","Subject":"Re: [Qemu-devel] [PATCH v2] tests: Enable the drive_del test also\n\ton s390x","X-BeenThere":"qemu-devel@nongnu.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Id":"<qemu-devel.nongnu.org>","List-Unsubscribe":"<https://lists.nongnu.org/mailman/options/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=unsubscribe>","List-Archive":"<http://lists.nongnu.org/archive/html/qemu-devel/>","List-Post":"<mailto:qemu-devel@nongnu.org>","List-Help":"<mailto:qemu-devel-request@nongnu.org?subject=help>","List-Subscribe":"<https://lists.nongnu.org/mailman/listinfo/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=subscribe>","Cc":"Thomas Huth <thuth@redhat.com>, Farhan Ali <alifm@linux.vnet.ibm.com>,\n\tJason J Herne <jjherne@linux.vnet.ibm.com>,\n\tMichael S Tsirkin <mst@redhat.com>, Cornelia Huck <cohuck@redhat.com>,\n\tPierre Morel <pmorel@linux.vnet.ibm.com>,\n\tHalil Pasic <pasic@linux.vnet.ibm.com>, qemu-devel@nongnu.org,\n\tChristian Borntraeger <borntraeger@de.ibm.com>,\n\tStefan Hajnoczi <stefanha@redhat.com>, Cleber Rosa <crosa@redhat.com>,\n\tDong Jia Shi <bjsdjshi@linux.vnet.ibm.com>,\n\tClaudio Imbrenda <imbrenda@linux.vnet.ibm.com>","Errors-To":"qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org","Sender":"\"Qemu-devel\"\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>"}},{"id":1761576,"web_url":"http://patchwork.ozlabs.org/comment/1761576/","msgid":"<96af6291-8427-89c8-c644-a3d82c3240c8@redhat.com>","list_archive_url":null,"date":"2017-09-01T10:39:49","subject":"Re: [Qemu-devel] [PATCH v2] tests: Enable the drive_del test also\n\ton s390x","submitter":{"id":66152,"url":"http://patchwork.ozlabs.org/api/people/66152/","name":"Thomas Huth","email":"thuth@redhat.com"},"content":"On 01.09.2017 11:10, Markus Armbruster wrote:\n> David Hildenbrand <david@redhat.com> writes:\n> \n>>>  static void test_drive_del_device_del(void)\n>>>  {\n>>> +    char *args;\n>>> +\n>>>      /* Start with a drive used by a device that unplugs instantaneously */\n>>> -    qtest_start(\"-drive if=none,id=drive0,file=null-co://,format=raw\"\n>>> -                \" -device virtio-scsi-pci\"\n>>> -                \" -device scsi-hd,drive=drive0,id=dev0\");\n>>> +    args = g_strdup_printf(\"-drive if=none,id=drive0,file=null-co://,format=raw\"\n>>> +                           \" -device virtio-scsi-%s\"\n>>> +                           \" -device scsi-hd,drive=drive0,id=dev0\",\n>>\n>> Would look better with the spaces at the end of the previous line (so\n>> all \"-device\" are aligned), but just my taste.\n> \n> The -device *are* aligned, but I get what you mean.\n> \n> The advantage of leading rather than trailing space is that the\n> intention \"this is still the same string\" is locally obvious both at the\n> first part's end (no comma) and at the second part's beginning (leading\n> space).\n\nI don't mind either way, but in this case, I think I'd prefer to keep\nthe original formatting with the space at the beginning, for the\nfollowing two reasons:\n\n- The first line is already hitting the 80 columns limit, and I want to\n  avoid complaints from checkpatch.pl\n- The original author formatted it that way.\n\n Thomas","headers":{"Return-Path":"<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=nongnu.org\n\t(client-ip=2001:4830:134:3::11; helo=lists.gnu.org;\n\tenvelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n\treceiver=<UNKNOWN>)","ext-mx02.extmail.prod.ext.phx2.redhat.com;\n\tdmarc=none (p=none dis=none) header.from=redhat.com","ext-mx02.extmail.prod.ext.phx2.redhat.com;\n\tspf=fail smtp.mailfrom=thuth@redhat.com"],"Received":["from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11])\n\t(using TLSv1 with cipher AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xkG3n475Nz9t32\n\tfor <incoming@patchwork.ozlabs.org>;\n\tFri,  1 Sep 2017 20:40:33 +1000 (AEST)","from localhost ([::1]:34462 helo=lists.gnu.org)\n\tby lists.gnu.org with esmtp (Exim 4.71) (envelope-from\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>)\n\tid 1dnjNH-0007ZQ-B4\n\tfor incoming@patchwork.ozlabs.org; Fri, 01 Sep 2017 06:40:31 -0400","from eggs.gnu.org ([2001:4830:134:3::10]:46350)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <thuth@redhat.com>) id 1dnjMw-0007Tj-Is\n\tfor qemu-devel@nongnu.org; Fri, 01 Sep 2017 06:40:11 -0400","from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <thuth@redhat.com>) id 1dnjMt-0008JO-D4\n\tfor qemu-devel@nongnu.org; Fri, 01 Sep 2017 06:40:10 -0400","from mx1.redhat.com ([209.132.183.28]:39032)\n\tby eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)\n\t(Exim 4.71) (envelope-from <thuth@redhat.com>) id 1dnjMt-0008IR-4X\n\tfor qemu-devel@nongnu.org; Fri, 01 Sep 2017 06:40:07 -0400","from smtp.corp.redhat.com\n\t(int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15])\n\t(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby mx1.redhat.com (Postfix) with ESMTPS id 92784806B8;\n\tFri,  1 Sep 2017 10:40:05 +0000 (UTC)","from [10.36.116.102] (ovpn-116-102.ams2.redhat.com [10.36.116.102])\n\tby smtp.corp.redhat.com (Postfix) with ESMTPS id CD3A296143;\n\tFri,  1 Sep 2017 10:39:51 +0000 (UTC)"],"DMARC-Filter":"OpenDMARC Filter v1.3.2 mx1.redhat.com 92784806B8","To":"Markus Armbruster <armbru@redhat.com>,\n\tDavid Hildenbrand <david@redhat.com>","References":"<1504190408-11143-1-git-send-email-thuth@redhat.com>\n\t<612870af-f8a4-039c-3e97-7590388b9e77@redhat.com>\n\t<87o9qudbsk.fsf@dusky.pond.sub.org>","From":"Thomas Huth <thuth@redhat.com>","Message-ID":"<96af6291-8427-89c8-c644-a3d82c3240c8@redhat.com>","Date":"Fri, 1 Sep 2017 12:39:49 +0200","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101\n\tThunderbird/52.3.0","MIME-Version":"1.0","In-Reply-To":"<87o9qudbsk.fsf@dusky.pond.sub.org>","Content-Type":"text/plain; charset=utf-8","Content-Language":"en-US","Content-Transfer-Encoding":"7bit","X-Scanned-By":"MIMEDefang 2.79 on 10.5.11.15","X-Greylist":"Sender IP whitelisted, not delayed by milter-greylist-4.5.16\n\t(mx1.redhat.com [10.5.110.26]);\n\tFri, 01 Sep 2017 10:40:05 +0000 (UTC)","X-detected-operating-system":"by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]\n\t[fuzzy]","X-Received-From":"209.132.183.28","Subject":"Re: [Qemu-devel] [PATCH v2] tests: Enable the drive_del test also\n\ton s390x","X-BeenThere":"qemu-devel@nongnu.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Id":"<qemu-devel.nongnu.org>","List-Unsubscribe":"<https://lists.nongnu.org/mailman/options/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=unsubscribe>","List-Archive":"<http://lists.nongnu.org/archive/html/qemu-devel/>","List-Post":"<mailto:qemu-devel@nongnu.org>","List-Help":"<mailto:qemu-devel-request@nongnu.org?subject=help>","List-Subscribe":"<https://lists.nongnu.org/mailman/listinfo/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=subscribe>","Cc":"Halil Pasic <pasic@linux.vnet.ibm.com>,\n\tFarhan Ali <alifm@linux.vnet.ibm.com>,\n\tStefan Hajnoczi <stefanha@redhat.com>,\n\tMichael S Tsirkin <mst@redhat.com>, Cornelia Huck <cohuck@redhat.com>,\n\tPierre Morel <pmorel@linux.vnet.ibm.com>, qemu-devel@nongnu.org,\n\tClaudio Imbrenda <imbrenda@linux.vnet.ibm.com>,\n\tChristian Borntraeger <borntraeger@de.ibm.com>,\n\tJason J Herne <jjherne@linux.vnet.ibm.com>,\n\tCleber Rosa <crosa@redhat.com>, \n\tDong Jia Shi <bjsdjshi@linux.vnet.ibm.com>","Errors-To":"qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org","Sender":"\"Qemu-devel\"\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>"}},{"id":1761581,"web_url":"http://patchwork.ozlabs.org/comment/1761581/","msgid":"<20170901124302.3c7c27c6.cohuck@redhat.com>","list_archive_url":null,"date":"2017-09-01T10:43:02","subject":"Re: [Qemu-devel] [PATCH v2] tests: Enable the drive_del test also\n\ton s390x","submitter":{"id":71914,"url":"http://patchwork.ozlabs.org/api/people/71914/","name":"Cornelia Huck","email":"cohuck@redhat.com"},"content":"On Fri, 1 Sep 2017 12:39:49 +0200\nThomas Huth <thuth@redhat.com> wrote:\n\n> On 01.09.2017 11:10, Markus Armbruster wrote:\n> > David Hildenbrand <david@redhat.com> writes:\n> >   \n> >>>  static void test_drive_del_device_del(void)\n> >>>  {\n> >>> +    char *args;\n> >>> +\n> >>>      /* Start with a drive used by a device that unplugs instantaneously */\n> >>> -    qtest_start(\"-drive if=none,id=drive0,file=null-co://,format=raw\"\n> >>> -                \" -device virtio-scsi-pci\"\n> >>> -                \" -device scsi-hd,drive=drive0,id=dev0\");\n> >>> +    args = g_strdup_printf(\"-drive if=none,id=drive0,file=null-co://,format=raw\"\n> >>> +                           \" -device virtio-scsi-%s\"\n> >>> +                           \" -device scsi-hd,drive=drive0,id=dev0\",  \n> >>\n> >> Would look better with the spaces at the end of the previous line (so\n> >> all \"-device\" are aligned), but just my taste.  \n> > \n> > The -device *are* aligned, but I get what you mean.\n> > \n> > The advantage of leading rather than trailing space is that the\n> > intention \"this is still the same string\" is locally obvious both at the\n> > first part's end (no comma) and at the second part's beginning (leading\n> > space).  \n> \n> I don't mind either way, but in this case, I think I'd prefer to keep\n> the original formatting with the space at the beginning, for the\n> following two reasons:\n> \n> - The first line is already hitting the 80 columns limit, and I want to\n>   avoid complaints from checkpatch.pl\n> - The original author formatted it that way.\n\nI'd keep it that way as well.","headers":{"Return-Path":"<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=nongnu.org\n\t(client-ip=2001:4830:134:3::11; helo=lists.gnu.org;\n\tenvelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n\treceiver=<UNKNOWN>)","ext-mx02.extmail.prod.ext.phx2.redhat.com;\n\tdmarc=none (p=none dis=none) header.from=redhat.com","ext-mx02.extmail.prod.ext.phx2.redhat.com;\n\tspf=fail smtp.mailfrom=cohuck@redhat.com"],"Received":["from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11])\n\t(using TLSv1 with cipher AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xkG7V2TFmz9t32\n\tfor <incoming@patchwork.ozlabs.org>;\n\tFri,  1 Sep 2017 20:43:50 +1000 (AEST)","from localhost ([::1]:34586 helo=lists.gnu.org)\n\tby lists.gnu.org with esmtp (Exim 4.71) (envelope-from\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>)\n\tid 1dnjQR-0000u1-K9\n\tfor incoming@patchwork.ozlabs.org; Fri, 01 Sep 2017 06:43:47 -0400","from eggs.gnu.org ([2001:4830:134:3::10]:48007)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <cohuck@redhat.com>) id 1dnjQ4-0000tK-8c\n\tfor qemu-devel@nongnu.org; Fri, 01 Sep 2017 06:43:28 -0400","from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <cohuck@redhat.com>) id 1dnjPz-0003k5-LI\n\tfor qemu-devel@nongnu.org; Fri, 01 Sep 2017 06:43:24 -0400","from mx1.redhat.com ([209.132.183.28]:43756)\n\tby eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)\n\t(Exim 4.71) (envelope-from <cohuck@redhat.com>) id 1dnjPz-0003iw-EY\n\tfor qemu-devel@nongnu.org; Fri, 01 Sep 2017 06:43:19 -0400","from smtp.corp.redhat.com\n\t(int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14])\n\t(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby mx1.redhat.com (Postfix) with ESMTPS id BA3A980C11;\n\tFri,  1 Sep 2017 10:43:17 +0000 (UTC)","from gondolin (ovpn-116-242.ams2.redhat.com [10.36.116.242])\n\tby smtp.corp.redhat.com (Postfix) with ESMTP id 26D2A7C8A6;\n\tFri,  1 Sep 2017 10:43:05 +0000 (UTC)"],"DMARC-Filter":"OpenDMARC Filter v1.3.2 mx1.redhat.com BA3A980C11","Date":"Fri, 1 Sep 2017 12:43:02 +0200","From":"Cornelia Huck <cohuck@redhat.com>","To":"Thomas Huth <thuth@redhat.com>","Message-ID":"<20170901124302.3c7c27c6.cohuck@redhat.com>","In-Reply-To":"<96af6291-8427-89c8-c644-a3d82c3240c8@redhat.com>","References":"<1504190408-11143-1-git-send-email-thuth@redhat.com>\n\t<612870af-f8a4-039c-3e97-7590388b9e77@redhat.com>\n\t<87o9qudbsk.fsf@dusky.pond.sub.org>\n\t<96af6291-8427-89c8-c644-a3d82c3240c8@redhat.com>","Organization":"Red Hat GmbH","MIME-Version":"1.0","Content-Type":"text/plain; charset=US-ASCII","Content-Transfer-Encoding":"7bit","X-Scanned-By":"MIMEDefang 2.79 on 10.5.11.14","X-Greylist":"Sender IP whitelisted, not delayed by milter-greylist-4.5.16\n\t(mx1.redhat.com [10.5.110.26]);\n\tFri, 01 Sep 2017 10:43:17 +0000 (UTC)","X-detected-operating-system":"by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]\n\t[fuzzy]","X-Received-From":"209.132.183.28","Subject":"Re: [Qemu-devel] [PATCH v2] tests: Enable the drive_del test also\n\ton s390x","X-BeenThere":"qemu-devel@nongnu.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Id":"<qemu-devel.nongnu.org>","List-Unsubscribe":"<https://lists.nongnu.org/mailman/options/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=unsubscribe>","List-Archive":"<http://lists.nongnu.org/archive/html/qemu-devel/>","List-Post":"<mailto:qemu-devel@nongnu.org>","List-Help":"<mailto:qemu-devel-request@nongnu.org?subject=help>","List-Subscribe":"<https://lists.nongnu.org/mailman/listinfo/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=subscribe>","Cc":"Halil Pasic <pasic@linux.vnet.ibm.com>,\n\tStefan Hajnoczi <stefanha@redhat.com>,\n\tMichael S Tsirkin <mst@redhat.com>, \n\tFarhan Ali <alifm@linux.vnet.ibm.com>,\n\tPierre Morel <pmorel@linux.vnet.ibm.com>,\n\tMarkus Armbruster <armbru@redhat.com>, qemu-devel@nongnu.org,\n\tChristian Borntraeger <borntraeger@de.ibm.com>,\n\tJason J Herne <jjherne@linux.vnet.ibm.com>,\n\tCleber Rosa <crosa@redhat.com>, David Hildenbrand <david@redhat.com>,\n\tClaudio Imbrenda <imbrenda@linux.vnet.ibm.com>,\n\tDong Jia Shi <bjsdjshi@linux.vnet.ibm.com>","Errors-To":"qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org","Sender":"\"Qemu-devel\"\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>"}},{"id":1761708,"web_url":"http://patchwork.ozlabs.org/comment/1761708/","msgid":"<20170901154300.2f83c59a.cohuck@redhat.com>","list_archive_url":null,"date":"2017-09-01T13:43:00","subject":"Re: [Qemu-devel] [PATCH v2] tests: Enable the drive_del test also\n\ton s390x","submitter":{"id":71914,"url":"http://patchwork.ozlabs.org/api/people/71914/","name":"Cornelia Huck","email":"cohuck@redhat.com"},"content":"On Thu, 31 Aug 2017 16:40:08 +0200\nThomas Huth <thuth@redhat.com> wrote:\n\n> We can use the drive_del test on s390x, too, to check that adding and\n> deleting also works fine with the virtio-ccw bus. But we have to make\n> sure that we use the devices with the \"-ccw\" suffix instead of the\n> \"-pci\" suffix for the virtio-ccw transport on s390x. Introduce a helper\n> function called qvirtio_get_dev_type() that returns the correct string\n> for the current architecture.\n> \n> Signed-off-by: Thomas Huth <thuth@redhat.com>\n> ---\n>  I'm just sending a patch for this test now to get some feedback whether\n>  I'm on the right track now. If this approach with qvirtio_get_dev_type()\n>  gets accepted, I'll continue converting the other virtio tests, too.\n\nLooks good.\n\n> \n>  tests/Makefile.include |  3 ++-\n>  tests/drive_del-test.c | 25 ++++++++++++++++---------\n>  tests/libqos/virtio.c  | 17 +++++++++++++++++\n>  tests/libqos/virtio.h  |  3 +++\n>  4 files changed, 38 insertions(+), 10 deletions(-)\n> \n\n> diff --git a/tests/libqos/virtio.c b/tests/libqos/virtio.c\n> index 9880a69..0879a62 100644\n> --- a/tests/libqos/virtio.c\n> +++ b/tests/libqos/virtio.c\n> @@ -339,3 +339,20 @@ void qvirtqueue_set_used_event(QVirtQueue *vq, uint16_t idx)\n>      /* vq->avail->used_event */\n>      writew(vq->avail + 4 + (2 * vq->size), idx);\n>  }\n> +\n> +/*\n> + * qvirtio_get_dev_type:\n> + * Returns: the preferred virtio bus/device type for the current architecture.\n> + */\n> +const char *qvirtio_get_dev_type(void)\n> +{\n> +    const char *arch = qtest_get_arch();\n> +\n> +    if (g_str_equal(arch, \"arm\") || g_str_equal(arch, \"aarch64\")) {\n> +        return \"device\";  /* for virtio-mmio */\n\nWould not mind a comment from someone familiar with virtio-mmio, though.\n\n> +    } else if (g_str_equal(arch, \"s390x\")) {\n> +        return \"ccw\";\n> +    } else {\n> +        return \"pci\";\n> +    }\n> +}\n\nI'll take this, unless someone complains.","headers":{"Return-Path":"<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=nongnu.org\n\t(client-ip=2001:4830:134:3::11; helo=lists.gnu.org;\n\tenvelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n\treceiver=<UNKNOWN>)","ext-mx04.extmail.prod.ext.phx2.redhat.com;\n\tdmarc=none (p=none dis=none) header.from=redhat.com","ext-mx04.extmail.prod.ext.phx2.redhat.com;\n\tspf=fail smtp.mailfrom=cohuck@redhat.com"],"Received":["from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11])\n\t(using TLSv1 with cipher AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xkLG530PSz9s7F\n\tfor <incoming@patchwork.ozlabs.org>;\n\tFri,  1 Sep 2017 23:49:49 +1000 (AEST)","from localhost ([::1]:41975 helo=lists.gnu.org)\n\tby lists.gnu.org with esmtp (Exim 4.71) (envelope-from\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>)\n\tid 1dnmKR-0007sS-I7\n\tfor incoming@patchwork.ozlabs.org; Fri, 01 Sep 2017 09:49:47 -0400","from eggs.gnu.org ([2001:4830:134:3::10]:48005)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <cohuck@redhat.com>) id 1dnmEE-00028K-PB\n\tfor qemu-devel@nongnu.org; Fri, 01 Sep 2017 09:43:27 -0400","from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <cohuck@redhat.com>) id 1dnmEC-0000xq-Tx\n\tfor qemu-devel@nongnu.org; Fri, 01 Sep 2017 09:43:22 -0400","from mx1.redhat.com ([209.132.183.28]:33358)\n\tby eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)\n\t(Exim 4.71) (envelope-from <cohuck@redhat.com>) id 1dnmEC-0000wY-Nf\n\tfor qemu-devel@nongnu.org; Fri, 01 Sep 2017 09:43:20 -0400","from smtp.corp.redhat.com\n\t(int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11])\n\t(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby mx1.redhat.com (Postfix) with ESMTPS id 9D35B7EAA0;\n\tFri,  1 Sep 2017 13:43:19 +0000 (UTC)","from gondolin (ovpn-116-242.ams2.redhat.com [10.36.116.242])\n\tby smtp.corp.redhat.com (Postfix) with ESMTP id 2FA179343A;\n\tFri,  1 Sep 2017 13:43:03 +0000 (UTC)"],"DMARC-Filter":"OpenDMARC Filter v1.3.2 mx1.redhat.com 9D35B7EAA0","Date":"Fri, 1 Sep 2017 15:43:00 +0200","From":"Cornelia Huck <cohuck@redhat.com>","To":"Thomas Huth <thuth@redhat.com>","Message-ID":"<20170901154300.2f83c59a.cohuck@redhat.com>","In-Reply-To":"<1504190408-11143-1-git-send-email-thuth@redhat.com>","References":"<1504190408-11143-1-git-send-email-thuth@redhat.com>","Organization":"Red Hat GmbH","MIME-Version":"1.0","Content-Type":"text/plain; charset=US-ASCII","Content-Transfer-Encoding":"7bit","X-Scanned-By":"MIMEDefang 2.79 on 10.5.11.11","X-Greylist":"Sender IP whitelisted, not delayed by milter-greylist-4.5.16\n\t(mx1.redhat.com [10.5.110.28]);\n\tFri, 01 Sep 2017 13:43:19 +0000 (UTC)","X-detected-operating-system":"by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]\n\t[fuzzy]","X-Received-From":"209.132.183.28","Subject":"Re: [Qemu-devel] [PATCH v2] tests: Enable the drive_del test also\n\ton s390x","X-BeenThere":"qemu-devel@nongnu.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Id":"<qemu-devel.nongnu.org>","List-Unsubscribe":"<https://lists.nongnu.org/mailman/options/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=unsubscribe>","List-Archive":"<http://lists.nongnu.org/archive/html/qemu-devel/>","List-Post":"<mailto:qemu-devel@nongnu.org>","List-Help":"<mailto:qemu-devel-request@nongnu.org?subject=help>","List-Subscribe":"<https://lists.nongnu.org/mailman/listinfo/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=subscribe>","Cc":"Halil Pasic <pasic@linux.vnet.ibm.com>,\n\tStefan Hajnoczi <stefanha@redhat.com>,\n\tDavid Hildenbrand <david@redhat.com>,\n\tFarhan Ali <alifm@linux.vnet.ibm.com>,\n\tPierre Morel <pmorel@linux.vnet.ibm.com>, qemu-devel@nongnu.org,\n\tClaudio Imbrenda <imbrenda@linux.vnet.ibm.com>,\n\tChristian Borntraeger <borntraeger@de.ibm.com>,\n\tMichael S Tsirkin <mst@redhat.com>,\n\tJason J Herne <jjherne@linux.vnet.ibm.com>,\n\tCleber Rosa <crosa@redhat.com>, \n\tDong Jia Shi <bjsdjshi@linux.vnet.ibm.com>","Errors-To":"qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org","Sender":"\"Qemu-devel\"\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>"}},{"id":1761953,"web_url":"http://patchwork.ozlabs.org/comment/1761953/","msgid":"<a9a20aa6-c016-75f6-48ed-b95765895209@redhat.com>","list_archive_url":null,"date":"2017-09-01T19:46:07","subject":"Re: [Qemu-devel] [PATCH v2] tests: Enable the drive_del test also\n\ton s390x","submitter":{"id":6591,"url":"http://patchwork.ozlabs.org/api/people/6591/","name":"Eric Blake","email":"eblake@redhat.com"},"content":"On 09/01/2017 05:39 AM, Thomas Huth wrote:\n>>>>      /* Start with a drive used by a device that unplugs instantaneously */\n>>>> -    qtest_start(\"-drive if=none,id=drive0,file=null-co://,format=raw\"\n>>>> -                \" -device virtio-scsi-pci\"\n>>>> -                \" -device scsi-hd,drive=drive0,id=dev0\");\n>>>> +    args = g_strdup_printf(\"-drive if=none,id=drive0,file=null-co://,format=raw\"\n>>>> +                           \" -device virtio-scsi-%s\"\n>>>> +                           \" -device scsi-hd,drive=drive0,id=dev0\",\n>>>\n>>> Would look better with the spaces at the end of the previous line (so\n>>> all \"-device\" are aligned), but just my taste.\n>>\n>> The -device *are* aligned, but I get what you mean.\n>>\n>> The advantage of leading rather than trailing space is that the\n>> intention \"this is still the same string\" is locally obvious both at the\n>> first part's end (no comma) and at the second part's beginning (leading\n>> space).\n> \n> I don't mind either way, but in this case, I think I'd prefer to keep\n> the original formatting with the space at the beginning, for the\n> following two reasons:\n> \n> - The first line is already hitting the 80 columns limit, and I want to\n>   avoid complaints from checkpatch.pl\n> - The original author formatted it that way.\n\nAs it is, I got annoyed by the fact that we had so much strdup() of args\nto pass to qtest_init/qtest_start(), so my latest series reformats the\ncode yet another way:\nhttps://lists.gnu.org/archive/html/qemu-devel/2017-09/msg00308.html\n\nProne to cause some fun conflict resolution if my cleanups take too long\nto get in the tree...","headers":{"Return-Path":"<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=nongnu.org\n\t(client-ip=2001:4830:134:3::11; helo=lists.gnu.org;\n\tenvelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n\treceiver=<UNKNOWN>)","ext-mx06.extmail.prod.ext.phx2.redhat.com;\n\tdmarc=none (p=none dis=none) header.from=redhat.com","ext-mx06.extmail.prod.ext.phx2.redhat.com;\n\tspf=fail smtp.mailfrom=eblake@redhat.com"],"Received":["from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11])\n\t(using TLSv1 with cipher AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xkVB54RKCz9sPt\n\tfor <incoming@patchwork.ozlabs.org>;\n\tSat,  2 Sep 2017 05:46:50 +1000 (AEST)","from localhost ([::1]:57395 helo=lists.gnu.org)\n\tby lists.gnu.org with esmtp (Exim 4.71) (envelope-from\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>)\n\tid 1dnrtu-0000Jj-K2\n\tfor incoming@patchwork.ozlabs.org; Fri, 01 Sep 2017 15:46:46 -0400","from eggs.gnu.org ([2001:4830:134:3::10]:47867)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <eblake@redhat.com>) id 1dnrta-0000Eb-L1\n\tfor qemu-devel@nongnu.org; Fri, 01 Sep 2017 15:46:27 -0400","from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <eblake@redhat.com>) id 1dnrtW-0007TA-MS\n\tfor qemu-devel@nongnu.org; Fri, 01 Sep 2017 15:46:26 -0400","from mx1.redhat.com ([209.132.183.28]:37500)\n\tby eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)\n\t(Exim 4.71) (envelope-from <eblake@redhat.com>) id 1dnrtW-0007SX-DW\n\tfor qemu-devel@nongnu.org; Fri, 01 Sep 2017 15:46:22 -0400","from smtp.corp.redhat.com\n\t(int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13])\n\t(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby mx1.redhat.com (Postfix) with ESMTPS id 0FD721F597;\n\tFri,  1 Sep 2017 19:46:21 +0000 (UTC)","from [10.10.121.149] (ovpn-121-149.rdu2.redhat.com [10.10.121.149])\n\tby smtp.corp.redhat.com (Postfix) with ESMTP id 0750278385;\n\tFri,  1 Sep 2017 19:46:08 +0000 (UTC)"],"DMARC-Filter":"OpenDMARC Filter v1.3.2 mx1.redhat.com 0FD721F597","To":"Thomas Huth <thuth@redhat.com>, Markus Armbruster <armbru@redhat.com>,\n\tDavid Hildenbrand <david@redhat.com>","References":"<1504190408-11143-1-git-send-email-thuth@redhat.com>\n\t<612870af-f8a4-039c-3e97-7590388b9e77@redhat.com>\n\t<87o9qudbsk.fsf@dusky.pond.sub.org>\n\t<96af6291-8427-89c8-c644-a3d82c3240c8@redhat.com>","From":"Eric Blake <eblake@redhat.com>","Openpgp":"url=http://people.redhat.com/eblake/eblake.gpg","Organization":"Red Hat, Inc.","Message-ID":"<a9a20aa6-c016-75f6-48ed-b95765895209@redhat.com>","Date":"Fri, 1 Sep 2017 14:46:07 -0500","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101\n\tThunderbird/52.3.0","MIME-Version":"1.0","In-Reply-To":"<96af6291-8427-89c8-c644-a3d82c3240c8@redhat.com>","Content-Type":"multipart/signed; micalg=pgp-sha256;\n\tprotocol=\"application/pgp-signature\";\n\tboundary=\"OEQGvPSKW00SGN2Lce1O1aSHxsLitlrmh\"","X-Scanned-By":"MIMEDefang 2.79 on 10.5.11.13","X-Greylist":"Sender IP whitelisted, not delayed by milter-greylist-4.5.16\n\t(mx1.redhat.com [10.5.110.30]);\n\tFri, 01 Sep 2017 19:46:21 +0000 (UTC)","X-detected-operating-system":"by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]\n\t[fuzzy]","X-Received-From":"209.132.183.28","X-Content-Filtered-By":"Mailman/MimeDel 2.1.21","Subject":"Re: [Qemu-devel] [PATCH v2] tests: Enable the drive_del test also\n\ton s390x","X-BeenThere":"qemu-devel@nongnu.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Id":"<qemu-devel.nongnu.org>","List-Unsubscribe":"<https://lists.nongnu.org/mailman/options/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=unsubscribe>","List-Archive":"<http://lists.nongnu.org/archive/html/qemu-devel/>","List-Post":"<mailto:qemu-devel@nongnu.org>","List-Help":"<mailto:qemu-devel-request@nongnu.org?subject=help>","List-Subscribe":"<https://lists.nongnu.org/mailman/listinfo/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=subscribe>","Cc":"Halil Pasic <pasic@linux.vnet.ibm.com>,\n\tFarhan Ali <alifm@linux.vnet.ibm.com>,\n\tJason J Herne <jjherne@linux.vnet.ibm.com>,\n\tMichael S Tsirkin <mst@redhat.com>, Cornelia Huck <cohuck@redhat.com>,\n\tPierre Morel <pmorel@linux.vnet.ibm.com>, qemu-devel@nongnu.org,\n\tClaudio Imbrenda <imbrenda@linux.vnet.ibm.com>,\n\tChristian Borntraeger <borntraeger@de.ibm.com>,\n\tStefan Hajnoczi <stefanha@redhat.com>, Cleber Rosa <crosa@redhat.com>,\n\tDong Jia Shi <bjsdjshi@linux.vnet.ibm.com>","Errors-To":"qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org","Sender":"\"Qemu-devel\"\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>"}},{"id":1762644,"web_url":"http://patchwork.ozlabs.org/comment/1762644/","msgid":"<20170904154303.48c525fd.cohuck@redhat.com>","list_archive_url":null,"date":"2017-09-04T13:43:03","subject":"Re: [Qemu-devel] [PATCH v2] tests: Enable the drive_del test also\n\ton s390x","submitter":{"id":71914,"url":"http://patchwork.ozlabs.org/api/people/71914/","name":"Cornelia Huck","email":"cohuck@redhat.com"},"content":"On Fri, 1 Sep 2017 15:43:00 +0200\nCornelia Huck <cohuck@redhat.com> wrote:\n\n> On Thu, 31 Aug 2017 16:40:08 +0200\n> Thomas Huth <thuth@redhat.com> wrote:\n> \n> > We can use the drive_del test on s390x, too, to check that adding and\n> > deleting also works fine with the virtio-ccw bus. But we have to make\n> > sure that we use the devices with the \"-ccw\" suffix instead of the\n> > \"-pci\" suffix for the virtio-ccw transport on s390x. Introduce a helper\n> > function called qvirtio_get_dev_type() that returns the correct string\n> > for the current architecture.\n> > \n> > Signed-off-by: Thomas Huth <thuth@redhat.com>\n> > ---\n> >  I'm just sending a patch for this test now to get some feedback whether\n> >  I'm on the right track now. If this approach with qvirtio_get_dev_type()\n> >  gets accepted, I'll continue converting the other virtio tests, too.  \n> \n> Looks good.\n> \n> > \n> >  tests/Makefile.include |  3 ++-\n> >  tests/drive_del-test.c | 25 ++++++++++++++++---------\n> >  tests/libqos/virtio.c  | 17 +++++++++++++++++\n> >  tests/libqos/virtio.h  |  3 +++\n> >  4 files changed, 38 insertions(+), 10 deletions(-)\n> >   \n> \n> > diff --git a/tests/libqos/virtio.c b/tests/libqos/virtio.c\n> > index 9880a69..0879a62 100644\n> > --- a/tests/libqos/virtio.c\n> > +++ b/tests/libqos/virtio.c\n> > @@ -339,3 +339,20 @@ void qvirtqueue_set_used_event(QVirtQueue *vq, uint16_t idx)\n> >      /* vq->avail->used_event */\n> >      writew(vq->avail + 4 + (2 * vq->size), idx);\n> >  }\n> > +\n> > +/*\n> > + * qvirtio_get_dev_type:\n> > + * Returns: the preferred virtio bus/device type for the current architecture.\n> > + */\n> > +const char *qvirtio_get_dev_type(void)\n> > +{\n> > +    const char *arch = qtest_get_arch();\n> > +\n> > +    if (g_str_equal(arch, \"arm\") || g_str_equal(arch, \"aarch64\")) {\n> > +        return \"device\";  /* for virtio-mmio */  \n> \n> Would not mind a comment from someone familiar with virtio-mmio, though.\n> \n> > +    } else if (g_str_equal(arch, \"s390x\")) {\n> > +        return \"ccw\";\n> > +    } else {\n> > +        return \"pci\";\n> > +    }\n> > +}  \n> \n> I'll take this, unless someone complains.\n\nNobody complained, so I applied this.","headers":{"Return-Path":"<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=nongnu.org\n\t(client-ip=2001:4830:134:3::11; helo=lists.gnu.org;\n\tenvelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n\treceiver=<UNKNOWN>)","ext-mx10.extmail.prod.ext.phx2.redhat.com;\n\tdmarc=none (p=none dis=none) header.from=redhat.com","ext-mx10.extmail.prod.ext.phx2.redhat.com;\n\tspf=fail smtp.mailfrom=cohuck@redhat.com"],"Received":["from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11])\n\t(using TLSv1 with cipher AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xmB101Fhdz9t16\n\tfor <incoming@patchwork.ozlabs.org>;\n\tMon,  4 Sep 2017 23:44:51 +1000 (AEST)","from localhost ([::1]:43055 helo=lists.gnu.org)\n\tby lists.gnu.org with esmtp (Exim 4.71) (envelope-from\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>)\n\tid 1dorgG-0003XL-KN\n\tfor incoming@patchwork.ozlabs.org; Mon, 04 Sep 2017 09:44:48 -0400","from eggs.gnu.org ([2001:4830:134:3::10]:34070)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <cohuck@redhat.com>) id 1dorfM-0003Br-Pf\n\tfor qemu-devel@nongnu.org; Mon, 04 Sep 2017 09:44:24 -0400","from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <cohuck@redhat.com>) id 1dorel-0003sr-KU\n\tfor qemu-devel@nongnu.org; Mon, 04 Sep 2017 09:43:52 -0400","from mx1.redhat.com ([209.132.183.28]:47544)\n\tby eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)\n\t(Exim 4.71) (envelope-from <cohuck@redhat.com>) id 1dorel-0003rw-9p\n\tfor qemu-devel@nongnu.org; Mon, 04 Sep 2017 09:43:15 -0400","from smtp.corp.redhat.com\n\t(int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12])\n\t(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby mx1.redhat.com (Postfix) with ESMTPS id 7159E62657;\n\tMon,  4 Sep 2017 13:43:13 +0000 (UTC)","from gondolin (dhcp-192-215.str.redhat.com [10.33.192.215])\n\tby smtp.corp.redhat.com (Postfix) with ESMTP id A6A367F545;\n\tMon,  4 Sep 2017 13:43:05 +0000 (UTC)"],"DMARC-Filter":"OpenDMARC Filter v1.3.2 mx1.redhat.com 7159E62657","Date":"Mon, 4 Sep 2017 15:43:03 +0200","From":"Cornelia Huck <cohuck@redhat.com>","To":"Thomas Huth <thuth@redhat.com>","Message-ID":"<20170904154303.48c525fd.cohuck@redhat.com>","In-Reply-To":"<20170901154300.2f83c59a.cohuck@redhat.com>","References":"<1504190408-11143-1-git-send-email-thuth@redhat.com>\n\t<20170901154300.2f83c59a.cohuck@redhat.com>","Organization":"Red Hat GmbH","MIME-Version":"1.0","Content-Type":"text/plain; charset=US-ASCII","Content-Transfer-Encoding":"7bit","X-Scanned-By":"MIMEDefang 2.79 on 10.5.11.12","X-Greylist":"Sender IP whitelisted, not delayed by milter-greylist-4.5.16\n\t(mx1.redhat.com [10.5.110.39]);\n\tMon, 04 Sep 2017 13:43:13 +0000 (UTC)","X-detected-operating-system":"by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]\n\t[fuzzy]","X-Received-From":"209.132.183.28","Subject":"Re: [Qemu-devel] [PATCH v2] tests: Enable the drive_del test also\n\ton s390x","X-BeenThere":"qemu-devel@nongnu.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Id":"<qemu-devel.nongnu.org>","List-Unsubscribe":"<https://lists.nongnu.org/mailman/options/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=unsubscribe>","List-Archive":"<http://lists.nongnu.org/archive/html/qemu-devel/>","List-Post":"<mailto:qemu-devel@nongnu.org>","List-Help":"<mailto:qemu-devel-request@nongnu.org?subject=help>","List-Subscribe":"<https://lists.nongnu.org/mailman/listinfo/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=subscribe>","Cc":"Halil Pasic <pasic@linux.vnet.ibm.com>,\n\tStefan Hajnoczi <stefanha@redhat.com>,\n\tDavid Hildenbrand <david@redhat.com>,\n\tFarhan Ali <alifm@linux.vnet.ibm.com>,\n\tPierre Morel <pmorel@linux.vnet.ibm.com>, qemu-devel@nongnu.org,\n\tClaudio Imbrenda <imbrenda@linux.vnet.ibm.com>,\n\tChristian Borntraeger <borntraeger@de.ibm.com>,\n\tMichael S Tsirkin <mst@redhat.com>,\n\tJason J Herne <jjherne@linux.vnet.ibm.com>,\n\tCleber Rosa <crosa@redhat.com>, \n\tDong Jia Shi <bjsdjshi@linux.vnet.ibm.com>","Errors-To":"qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org","Sender":"\"Qemu-devel\"\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>"}}]