From nobody Mon Feb 9 07:57:34 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1531151324560154.00098611853105; Mon, 9 Jul 2018 08:48:44 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 45F6380F7C; Mon, 9 Jul 2018 15:48:42 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id ED83419483; Mon, 9 Jul 2018 15:48:41 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 455601800B69; Mon, 9 Jul 2018 15:48:41 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w69Fmbhg014469 for ; Mon, 9 Jul 2018 11:48:37 -0400 Received: by smtp.corp.redhat.com (Postfix) id 7F23F1C597; Mon, 9 Jul 2018 15:48:37 +0000 (UTC) Received: from angien.brq.redhat.com (unknown [10.43.2.136]) by smtp.corp.redhat.com (Postfix) with ESMTP id DDA091C596; Mon, 9 Jul 2018 15:48:36 +0000 (UTC) From: Peter Krempa To: libvir-list@redhat.com Date: Mon, 9 Jul 2018 17:56:21 +0200 Message-Id: <57ae800457c2d8f977d81749b13d33c3719dc285.1531151655.git.pkrempa@redhat.com> In-Reply-To: References: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-loop: libvir-list@redhat.com Cc: Peter Krempa Subject: [libvirt] [PATCH 1/4] tests: qemuxml2argv: Unify all tests for disk error policy X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Mon, 09 Jul 2018 15:48:43 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Add multiple drives with the various configurations rather than having multiple tests. Signed-off-by: Peter Krempa Reviewed-by: J=EF=BF=BDn Tomko --- .../disk-drive-error-policy-enospace.args | 30 ---------------- .../disk-drive-error-policy-enospace.xml | 37 ------------------- .../disk-drive-error-policy-stop.args | 30 ---------------- .../disk-drive-error-policy-stop.xml | 37 ------------------- ...t-rignore.args =3D> disk-drive-error-policy.args} | 9 +++-- ...ort-rignore.xml =3D> disk-drive-error-policy.xml} | 13 ++++--- tests/qemuxml2argvtest.c | 4 +-- .../disk-drive-error-policy-enospace.xml | 41 ------------------= ---- .../disk-drive-error-policy-stop.xml | 41 ------------------= ---- ...ort-rignore.xml =3D> disk-drive-error-policy.xml} | 13 ++++--- tests/qemuxml2xmltest.c | 4 +-- 11 files changed, 26 insertions(+), 233 deletions(-) delete mode 100644 tests/qemuxml2argvdata/disk-drive-error-policy-enospace= .args delete mode 100644 tests/qemuxml2argvdata/disk-drive-error-policy-enospace= .xml delete mode 100644 tests/qemuxml2argvdata/disk-drive-error-policy-stop.args delete mode 100644 tests/qemuxml2argvdata/disk-drive-error-policy-stop.xml rename tests/qemuxml2argvdata/{disk-drive-error-policy-wreport-rignore.arg= s =3D> disk-drive-error-policy.args} (73%) rename tests/qemuxml2argvdata/{disk-drive-error-policy-wreport-rignore.xml= =3D> disk-drive-error-policy.xml} (75%) delete mode 100644 tests/qemuxml2xmloutdata/disk-drive-error-policy-enospa= ce.xml delete mode 100644 tests/qemuxml2xmloutdata/disk-drive-error-policy-stop.x= ml rename tests/qemuxml2xmloutdata/{disk-drive-error-policy-wreport-rignore.x= ml =3D> disk-drive-error-policy.xml} (78%) diff --git a/tests/qemuxml2argvdata/disk-drive-error-policy-enospace.args b= /tests/qemuxml2argvdata/disk-drive-error-policy-enospace.args deleted file mode 100644 index 3b7f54c975..0000000000 --- a/tests/qemuxml2argvdata/disk-drive-error-policy-enospace.args +++ /dev/null @@ -1,30 +0,0 @@ -LC_ALL=3DC \ -PATH=3D/bin \ -HOME=3D/home/test \ -USER=3Dtest \ -LOGNAME=3Dtest \ -QEMU_AUDIO_DRV=3Dnone \ -/usr/bin/qemu-system-i686 \ --name QEMUGuest1 \ --S \ --machine pc,accel=3Dtcg,usb=3Doff,dump-guest-core=3Doff \ --m 214 \ --smp 1,sockets=3D1,cores=3D1,threads=3D1 \ --uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \ --display none \ --no-user-config \ --nodefaults \ --chardev socket,id=3Dcharmonitor,path=3D/tmp/lib/domain--1-QEMUGuest1/moni= tor.sock,\ -server,nowait \ --mon chardev=3Dcharmonitor,id=3Dmonitor,mode=3Dcontrol \ --rtc base=3Dutc \ --no-shutdown \ --no-acpi \ --boot c \ --usb \ --drive file=3D/dev/HostVG/QEMUGuest1,format=3Dqcow2,if=3Dnone,id=3Ddrive-i= de0-0-0,\ -werror=3Denospc,cache=3Dnone \ --device ide-drive,bus=3Dide.0,unit=3D0,drive=3Ddrive-ide0-0-0,id=3Dide0-0-= 0 \ --drive file=3D/dev/HostVG/QEMUGuest2,format=3Draw,if=3Dnone,id=3Ddrive-ide= 0-1-0,\ -media=3Dcdrom,readonly=3Don \ --device ide-drive,bus=3Dide.1,unit=3D0,drive=3Ddrive-ide0-1-0,id=3Dide0-1-0 diff --git a/tests/qemuxml2argvdata/disk-drive-error-policy-enospace.xml b/= tests/qemuxml2argvdata/disk-drive-error-policy-enospace.xml deleted file mode 100644 index dcde3fd2ed..0000000000 --- a/tests/qemuxml2argvdata/disk-drive-error-policy-enospace.xml +++ /dev/null @@ -1,37 +0,0 @@ - - QEMUGuest1 - c7a5fdbd-edaf-9455-926a-d65c16db1809 - 219136 - 219136 - 1 - - hvm - - - - destroy - restart - destroy - - /usr/bin/qemu-system-i686 - - - - -
- - - - - - -
- - - - - - - - - diff --git a/tests/qemuxml2argvdata/disk-drive-error-policy-stop.args b/tes= ts/qemuxml2argvdata/disk-drive-error-policy-stop.args deleted file mode 100644 index 28a9727c67..0000000000 --- a/tests/qemuxml2argvdata/disk-drive-error-policy-stop.args +++ /dev/null @@ -1,30 +0,0 @@ -LC_ALL=3DC \ -PATH=3D/bin \ -HOME=3D/home/test \ -USER=3Dtest \ -LOGNAME=3Dtest \ -QEMU_AUDIO_DRV=3Dnone \ -/usr/bin/qemu-system-i686 \ --name QEMUGuest1 \ --S \ --machine pc,accel=3Dtcg,usb=3Doff,dump-guest-core=3Doff \ --m 214 \ --smp 1,sockets=3D1,cores=3D1,threads=3D1 \ --uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \ --display none \ --no-user-config \ --nodefaults \ --chardev socket,id=3Dcharmonitor,path=3D/tmp/lib/domain--1-QEMUGuest1/moni= tor.sock,\ -server,nowait \ --mon chardev=3Dcharmonitor,id=3Dmonitor,mode=3Dcontrol \ --rtc base=3Dutc \ --no-shutdown \ --no-acpi \ --boot c \ --usb \ --drive file=3D/dev/HostVG/QEMUGuest1,format=3Dqcow2,if=3Dnone,id=3Ddrive-i= de0-0-0,\ -werror=3Dstop,rerror=3Dstop,cache=3Dnone \ --device ide-drive,bus=3Dide.0,unit=3D0,drive=3Ddrive-ide0-0-0,id=3Dide0-0-= 0 \ --drive file=3D/dev/HostVG/QEMUGuest2,format=3Draw,if=3Dnone,id=3Ddrive-ide= 0-1-0,\ -media=3Dcdrom,readonly=3Don \ --device ide-drive,bus=3Dide.1,unit=3D0,drive=3Ddrive-ide0-1-0,id=3Dide0-1-0 diff --git a/tests/qemuxml2argvdata/disk-drive-error-policy-stop.xml b/test= s/qemuxml2argvdata/disk-drive-error-policy-stop.xml deleted file mode 100644 index 004dc974cd..0000000000 --- a/tests/qemuxml2argvdata/disk-drive-error-policy-stop.xml +++ /dev/null @@ -1,37 +0,0 @@ - - QEMUGuest1 - c7a5fdbd-edaf-9455-926a-d65c16db1809 - 219136 - 219136 - 1 - - hvm - - - - destroy - restart - destroy - - /usr/bin/qemu-system-i686 - - - - -
- - - - - - -
- - - - - - - - - diff --git a/tests/qemuxml2argvdata/disk-drive-error-policy-wreport-rignore= .args b/tests/qemuxml2argvdata/disk-drive-error-policy.args similarity index 73% rename from tests/qemuxml2argvdata/disk-drive-error-policy-wreport-rignore.= args rename to tests/qemuxml2argvdata/disk-drive-error-policy.args index b570de2ed6..9d510015f6 100644 --- a/tests/qemuxml2argvdata/disk-drive-error-policy-wreport-rignore.args +++ b/tests/qemuxml2argvdata/disk-drive-error-policy.args @@ -23,8 +23,11 @@ server,nowait \ -boot c \ -usb \ -drive file=3D/dev/HostVG/QEMUGuest1,format=3Dqcow2,if=3Dnone,id=3Ddrive-i= de0-0-0,\ -werror=3Dreport,rerror=3Dignore,cache=3Dnone \ +werror=3Dstop,rerror=3Dstop,cache=3Dnone \ -device ide-drive,bus=3Dide.0,unit=3D0,drive=3Ddrive-ide0-0-0,id=3Dide0-0-= 0 \ --drive file=3D/dev/HostVG/QEMUGuest2,format=3Draw,if=3Dnone,id=3Ddrive-ide= 0-1-0,\ -media=3Dcdrom,readonly=3Don \ +-drive file=3D/dev/HostVG/QEMUGuest2,format=3Dqcow2,if=3Dnone,id=3Ddrive-i= de0-0-1,\ +werror=3Denospc,cache=3Dnone \ +-device ide-drive,bus=3Dide.0,unit=3D1,drive=3Ddrive-ide0-0-1,id=3Dide0-0-= 1 \ +-drive file=3D/dev/HostVG/QEMUGuest3,format=3Dqcow2,if=3Dnone,id=3Ddrive-i= de0-1-0,\ +werror=3Dreport,rerror=3Dignore,cache=3Dnone \ -device ide-drive,bus=3Dide.1,unit=3D0,drive=3Ddrive-ide0-1-0,id=3Dide0-1-0 diff --git a/tests/qemuxml2argvdata/disk-drive-error-policy-wreport-rignore= .xml b/tests/qemuxml2argvdata/disk-drive-error-policy.xml similarity index 75% rename from tests/qemuxml2argvdata/disk-drive-error-policy-wreport-rignore.= xml rename to tests/qemuxml2argvdata/disk-drive-error-policy.xml index 98d2be9f2e..708c13fc0e 100644 --- a/tests/qemuxml2argvdata/disk-drive-error-policy-wreport-rignore.xml +++ b/tests/qemuxml2argvdata/disk-drive-error-policy.xml @@ -15,16 +15,21 @@ /usr/bin/qemu-system-i686 - +
- - + + + +
+ + + + -
diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index 3be5af03aa..65b034a75c 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -1035,9 +1035,7 @@ mymain(void) DO_TEST_PARSE_ERROR("disk-drive-shared-qcow", NONE); DO_TEST("disk-drive-shared-locking", QEMU_CAPS_VIRTIO_SCSI, QEMU_CAPS_DISK_SHARE_RW); - DO_TEST("disk-drive-error-policy-stop", NONE); - DO_TEST("disk-drive-error-policy-enospace", NONE); - DO_TEST("disk-drive-error-policy-wreport-rignore", NONE); + DO_TEST("disk-drive-error-policy", NONE); DO_TEST("disk-drive-cache-v2-wt", NONE); DO_TEST("disk-drive-cache-v2-wb", NONE); DO_TEST("disk-drive-cache-v2-none", NONE); diff --git a/tests/qemuxml2xmloutdata/disk-drive-error-policy-enospace.xml = b/tests/qemuxml2xmloutdata/disk-drive-error-policy-enospace.xml deleted file mode 100644 index 6ec367c76e..0000000000 --- a/tests/qemuxml2xmloutdata/disk-drive-error-policy-enospace.xml +++ /dev/null @@ -1,41 +0,0 @@ - - QEMUGuest1 - c7a5fdbd-edaf-9455-926a-d65c16db1809 - 219136 - 219136 - 1 - - hvm - - - - destroy - restart - destroy - - /usr/bin/qemu-system-i686 - - - - -
- - - - - - -
- - -
- - -
- - - - - - - diff --git a/tests/qemuxml2xmloutdata/disk-drive-error-policy-stop.xml b/te= sts/qemuxml2xmloutdata/disk-drive-error-policy-stop.xml deleted file mode 100644 index 51bd87fa6c..0000000000 --- a/tests/qemuxml2xmloutdata/disk-drive-error-policy-stop.xml +++ /dev/null @@ -1,41 +0,0 @@ - - QEMUGuest1 - c7a5fdbd-edaf-9455-926a-d65c16db1809 - 219136 - 219136 - 1 - - hvm - - - - destroy - restart - destroy - - /usr/bin/qemu-system-i686 - - - - -
- - - - - - -
- - -
- - -
- - - - - - - diff --git a/tests/qemuxml2xmloutdata/disk-drive-error-policy-wreport-rigno= re.xml b/tests/qemuxml2xmloutdata/disk-drive-error-policy.xml similarity index 78% rename from tests/qemuxml2xmloutdata/disk-drive-error-policy-wreport-rignor= e.xml rename to tests/qemuxml2xmloutdata/disk-drive-error-policy.xml index e4a21f4f11..0e534a1add 100644 --- a/tests/qemuxml2xmloutdata/disk-drive-error-policy-wreport-rignore.xml +++ b/tests/qemuxml2xmloutdata/disk-drive-error-policy.xml @@ -15,16 +15,21 @@ /usr/bin/qemu-system-i686 - +
- - + + + +
+ + + + -
diff --git a/tests/qemuxml2xmltest.c b/tests/qemuxml2xmltest.c index bbb995656e..c0b228515c 100644 --- a/tests/qemuxml2xmltest.c +++ b/tests/qemuxml2xmltest.c @@ -356,9 +356,7 @@ mymain(void) DO_TEST("disk-virtio-drive-queues", QEMU_CAPS_VIRTIO_BLK_NUM_QUEUES); DO_TEST("disk-drive-boot-disk", NONE); DO_TEST("disk-drive-boot-cdrom", NONE); - DO_TEST("disk-drive-error-policy-stop", NONE); - DO_TEST("disk-drive-error-policy-enospace", NONE); - DO_TEST("disk-drive-error-policy-wreport-rignore", NONE); + DO_TEST("disk-drive-error-policy", NONE); DO_TEST("disk-drive-fmt-qcow", NONE); DO_TEST("disk-drive-copy-on-read", NONE); DO_TEST("disk-drive-cache-v2-wt", NONE); --=20 2.16.2 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Mon Feb 9 07:57:34 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1531151324422320.67702056050655; Mon, 9 Jul 2018 08:48:44 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 824C7308626D; Mon, 9 Jul 2018 15:48:42 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 3E16710021B1; Mon, 9 Jul 2018 15:48:42 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 74F8F1800B68; Mon, 9 Jul 2018 15:48:41 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w69Fmcjg014477 for ; Mon, 9 Jul 2018 11:48:38 -0400 Received: by smtp.corp.redhat.com (Postfix) id 3EAAB1C597; Mon, 9 Jul 2018 15:48:38 +0000 (UTC) Received: from angien.brq.redhat.com (unknown [10.43.2.136]) by smtp.corp.redhat.com (Postfix) with ESMTP id B9D031C596; Mon, 9 Jul 2018 15:48:37 +0000 (UTC) From: Peter Krempa To: libvir-list@redhat.com Date: Mon, 9 Jul 2018 17:56:22 +0200 Message-Id: In-Reply-To: References: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-loop: libvir-list@redhat.com Cc: Peter Krempa Subject: [libvirt] [PATCH 2/4] tests: qemuxml2argv: Add CAPS_LATEST version for the disk error policy test X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.49]); Mon, 09 Jul 2018 15:48:43 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Add output arguments generated with the latest qemu capabilities. Signed-off-by: Peter Krempa Reviewed-by: J=EF=BF=BDn Tomko --- .../disk-drive-error-policy.x86_64-latest.args | 41 ++++++++++++++++++= ++++ tests/qemuxml2argvtest.c | 1 + 2 files changed, 42 insertions(+) create mode 100644 tests/qemuxml2argvdata/disk-drive-error-policy.x86_64-l= atest.args diff --git a/tests/qemuxml2argvdata/disk-drive-error-policy.x86_64-latest.a= rgs b/tests/qemuxml2argvdata/disk-drive-error-policy.x86_64-latest.args new file mode 100644 index 0000000000..388f78df0f --- /dev/null +++ b/tests/qemuxml2argvdata/disk-drive-error-policy.x86_64-latest.args @@ -0,0 +1,41 @@ +LC_ALL=3DC \ +PATH=3D/bin \ +HOME=3D/home/test \ +USER=3Dtest \ +LOGNAME=3Dtest \ +QEMU_AUDIO_DRV=3Dnone \ +/usr/bin/qemu-system-i686 \ +-name guest=3DQEMUGuest1,debug-threads=3Don \ +-S \ +-object secret,id=3DmasterKey0,format=3Draw,\ +file=3D/tmp/lib/domain--1-QEMUGuest1/master-key.aes \ +-machine pc,accel=3Dtcg,usb=3Doff,dump-guest-core=3Doff \ +-m 214 \ +-realtime mlock=3Doff \ +-smp 1,sockets=3D1,cores=3D1,threads=3D1 \ +-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \ +-display none \ +-no-user-config \ +-nodefaults \ +-chardev socket,id=3Dcharmonitor,fd=3D1729,server,nowait \ +-mon chardev=3Dcharmonitor,id=3Dmonitor,mode=3Dcontrol \ +-rtc base=3Dutc \ +-no-shutdown \ +-no-acpi \ +-boot strict=3Don \ +-device piix3-usb-uhci,id=3Dusb,bus=3Dpci.0,addr=3D0x1.0x2 \ +-drive file=3D/dev/HostVG/QEMUGuest1,format=3Dqcow2,if=3Dnone,id=3Ddrive-i= de0-0-0,\ +werror=3Dstop,rerror=3Dstop,cache=3Dnone \ +-device ide-hd,bus=3Dide.0,unit=3D0,drive=3Ddrive-ide0-0-0,id=3Dide0-0-0,b= ootindex=3D1,\ +write-cache=3Don \ +-drive file=3D/dev/HostVG/QEMUGuest2,format=3Dqcow2,if=3Dnone,id=3Ddrive-i= de0-0-1,\ +werror=3Denospc,cache=3Dnone \ +-device ide-hd,bus=3Dide.0,unit=3D1,drive=3Ddrive-ide0-0-1,id=3Dide0-0-1,\ +write-cache=3Don \ +-drive file=3D/dev/HostVG/QEMUGuest3,format=3Dqcow2,if=3Dnone,id=3Ddrive-i= de0-1-0,\ +werror=3Dreport,rerror=3Dignore,cache=3Dnone \ +-device ide-hd,bus=3Dide.1,unit=3D0,drive=3Ddrive-ide0-1-0,id=3Dide0-1-0,\ +write-cache=3Don \ +-sandbox on,obsolete=3Ddeny,elevateprivileges=3Ddeny,spawn=3Ddeny,\ +resourcecontrol=3Ddeny \ +-msg timestamp=3Don diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index 65b034a75c..a929e4314e 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -1036,6 +1036,7 @@ mymain(void) DO_TEST("disk-drive-shared-locking", QEMU_CAPS_VIRTIO_SCSI, QEMU_CAPS_DISK_SHARE_RW); DO_TEST("disk-drive-error-policy", NONE); + DO_TEST_CAPS_LATEST("disk-drive-error-policy"); DO_TEST("disk-drive-cache-v2-wt", NONE); DO_TEST("disk-drive-cache-v2-wb", NONE); DO_TEST("disk-drive-cache-v2-none", NONE); --=20 2.16.2 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Mon Feb 9 07:57:34 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1531151330663999.7706782815883; Mon, 9 Jul 2018 08:48:50 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 430BB308214A; Mon, 9 Jul 2018 15:48:49 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id E56991001F3D; Mon, 9 Jul 2018 15:48:48 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 92FF514B08; Mon, 9 Jul 2018 15:48:48 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w69FmdxH014484 for ; Mon, 9 Jul 2018 11:48:39 -0400 Received: by smtp.corp.redhat.com (Postfix) id F2B841C597; Mon, 9 Jul 2018 15:48:38 +0000 (UTC) Received: from angien.brq.redhat.com (unknown [10.43.2.136]) by smtp.corp.redhat.com (Postfix) with ESMTP id 795F11C596; Mon, 9 Jul 2018 15:48:38 +0000 (UTC) From: Peter Krempa To: libvir-list@redhat.com Date: Mon, 9 Jul 2018 17:56:23 +0200 Message-Id: <86559f385ae9a60fd170ef742a11cb1ccdc7e68e.1531151655.git.pkrempa@redhat.com> In-Reply-To: References: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-loop: libvir-list@redhat.com Cc: Peter Krempa Subject: [libvirt] [PATCH 3/4] qemu: capabilities: Add capability for werror/rerror for 'usb-device' frontend X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.42]); Mon, 09 Jul 2018 15:48:49 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Support for specifying it with the -device frontend was added recently. Add a capability for it. Signed-off-by: Peter Krempa Reviewed-by: J=EF=BF=BDn Tomko --- src/qemu/qemu_capabilities.c | 2 ++ src/qemu/qemu_capabilities.h | 1 + tests/qemucapabilitiesdata/caps_3.0.0.x86_64.xml | 1 + 3 files changed, 4 insertions(+) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index c7da916f9a..23b483349f 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -502,6 +502,7 @@ VIR_ENUM_IMPL(virQEMUCaps, QEMU_CAPS_LAST, "sev-guest", "machine.pseries.cap-hpt-max-page-size", "machine.pseries.cap-htm", + "usb-storage.werror", ); @@ -1240,6 +1241,7 @@ static struct virQEMUCapsStringFlags virQEMUCapsDevic= ePropsUSBStorage[] =3D { { "removable", QEMU_CAPS_USB_STORAGE_REMOVABLE }, { "share-rw", QEMU_CAPS_DISK_SHARE_RW }, { "write-cache", QEMU_CAPS_DISK_WRITE_CACHE }, + { "werror", QEMU_CAPS_USB_STORAGE_WERROR }, }; static struct virQEMUCapsStringFlags virQEMUCapsDevicePropsKVMPit[] =3D { diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h index a048a1cf02..1fa0ebfea3 100644 --- a/src/qemu/qemu_capabilities.h +++ b/src/qemu/qemu_capabilities.h @@ -486,6 +486,7 @@ typedef enum { /* virQEMUCapsFlags grouping marker for = syntax-check */ QEMU_CAPS_SEV_GUEST, /* -object sev-guest,... */ QEMU_CAPS_MACHINE_PSERIES_CAP_HPT_MAX_PAGE_SIZE, /* -machine pseries.c= ap-hpt-max-page-size */ QEMU_CAPS_MACHINE_PSERIES_CAP_HTM, /* -machine pseries.cap-htm */ + QEMU_CAPS_USB_STORAGE_WERROR, /* -device usb-storage,werror=3D..,rerro= r=3D.. */ QEMU_CAPS_LAST /* this must always be the last item */ } virQEMUCapsFlags; diff --git a/tests/qemucapabilitiesdata/caps_3.0.0.x86_64.xml b/tests/qemuc= apabilitiesdata/caps_3.0.0.x86_64.xml index 07e3de8677..d7c25c65dd 100644 --- a/tests/qemucapabilitiesdata/caps_3.0.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_3.0.0.x86_64.xml @@ -209,6 +209,7 @@ + 2012050 0 437827 --=20 2.16.2 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Mon Feb 9 07:57:34 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1531151331015900.1941699879304; Mon, 9 Jul 2018 08:48:51 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 436F68110B; Mon, 9 Jul 2018 15:48:49 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id EBB151001F5E; Mon, 9 Jul 2018 15:48:48 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 966021800B6A; Mon, 9 Jul 2018 15:48:48 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w69Fmd1A014489 for ; Mon, 9 Jul 2018 11:48:39 -0400 Received: by smtp.corp.redhat.com (Postfix) id B0BC91C597; Mon, 9 Jul 2018 15:48:39 +0000 (UTC) Received: from angien.brq.redhat.com (unknown [10.43.2.136]) by smtp.corp.redhat.com (Postfix) with ESMTP id 383431C596; Mon, 9 Jul 2018 15:48:39 +0000 (UTC) From: Peter Krempa To: libvir-list@redhat.com Date: Mon, 9 Jul 2018 17:56:24 +0200 Message-Id: In-Reply-To: References: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-loop: libvir-list@redhat.com Cc: Peter Krempa Subject: [libvirt] [PATCH 4/4] qemu: command: Format rerror/werror with -device instead of -drive X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Mon, 09 Jul 2018 15:48:49 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Use the new proper location for the read/write error policy selection. Signed-off-by: Peter Krempa Reviewed-by: J=EF=BF=BDn Tomko --- src/qemu/qemu_command.c | 6 +++++- .../disk-drive-error-policy.x86_64-latest.args | 12 ++++++--= ---- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 3c1e87fad4..7fd2c8b372 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -1664,7 +1664,8 @@ qemuBuildDriveStr(virDomainDiskDefPtr disk, /* werror/rerror are really frontend attributes, but older * qemu requires them on -drive instead of -device */ - qemuBuildDiskFrontendAttributeErrorPolicy(disk, &opt); + if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_USB_STORAGE_WERROR)) + qemuBuildDiskFrontendAttributeErrorPolicy(disk, &opt); /* While this is a frontend attribute, it only makes sense to be used = when @@ -2126,6 +2127,9 @@ qemuBuildDriveDevStr(const virDomainDef *def, qemuBuildDiskFrontendAttributes(disk, &opt); + if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_USB_STORAGE_WERROR)) + qemuBuildDiskFrontendAttributeErrorPolicy(disk, &opt); + if (virBufferCheckError(&opt) < 0) goto error; diff --git a/tests/qemuxml2argvdata/disk-drive-error-policy.x86_64-latest.a= rgs b/tests/qemuxml2argvdata/disk-drive-error-policy.x86_64-latest.args index 388f78df0f..e8fa9e2452 100644 --- a/tests/qemuxml2argvdata/disk-drive-error-policy.x86_64-latest.args +++ b/tests/qemuxml2argvdata/disk-drive-error-policy.x86_64-latest.args @@ -25,17 +25,17 @@ file=3D/tmp/lib/domain--1-QEMUGuest1/master-key.aes \ -boot strict=3Don \ -device piix3-usb-uhci,id=3Dusb,bus=3Dpci.0,addr=3D0x1.0x2 \ -drive file=3D/dev/HostVG/QEMUGuest1,format=3Dqcow2,if=3Dnone,id=3Ddrive-i= de0-0-0,\ -werror=3Dstop,rerror=3Dstop,cache=3Dnone \ +cache=3Dnone \ -device ide-hd,bus=3Dide.0,unit=3D0,drive=3Ddrive-ide0-0-0,id=3Dide0-0-0,b= ootindex=3D1,\ -write-cache=3Don \ +write-cache=3Don,werror=3Dstop,rerror=3Dstop \ -drive file=3D/dev/HostVG/QEMUGuest2,format=3Dqcow2,if=3Dnone,id=3Ddrive-i= de0-0-1,\ -werror=3Denospc,cache=3Dnone \ +cache=3Dnone \ -device ide-hd,bus=3Dide.0,unit=3D1,drive=3Ddrive-ide0-0-1,id=3Dide0-0-1,\ -write-cache=3Don \ +write-cache=3Don,werror=3Denospc \ -drive file=3D/dev/HostVG/QEMUGuest3,format=3Dqcow2,if=3Dnone,id=3Ddrive-i= de0-1-0,\ -werror=3Dreport,rerror=3Dignore,cache=3Dnone \ +cache=3Dnone \ -device ide-hd,bus=3Dide.1,unit=3D0,drive=3Ddrive-ide0-1-0,id=3Dide0-1-0,\ -write-cache=3Don \ +write-cache=3Don,werror=3Dreport,rerror=3Dignore \ -sandbox on,obsolete=3Ddeny,elevateprivileges=3Ddeny,spawn=3Ddeny,\ resourcecontrol=3Ddeny \ -msg timestamp=3Don --=20 2.16.2 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list