From nobody Tue Apr 30 16:46:25 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=virtuozzo.com ARC-Seal: i=1; a=rsa-sha256; t=1563206839; cv=none; d=zoho.com; s=zohoarc; b=VkCJFh89ZPwzyMZN9RbpxjJ/JhFlirhNMiAOU9UbPEoBnRN+TYw4BEvIDP6IAlkH6Kh7zFYtyRKje/A6IlS/DsF0OwFHkLODA8lP1EL+PH9tbrzPpVdZ3MTZs8FT+nJqfEefLisJlcHsaPcr2wN1dwuR/JhHIYWBfpN4HfX48z4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1563206839; h=Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:Message-ID:Sender:Subject:To:ARC-Authentication-Results; bh=270m6QUtaW9acs/1KZo9usgul8OqBWzOx+0qYf76Bw0=; b=RvmdFbya9FlmH/c2KaUbUZD/nuIKHnIpPIRNGb7Q3vXwDkQ42eza+OYINqgY7au0nrbQlGQOU6U5oDrxDtkheloe7KnwG8u+DDgJ1CU0Pt8+QLfUGOCrknsjSvYlXZHvkeo2uNK3htIBuyiSy0DT2xan/ca8qQTFdBFqPG238nc= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1563206839210387.06355101605357; Mon, 15 Jul 2019 09:07:19 -0700 (PDT) Received: from localhost ([::1]:40606 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hn3VV-0007lo-Dg for importer@patchew.org; Mon, 15 Jul 2019 12:07:17 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56653) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hn3VF-0007BV-1j for qemu-devel@nongnu.org; Mon, 15 Jul 2019 12:07:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hn3VB-0008Mk-Ku for qemu-devel@nongnu.org; Mon, 15 Jul 2019 12:07:01 -0400 Received: from relay.sw.ru ([185.231.240.75]:52186) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hn3VB-0008LJ-4Q for qemu-devel@nongnu.org; Mon, 15 Jul 2019 12:06:57 -0400 Received: from [172.16.25.136] (helo=localhost.sw.ru) by relay.sw.ru with esmtp (Exim 4.92) (envelope-from ) id 1hn3V7-0003GL-Pv; Mon, 15 Jul 2019 19:06:53 +0300 From: Andrey Shinkevich To: qemu-devel@nongnu.org, andrey.shinkevich@virtuozzo.com Date: Mon, 15 Jul 2019 19:06:44 +0300 Message-Id: <1563206804-396512-1-git-send-email-andrey.shinkevich@virtuozzo.com> X-Mailer: git-send-email 1.8.3.1 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 185.231.240.75 Subject: [Qemu-devel] [PATCH] iotests: Set read-zeroes on in null block driver for Valgrind X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" The Valgrind tool reports about the uninitialised buffer 'buf' instantiated on the stack of the function guess_disk_lchs(). Pass 'read-zeroes=3Don' to the null block driver to make it deterministic. The output of the tests 051, 186 and 227 now includes the parameter 'read-zeroes'. So, the benchmark output files are being changed too. Suggested-by: Kevin Wolf Signed-off-by: Andrey Shinkevich --- Note: The change in the tests 093 and 136 reveals the race condition in chardev. The patch "chardev: race condition with tcp_chr_disconnect" has been emailed to qemu-devel@nongnu.org on July, 12 of 2019 with the Message ID <1562959033-223586-1-git-send-email-andrey.shinkevich@virtuozzo.com> tests/qemu-iotests/051 | 10 +-- tests/qemu-iotests/051.pc.out | 10 +-- tests/qemu-iotests/093 | 9 +-- tests/qemu-iotests/136 | 1 + tests/qemu-iotests/186 | 20 +++--- tests/qemu-iotests/186.out | 152 +++++++++++++++++++++-----------------= ---- tests/qemu-iotests/227 | 4 +- tests/qemu-iotests/227.out | 4 +- tests/qemu-iotests/238 | 2 +- tests/qemu-iotests/240 | 8 +-- 10 files changed, 111 insertions(+), 109 deletions(-) diff --git a/tests/qemu-iotests/051 b/tests/qemu-iotests/051 index 200660f..ce942a5 100755 --- a/tests/qemu-iotests/051 +++ b/tests/qemu-iotests/051 @@ -251,11 +251,11 @@ echo # Cannot use the test image because cache=3Dnone might not work on the hos= t FS # Use cdrom so that we won't get errors about missing media =20 -run_qemu -drive driver=3Dnull-co,cache=3Dnone -run_qemu -drive driver=3Dnull-co,cache=3Ddirectsync -run_qemu -drive driver=3Dnull-co,cache=3Dwriteback -run_qemu -drive driver=3Dnull-co,cache=3Dwritethrough -run_qemu -drive driver=3Dnull-co,cache=3Dunsafe +run_qemu -drive driver=3Dnull-co,read-zeroes=3Don,cache=3Dnone +run_qemu -drive driver=3Dnull-co,read-zeroes=3Don,cache=3Ddirectsync +run_qemu -drive driver=3Dnull-co,read-zeroes=3Don,cache=3Dwriteback +run_qemu -drive driver=3Dnull-co,read-zeroes=3Don,cache=3Dwritethrough +run_qemu -drive driver=3Dnull-co,read-zeroes=3Don,cache=3Dunsafe run_qemu -drive driver=3Dnull-co,cache=3Dinvalid_value =20 # Can't test direct=3Don here because O_DIRECT might not be supported on t= his FS diff --git a/tests/qemu-iotests/051.pc.out b/tests/qemu-iotests/051.pc.out index 2d811c1..000557c 100644 --- a/tests/qemu-iotests/051.pc.out +++ b/tests/qemu-iotests/051.pc.out @@ -245,23 +245,23 @@ QEMU X.Y.Z monitor - type 'help' for more information =20 =3D=3D=3D Cache modes =3D=3D=3D =20 -Testing: -drive driver=3Dnull-co,cache=3Dnone +Testing: -drive driver=3Dnull-co,read-zeroes=3Don,cache=3Dnone QEMU X.Y.Z monitor - type 'help' for more information (qemu) quit =20 -Testing: -drive driver=3Dnull-co,cache=3Ddirectsync +Testing: -drive driver=3Dnull-co,read-zeroes=3Don,cache=3Ddirectsync QEMU X.Y.Z monitor - type 'help' for more information (qemu) quit =20 -Testing: -drive driver=3Dnull-co,cache=3Dwriteback +Testing: -drive driver=3Dnull-co,read-zeroes=3Don,cache=3Dwriteback QEMU X.Y.Z monitor - type 'help' for more information (qemu) quit =20 -Testing: -drive driver=3Dnull-co,cache=3Dwritethrough +Testing: -drive driver=3Dnull-co,read-zeroes=3Don,cache=3Dwritethrough QEMU X.Y.Z monitor - type 'help' for more information (qemu) quit =20 -Testing: -drive driver=3Dnull-co,cache=3Dunsafe +Testing: -drive driver=3Dnull-co,read-zeroes=3Don,cache=3Dunsafe QEMU X.Y.Z monitor - type 'help' for more information (qemu) quit =20 diff --git a/tests/qemu-iotests/093 b/tests/qemu-iotests/093 index d88fbc1..4b2cac1 100755 --- a/tests/qemu-iotests/093 +++ b/tests/qemu-iotests/093 @@ -38,7 +38,7 @@ class ThrottleTestCase(iotests.QMPTestCase): def setUp(self): self.vm =3D iotests.VM() for i in range(0, self.max_drives): - self.vm.add_drive(self.test_img) + self.vm.add_drive(self.test_img, "file.read-zeroes=3Don") self.vm.launch() =20 def tearDown(self): @@ -273,7 +273,8 @@ class ThrottleTestGroupNames(iotests.QMPTestCase): def setUp(self): self.vm =3D iotests.VM() for i in range(0, self.max_drives): - self.vm.add_drive(self.test_img, "throttling.iops-total=3D100") + self.vm.add_drive(self.test_img, + "throttling.iops-total=3D100,file.read-zeroe= s=3Don") self.vm.launch() =20 def tearDown(self): @@ -378,10 +379,10 @@ class ThrottleTestRemovableMedia(iotests.QMPTestCase): def test_removable_media(self): # Add a couple of dummy nodes named cd0 and cd1 result =3D self.vm.qmp("blockdev-add", driver=3D"null-aio", - node_name=3D"cd0") + read_zeroes=3DTrue, node_name=3D"cd0") self.assert_qmp(result, 'return', {}) result =3D self.vm.qmp("blockdev-add", driver=3D"null-aio", - node_name=3D"cd1") + read_zeroes=3DTrue, node_name=3D"cd1") self.assert_qmp(result, 'return', {}) =20 # Attach a CD drive with cd0 inserted diff --git a/tests/qemu-iotests/136 b/tests/qemu-iotests/136 index af7ffa4..a46a7b7 100755 --- a/tests/qemu-iotests/136 +++ b/tests/qemu-iotests/136 @@ -74,6 +74,7 @@ sector =3D "%d" (self.account_invalid and "on" or "off")) drive_args.append("stats-account-failed=3D%s" % (self.account_failed and "on" or "off")) + drive_args.append("file.image.read-zeroes=3Don") self.create_blkdebug_file() self.vm =3D iotests.VM().add_drive('blkdebug:%s:%s' % (blkdebug_file, self.test_img), diff --git a/tests/qemu-iotests/186 b/tests/qemu-iotests/186 index 7e7d45b..5f6b18c 100755 --- a/tests/qemu-iotests/186 +++ b/tests/qemu-iotests/186 @@ -86,8 +86,8 @@ echo "=3D=3D=3D -blockdev/-device=3D =3D=3D=3D" echo =20 for dev in $fixed $removable; do - check_info_block -blockdev driver=3Dnull-co,node-name=3Dnull -device $= dev,drive=3Dnull - check_info_block -blockdev driver=3Dnull-co,node-name=3Dnull -device $= dev,drive=3Dnull,id=3Dqdev_id + check_info_block -blockdev driver=3Dnull-co,read-zeroes=3Don,node-name= =3Dnull -device $dev,drive=3Dnull + check_info_block -blockdev driver=3Dnull-co,read-zeroes=3Don,node-name= =3Dnull -device $dev,drive=3Dnull,id=3Dqdev_id done =20 echo @@ -97,7 +97,7 @@ echo # This creates two BlockBackends that will show up in 'info block'! # A monitor-owned one from -drive, and anonymous one from -device for dev in $fixed $removable; do - check_info_block -drive if=3Dnone,driver=3Dnull-co,node-name=3Dnull -d= evice $dev,drive=3Dnull,id=3Dqdev_id + check_info_block -drive if=3Dnone,driver=3Dnull-co,read-zeroes=3Don,no= de-name=3Dnull -device $dev,drive=3Dnull,id=3Dqdev_id done =20 echo @@ -105,8 +105,8 @@ echo "=3D=3D=3D -drive if=3Dnone/-device=3D (w= ith medium) =3D=3D=3D" echo =20 for dev in $fixed $removable; do - check_info_block -drive if=3Dnone,driver=3Dnull-co,node-name=3Dnull -d= evice $dev,drive=3Dnone0 - check_info_block -drive if=3Dnone,driver=3Dnull-co,node-name=3Dnull -d= evice $dev,drive=3Dnone0,id=3Dqdev_id + check_info_block -drive if=3Dnone,driver=3Dnull-co,read-zeroes=3Don,no= de-name=3Dnull -device $dev,drive=3Dnone0 + check_info_block -drive if=3Dnone,driver=3Dnull-co,read-zeroes=3Don,no= de-name=3Dnull -device $dev,drive=3Dnone0,id=3Dqdev_id done =20 echo @@ -125,15 +125,15 @@ echo "=3D=3D=3D -drive if=3D... =3D=3D=3D" echo =20 check_info_block -drive if=3Dfloppy -check_info_block -drive if=3Dfloppy,driver=3Dnull-co +check_info_block -drive if=3Dfloppy,driver=3Dnull-co,read-zeroes=3Don =20 -check_info_block -drive if=3Dide,driver=3Dnull-co +check_info_block -drive if=3Dide,driver=3Dnull-co,read-zeroes=3Don check_info_block -drive if=3Dide,media=3Dcdrom -check_info_block -drive if=3Dide,driver=3Dnull-co,media=3Dcdrom +check_info_block -drive if=3Dide,driver=3Dnull-co,read-zeroes=3Don,media= =3Dcdrom =20 -check_info_block -drive if=3Dvirtio,driver=3Dnull-co +check_info_block -drive if=3Dvirtio,driver=3Dnull-co,read-zeroes=3Don =20 -check_info_block -drive if=3Dpflash,driver=3Dnull-co,size=3D1M +check_info_block -drive if=3Dpflash,driver=3Dnull-co,read-zeroes=3Don,size= =3D1M =20 # success, all done echo "*** done" diff --git a/tests/qemu-iotests/186.out b/tests/qemu-iotests/186.out index 716b01a..5b35040 100644 --- a/tests/qemu-iotests/186.out +++ b/tests/qemu-iotests/186.out @@ -54,103 +54,103 @@ qdev_id: [not inserted] =20 =3D=3D=3D -blockdev/-device=3D =3D=3D=3D =20 -Testing: -blockdev driver=3Dnull-co,node-name=3Dnull -device ide-hd,drive= =3Dnull +Testing: -blockdev driver=3Dnull-co,read-zeroes=3Don,node-name=3Dnull -dev= ice ide-hd,drive=3Dnull QEMU X.Y.Z monitor - type 'help' for more information (qemu) info block -null: null-co:// (null-co) +null: json:{"read-zeroes": true, "driver": "null-co"} (null-co) Attached to: PATH Cache mode: writeback (qemu) quit =20 -Testing: -blockdev driver=3Dnull-co,node-name=3Dnull -device ide-hd,drive= =3Dnull,id=3Dqdev_id +Testing: -blockdev driver=3Dnull-co,read-zeroes=3Don,node-name=3Dnull -dev= ice ide-hd,drive=3Dnull,id=3Dqdev_id QEMU X.Y.Z monitor - type 'help' for more information (qemu) info block -null: null-co:// (null-co) +null: json:{"read-zeroes": true, "driver": "null-co"} (null-co) Attached to: qdev_id Cache mode: writeback (qemu) quit =20 -Testing: -blockdev driver=3Dnull-co,node-name=3Dnull -device scsi-hd,drive= =3Dnull +Testing: -blockdev driver=3Dnull-co,read-zeroes=3Don,node-name=3Dnull -dev= ice scsi-hd,drive=3Dnull QEMU X.Y.Z monitor - type 'help' for more information (qemu) info block -null: null-co:// (null-co) +null: json:{"read-zeroes": true, "driver": "null-co"} (null-co) Attached to: PATH Cache mode: writeback (qemu) quit =20 -Testing: -blockdev driver=3Dnull-co,node-name=3Dnull -device scsi-hd,drive= =3Dnull,id=3Dqdev_id +Testing: -blockdev driver=3Dnull-co,read-zeroes=3Don,node-name=3Dnull -dev= ice scsi-hd,drive=3Dnull,id=3Dqdev_id QEMU X.Y.Z monitor - type 'help' for more information (qemu) info block -null: null-co:// (null-co) +null: json:{"read-zeroes": true, "driver": "null-co"} (null-co) Attached to: qdev_id Cache mode: writeback (qemu) quit =20 -Testing: -blockdev driver=3Dnull-co,node-name=3Dnull -device virtio-blk-pc= i,drive=3Dnull +Testing: -blockdev driver=3Dnull-co,read-zeroes=3Don,node-name=3Dnull -dev= ice virtio-blk-pci,drive=3Dnull QEMU X.Y.Z monitor - type 'help' for more information (qemu) info block -null: null-co:// (null-co) +null: json:{"read-zeroes": true, "driver": "null-co"} (null-co) Attached to: PATH Cache mode: writeback (qemu) quit =20 -Testing: -blockdev driver=3Dnull-co,node-name=3Dnull -device virtio-blk-pc= i,drive=3Dnull,id=3Dqdev_id +Testing: -blockdev driver=3Dnull-co,read-zeroes=3Don,node-name=3Dnull -dev= ice virtio-blk-pci,drive=3Dnull,id=3Dqdev_id QEMU X.Y.Z monitor - type 'help' for more information (qemu) info block -null: null-co:// (null-co) +null: json:{"read-zeroes": true, "driver": "null-co"} (null-co) Attached to: PATH Cache mode: writeback (qemu) quit =20 -Testing: -blockdev driver=3Dnull-co,node-name=3Dnull -device floppy,drive= =3Dnull +Testing: -blockdev driver=3Dnull-co,read-zeroes=3Don,node-name=3Dnull -dev= ice floppy,drive=3Dnull QEMU X.Y.Z monitor - type 'help' for more information (qemu) info block -null: null-co:// (null-co) +null: json:{"read-zeroes": true, "driver": "null-co"} (null-co) Attached to: PATH Removable device: not locked, tray closed Cache mode: writeback (qemu) quit =20 -Testing: -blockdev driver=3Dnull-co,node-name=3Dnull -device floppy,drive= =3Dnull,id=3Dqdev_id +Testing: -blockdev driver=3Dnull-co,read-zeroes=3Don,node-name=3Dnull -dev= ice floppy,drive=3Dnull,id=3Dqdev_id QEMU X.Y.Z monitor - type 'help' for more information (qemu) info block -null: null-co:// (null-co) +null: json:{"read-zeroes": true, "driver": "null-co"} (null-co) Attached to: qdev_id Removable device: not locked, tray closed Cache mode: writeback (qemu) quit =20 -Testing: -blockdev driver=3Dnull-co,node-name=3Dnull -device ide-cd,drive= =3Dnull +Testing: -blockdev driver=3Dnull-co,read-zeroes=3Don,node-name=3Dnull -dev= ice ide-cd,drive=3Dnull QEMU X.Y.Z monitor - type 'help' for more information (qemu) info block -null: null-co:// (null-co) +null: json:{"read-zeroes": true, "driver": "null-co"} (null-co) Attached to: PATH Removable device: not locked, tray closed Cache mode: writeback (qemu) quit =20 -Testing: -blockdev driver=3Dnull-co,node-name=3Dnull -device ide-cd,drive= =3Dnull,id=3Dqdev_id +Testing: -blockdev driver=3Dnull-co,read-zeroes=3Don,node-name=3Dnull -dev= ice ide-cd,drive=3Dnull,id=3Dqdev_id QEMU X.Y.Z monitor - type 'help' for more information (qemu) info block -null: null-co:// (null-co) +null: json:{"read-zeroes": true, "driver": "null-co"} (null-co) Attached to: qdev_id Removable device: not locked, tray closed Cache mode: writeback (qemu) quit =20 -Testing: -blockdev driver=3Dnull-co,node-name=3Dnull -device scsi-cd,drive= =3Dnull +Testing: -blockdev driver=3Dnull-co,read-zeroes=3Don,node-name=3Dnull -dev= ice scsi-cd,drive=3Dnull QEMU X.Y.Z monitor - type 'help' for more information (qemu) info block -null: null-co:// (null-co) +null: json:{"read-zeroes": true, "driver": "null-co"} (null-co) Attached to: PATH Removable device: not locked, tray closed Cache mode: writeback (qemu) quit =20 -Testing: -blockdev driver=3Dnull-co,node-name=3Dnull -device scsi-cd,drive= =3Dnull,id=3Dqdev_id +Testing: -blockdev driver=3Dnull-co,read-zeroes=3Don,node-name=3Dnull -dev= ice scsi-cd,drive=3Dnull,id=3Dqdev_id QEMU X.Y.Z monitor - type 'help' for more information (qemu) info block -null: null-co:// (null-co) +null: json:{"read-zeroes": true, "driver": "null-co"} (null-co) Attached to: qdev_id Removable device: not locked, tray closed Cache mode: writeback @@ -159,76 +159,76 @@ null: null-co:// (null-co) =20 =3D=3D=3D -drive if=3Dnone/-device=3D =3D=3D=3D =20 -Testing: -drive if=3Dnone,driver=3Dnull-co,node-name=3Dnull -device ide-hd= ,drive=3Dnull,id=3Dqdev_id +Testing: -drive if=3Dnone,driver=3Dnull-co,read-zeroes=3Don,node-name=3Dnu= ll -device ide-hd,drive=3Dnull,id=3Dqdev_id QEMU X.Y.Z monitor - type 'help' for more information (qemu) info block -none0 (null): null-co:// (null-co) +none0 (null): json:{"read-zeroes": "on", "driver": "null-co"} (null-co) Removable device: not locked, tray closed Cache mode: writeback =20 -null: null-co:// (null-co) +null: json:{"read-zeroes": "on", "driver": "null-co"} (null-co) Attached to: qdev_id Cache mode: writeback (qemu) quit =20 -Testing: -drive if=3Dnone,driver=3Dnull-co,node-name=3Dnull -device scsi-h= d,drive=3Dnull,id=3Dqdev_id +Testing: -drive if=3Dnone,driver=3Dnull-co,read-zeroes=3Don,node-name=3Dnu= ll -device scsi-hd,drive=3Dnull,id=3Dqdev_id QEMU X.Y.Z monitor - type 'help' for more information (qemu) info block -none0 (null): null-co:// (null-co) +none0 (null): json:{"read-zeroes": "on", "driver": "null-co"} (null-co) Removable device: not locked, tray closed Cache mode: writeback =20 -null: null-co:// (null-co) +null: json:{"read-zeroes": "on", "driver": "null-co"} (null-co) Attached to: qdev_id Cache mode: writeback (qemu) quit =20 -Testing: -drive if=3Dnone,driver=3Dnull-co,node-name=3Dnull -device virtio= -blk-pci,drive=3Dnull,id=3Dqdev_id +Testing: -drive if=3Dnone,driver=3Dnull-co,read-zeroes=3Don,node-name=3Dnu= ll -device virtio-blk-pci,drive=3Dnull,id=3Dqdev_id QEMU X.Y.Z monitor - type 'help' for more information (qemu) info block -none0 (null): null-co:// (null-co) +none0 (null): json:{"read-zeroes": "on", "driver": "null-co"} (null-co) Removable device: not locked, tray closed Cache mode: writeback =20 -null: null-co:// (null-co) +null: json:{"read-zeroes": "on", "driver": "null-co"} (null-co) Attached to: PATH Cache mode: writeback (qemu) quit =20 -Testing: -drive if=3Dnone,driver=3Dnull-co,node-name=3Dnull -device floppy= ,drive=3Dnull,id=3Dqdev_id +Testing: -drive if=3Dnone,driver=3Dnull-co,read-zeroes=3Don,node-name=3Dnu= ll -device floppy,drive=3Dnull,id=3Dqdev_id QEMU X.Y.Z monitor - type 'help' for more information (qemu) info block -none0 (null): null-co:// (null-co) +none0 (null): json:{"read-zeroes": "on", "driver": "null-co"} (null-co) Removable device: not locked, tray closed Cache mode: writeback =20 -null: null-co:// (null-co) +null: json:{"read-zeroes": "on", "driver": "null-co"} (null-co) Attached to: qdev_id Removable device: not locked, tray closed Cache mode: writeback (qemu) quit =20 -Testing: -drive if=3Dnone,driver=3Dnull-co,node-name=3Dnull -device ide-cd= ,drive=3Dnull,id=3Dqdev_id +Testing: -drive if=3Dnone,driver=3Dnull-co,read-zeroes=3Don,node-name=3Dnu= ll -device ide-cd,drive=3Dnull,id=3Dqdev_id QEMU X.Y.Z monitor - type 'help' for more information (qemu) info block -none0 (null): null-co:// (null-co) +none0 (null): json:{"read-zeroes": "on", "driver": "null-co"} (null-co) Removable device: not locked, tray closed Cache mode: writeback =20 -null: null-co:// (null-co) +null: json:{"read-zeroes": "on", "driver": "null-co"} (null-co) Attached to: qdev_id Removable device: not locked, tray closed Cache mode: writeback (qemu) quit =20 -Testing: -drive if=3Dnone,driver=3Dnull-co,node-name=3Dnull -device scsi-c= d,drive=3Dnull,id=3Dqdev_id +Testing: -drive if=3Dnone,driver=3Dnull-co,read-zeroes=3Don,node-name=3Dnu= ll -device scsi-cd,drive=3Dnull,id=3Dqdev_id QEMU X.Y.Z monitor - type 'help' for more information (qemu) info block -none0 (null): null-co:// (null-co) +none0 (null): json:{"read-zeroes": "on", "driver": "null-co"} (null-co) Removable device: not locked, tray closed Cache mode: writeback =20 -null: null-co:// (null-co) +null: json:{"read-zeroes": "on", "driver": "null-co"} (null-co) Attached to: qdev_id Removable device: not locked, tray closed Cache mode: writeback @@ -237,103 +237,103 @@ null: null-co:// (null-co) =20 =3D=3D=3D -drive if=3Dnone/-device=3D (with medium) =3D=3D=3D =20 -Testing: -drive if=3Dnone,driver=3Dnull-co,node-name=3Dnull -device ide-hd= ,drive=3Dnone0 +Testing: -drive if=3Dnone,driver=3Dnull-co,read-zeroes=3Don,node-name=3Dnu= ll -device ide-hd,drive=3Dnone0 QEMU X.Y.Z monitor - type 'help' for more information (qemu) info block -none0 (null): null-co:// (null-co) +none0 (null): json:{"read-zeroes": "on", "driver": "null-co"} (null-co) Attached to: PATH Cache mode: writeback (qemu) quit =20 -Testing: -drive if=3Dnone,driver=3Dnull-co,node-name=3Dnull -device ide-hd= ,drive=3Dnone0,id=3Dqdev_id +Testing: -drive if=3Dnone,driver=3Dnull-co,read-zeroes=3Don,node-name=3Dnu= ll -device ide-hd,drive=3Dnone0,id=3Dqdev_id QEMU X.Y.Z monitor - type 'help' for more information (qemu) info block -none0 (null): null-co:// (null-co) +none0 (null): json:{"read-zeroes": "on", "driver": "null-co"} (null-co) Attached to: qdev_id Cache mode: writeback (qemu) quit =20 -Testing: -drive if=3Dnone,driver=3Dnull-co,node-name=3Dnull -device scsi-h= d,drive=3Dnone0 +Testing: -drive if=3Dnone,driver=3Dnull-co,read-zeroes=3Don,node-name=3Dnu= ll -device scsi-hd,drive=3Dnone0 QEMU X.Y.Z monitor - type 'help' for more information (qemu) info block -none0 (null): null-co:// (null-co) +none0 (null): json:{"read-zeroes": "on", "driver": "null-co"} (null-co) Attached to: PATH Cache mode: writeback (qemu) quit =20 -Testing: -drive if=3Dnone,driver=3Dnull-co,node-name=3Dnull -device scsi-h= d,drive=3Dnone0,id=3Dqdev_id +Testing: -drive if=3Dnone,driver=3Dnull-co,read-zeroes=3Don,node-name=3Dnu= ll -device scsi-hd,drive=3Dnone0,id=3Dqdev_id QEMU X.Y.Z monitor - type 'help' for more information (qemu) info block -none0 (null): null-co:// (null-co) +none0 (null): json:{"read-zeroes": "on", "driver": "null-co"} (null-co) Attached to: qdev_id Cache mode: writeback (qemu) quit =20 -Testing: -drive if=3Dnone,driver=3Dnull-co,node-name=3Dnull -device virtio= -blk-pci,drive=3Dnone0 +Testing: -drive if=3Dnone,driver=3Dnull-co,read-zeroes=3Don,node-name=3Dnu= ll -device virtio-blk-pci,drive=3Dnone0 QEMU X.Y.Z monitor - type 'help' for more information (qemu) info block -none0 (null): null-co:// (null-co) +none0 (null): json:{"read-zeroes": "on", "driver": "null-co"} (null-co) Attached to: PATH Cache mode: writeback (qemu) quit =20 -Testing: -drive if=3Dnone,driver=3Dnull-co,node-name=3Dnull -device virtio= -blk-pci,drive=3Dnone0,id=3Dqdev_id +Testing: -drive if=3Dnone,driver=3Dnull-co,read-zeroes=3Don,node-name=3Dnu= ll -device virtio-blk-pci,drive=3Dnone0,id=3Dqdev_id QEMU X.Y.Z monitor - type 'help' for more information (qemu) info block -none0 (null): null-co:// (null-co) +none0 (null): json:{"read-zeroes": "on", "driver": "null-co"} (null-co) Attached to: PATH Cache mode: writeback (qemu) quit =20 -Testing: -drive if=3Dnone,driver=3Dnull-co,node-name=3Dnull -device floppy= ,drive=3Dnone0 +Testing: -drive if=3Dnone,driver=3Dnull-co,read-zeroes=3Don,node-name=3Dnu= ll -device floppy,drive=3Dnone0 QEMU X.Y.Z monitor - type 'help' for more information (qemu) info block -none0 (null): null-co:// (null-co) +none0 (null): json:{"read-zeroes": "on", "driver": "null-co"} (null-co) Attached to: PATH Removable device: not locked, tray closed Cache mode: writeback (qemu) quit =20 -Testing: -drive if=3Dnone,driver=3Dnull-co,node-name=3Dnull -device floppy= ,drive=3Dnone0,id=3Dqdev_id +Testing: -drive if=3Dnone,driver=3Dnull-co,read-zeroes=3Don,node-name=3Dnu= ll -device floppy,drive=3Dnone0,id=3Dqdev_id QEMU X.Y.Z monitor - type 'help' for more information (qemu) info block -none0 (null): null-co:// (null-co) +none0 (null): json:{"read-zeroes": "on", "driver": "null-co"} (null-co) Attached to: qdev_id Removable device: not locked, tray closed Cache mode: writeback (qemu) quit =20 -Testing: -drive if=3Dnone,driver=3Dnull-co,node-name=3Dnull -device ide-cd= ,drive=3Dnone0 +Testing: -drive if=3Dnone,driver=3Dnull-co,read-zeroes=3Don,node-name=3Dnu= ll -device ide-cd,drive=3Dnone0 QEMU X.Y.Z monitor - type 'help' for more information (qemu) info block -none0 (null): null-co:// (null-co) +none0 (null): json:{"read-zeroes": "on", "driver": "null-co"} (null-co) Attached to: PATH Removable device: not locked, tray closed Cache mode: writeback (qemu) quit =20 -Testing: -drive if=3Dnone,driver=3Dnull-co,node-name=3Dnull -device ide-cd= ,drive=3Dnone0,id=3Dqdev_id +Testing: -drive if=3Dnone,driver=3Dnull-co,read-zeroes=3Don,node-name=3Dnu= ll -device ide-cd,drive=3Dnone0,id=3Dqdev_id QEMU X.Y.Z monitor - type 'help' for more information (qemu) info block -none0 (null): null-co:// (null-co) +none0 (null): json:{"read-zeroes": "on", "driver": "null-co"} (null-co) Attached to: qdev_id Removable device: not locked, tray closed Cache mode: writeback (qemu) quit =20 -Testing: -drive if=3Dnone,driver=3Dnull-co,node-name=3Dnull -device scsi-c= d,drive=3Dnone0 +Testing: -drive if=3Dnone,driver=3Dnull-co,read-zeroes=3Don,node-name=3Dnu= ll -device scsi-cd,drive=3Dnone0 QEMU X.Y.Z monitor - type 'help' for more information (qemu) info block -none0 (null): null-co:// (null-co) +none0 (null): json:{"read-zeroes": "on", "driver": "null-co"} (null-co) Attached to: PATH Removable device: not locked, tray closed Cache mode: writeback (qemu) quit =20 -Testing: -drive if=3Dnone,driver=3Dnull-co,node-name=3Dnull -device scsi-c= d,drive=3Dnone0,id=3Dqdev_id +Testing: -drive if=3Dnone,driver=3Dnull-co,read-zeroes=3Don,node-name=3Dnu= ll -device scsi-cd,drive=3Dnone0,id=3Dqdev_id QEMU X.Y.Z monitor - type 'help' for more information (qemu) info block -none0 (null): null-co:// (null-co) +none0 (null): json:{"read-zeroes": "on", "driver": "null-co"} (null-co) Attached to: qdev_id Removable device: not locked, tray closed Cache mode: writeback @@ -408,19 +408,19 @@ floppy0: [not inserted] Removable device: not locked, tray closed (qemu) quit =20 -Testing: -drive if=3Dfloppy,driver=3Dnull-co +Testing: -drive if=3Dfloppy,driver=3Dnull-co,read-zeroes=3Don QEMU X.Y.Z monitor - type 'help' for more information (qemu) info block -floppy0 (NODE_NAME): null-co:// (null-co) +floppy0 (NODE_NAME): json:{"read-zeroes": "on", "driver": "null-co"} (null= -co) Attached to: PATH Removable device: not locked, tray closed Cache mode: writeback (qemu) quit =20 -Testing: -drive if=3Dide,driver=3Dnull-co +Testing: -drive if=3Dide,driver=3Dnull-co,read-zeroes=3Don QEMU X.Y.Z monitor - type 'help' for more information (qemu) info block -ide0-hd0 (NODE_NAME): null-co:// (null-co) +ide0-hd0 (NODE_NAME): json:{"read-zeroes": "on", "driver": "null-co"} (nul= l-co) Attached to: PATH Cache mode: writeback (qemu) quit @@ -433,27 +433,27 @@ ide0-cd0: [not inserted] Removable device: not locked, tray closed (qemu) quit =20 -Testing: -drive if=3Dide,driver=3Dnull-co,media=3Dcdrom +Testing: -drive if=3Dide,driver=3Dnull-co,read-zeroes=3Don,media=3Dcdrom QEMU X.Y.Z monitor - type 'help' for more information (qemu) info block -ide0-cd0 (NODE_NAME): null-co:// (null-co, read-only) +ide0-cd0 (NODE_NAME): json:{"read-zeroes": "on", "driver": "null-co"} (nul= l-co, read-only) Attached to: PATH Removable device: not locked, tray closed Cache mode: writeback (qemu) quit =20 -Testing: -drive if=3Dvirtio,driver=3Dnull-co +Testing: -drive if=3Dvirtio,driver=3Dnull-co,read-zeroes=3Don QEMU X.Y.Z monitor - type 'help' for more information (qemu) info block -virtio0 (NODE_NAME): null-co:// (null-co) +virtio0 (NODE_NAME): json:{"read-zeroes": "on", "driver": "null-co"} (null= -co) Attached to: PATH Cache mode: writeback (qemu) quit =20 -Testing: -drive if=3Dpflash,driver=3Dnull-co,size=3D1M +Testing: -drive if=3Dpflash,driver=3Dnull-co,read-zeroes=3Don,size=3D1M QEMU X.Y.Z monitor - type 'help' for more information (qemu) info block -pflash0 (NODE_NAME): json:{"driver": "null-co", "size": "1M"} (null-co) +pflash0 (NODE_NAME): json:{"read-zeroes": "on", "driver": "null-co", "size= ": "1M"} (null-co) Attached to: PATH Cache mode: writeback (qemu) quit diff --git a/tests/qemu-iotests/227 b/tests/qemu-iotests/227 index bdd727a..637d7c3 100755 --- a/tests/qemu-iotests/227 +++ b/tests/qemu-iotests/227 @@ -57,7 +57,7 @@ echo echo '=3D=3D=3D blockstats with -drive if=3Dvirtio =3D=3D=3D' echo =20 -run_qemu -drive driver=3Dnull-co,if=3Dvirtio <