From nobody Wed May 14 10:22:16 2025 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 1524669788481386.615813893637; Wed, 25 Apr 2018 08:23:08 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 8C4C737EEA; Wed, 25 Apr 2018 15:23:06 +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 3F50F7A24A; Wed, 25 Apr 2018 15:23:06 +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 8EB744CAA8; Wed, 25 Apr 2018 15:23:05 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w3PFGG6l020441 for ; Wed, 25 Apr 2018 11:16:16 -0400 Received: by smtp.corp.redhat.com (Postfix) id 2AA712023239; Wed, 25 Apr 2018 15:16:16 +0000 (UTC) Received: from angien.brq.redhat.com (unknown [10.43.2.136]) by smtp.corp.redhat.com (Postfix) with ESMTP id 8735F2023430; Wed, 25 Apr 2018 15:16:15 +0000 (UTC) From: Peter Krempa To: libvir-list@redhat.com Date: Wed, 25 Apr 2018 17:15:34 +0200 Message-Id: <567c92f0052d22b25e7c1d4e22d2acecb0961f31.1524668969.git.pkrempa@redhat.com> In-Reply-To: References: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-loop: libvir-list@redhat.com Cc: Kevin Wolf , Peter Krempa Subject: [libvirt] [PATCH 26/35] tests: qemublock: Add tests for all other format without special options 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.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Wed, 25 Apr 2018 15:23:07 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Similarly to the 'raw' case add tests for bochs, cloop, dmg, ploop, vdi vhd, and vpc. Covering all supproted non-backing formats. Note that the JSON name for 'ploop' maps to 'parallels' and 'vhd' maps to 'vhdx'. Files added here would result in the followint configs: file-bochs-noopts.xml: -drive file=3D/path/to/i.img,format=3Dbochs,if=3Dnone,id=3Ddrive-dummy -device virtio-blk-pci,scsi=3Doff,drive=3Ddrive-dummy,id=3Ddummy file-cloop-noopts.xml: -drive file=3D/path/to/i.img,format=3Dcloop,if=3Dnone,id=3Ddrive-dummy -device virtio-blk-pci,scsi=3Doff,drive=3Ddrive-dummy,id=3Ddummy file-dmg-noopts.xml: -drive file=3D/path/to/i.img,format=3Ddmg,if=3Dnone,id=3Ddrive-dummy -device virtio-blk-pci,scsi=3Doff,drive=3Ddrive-dummy,id=3Ddummy file-ploop-noopts.xml: -drive file=3D/path/to/i.img,format=3Dploop,if=3Dnone,id=3Ddrive-dummy -device virtio-blk-pci,scsi=3Doff,drive=3Ddrive-dummy,id=3Ddummy file-vdi-noopts.xml: -drive file=3D/path/to/i.img,format=3Dvdi,if=3Dnone,id=3Ddrive-dummy -device virtio-blk-pci,scsi=3Doff,drive=3Ddrive-dummy,id=3Ddummy file-vhd-noopts.xml: -drive file=3D/path/to/i.img,format=3Dvhd,if=3Dnone,id=3Ddrive-dummy -device virtio-blk-pci,scsi=3Doff,drive=3Ddrive-dummy,id=3Ddummy file-vpc-noopts.xml: -drive file=3D/path/to/i.img,format=3Dvpc,if=3Dnone,id=3Ddrive-dummy -device virtio-blk-pci,scsi=3Doff,drive=3Ddrive-dummy,id=3Ddummy Signed-off-by: Peter Krempa Reviewed-by: John Ferlan --- tests/qemublocktest.c | 7 +++++++ tests/qemublocktestdata/xml2json/file-bochs-noopts.json | 12 ++++++++++++ tests/qemublocktestdata/xml2json/file-bochs-noopts.xml | 12 ++++++++++++ tests/qemublocktestdata/xml2json/file-cloop-noopts.json | 12 ++++++++++++ tests/qemublocktestdata/xml2json/file-cloop-noopts.xml | 12 ++++++++++++ tests/qemublocktestdata/xml2json/file-dmg-noopts.json | 12 ++++++++++++ tests/qemublocktestdata/xml2json/file-dmg-noopts.xml | 12 ++++++++++++ tests/qemublocktestdata/xml2json/file-ploop-noopts.json | 12 ++++++++++++ tests/qemublocktestdata/xml2json/file-ploop-noopts.xml | 12 ++++++++++++ tests/qemublocktestdata/xml2json/file-vdi-noopts.json | 12 ++++++++++++ tests/qemublocktestdata/xml2json/file-vdi-noopts.xml | 12 ++++++++++++ tests/qemublocktestdata/xml2json/file-vhd-noopts.json | 12 ++++++++++++ tests/qemublocktestdata/xml2json/file-vhd-noopts.xml | 12 ++++++++++++ tests/qemublocktestdata/xml2json/file-vpc-noopts.json | 12 ++++++++++++ tests/qemublocktestdata/xml2json/file-vpc-noopts.xml | 12 ++++++++++++ 15 files changed, 175 insertions(+) create mode 100644 tests/qemublocktestdata/xml2json/file-bochs-noopts.json create mode 100644 tests/qemublocktestdata/xml2json/file-bochs-noopts.xml create mode 100644 tests/qemublocktestdata/xml2json/file-cloop-noopts.json create mode 100644 tests/qemublocktestdata/xml2json/file-cloop-noopts.xml create mode 100644 tests/qemublocktestdata/xml2json/file-dmg-noopts.json create mode 100644 tests/qemublocktestdata/xml2json/file-dmg-noopts.xml create mode 100644 tests/qemublocktestdata/xml2json/file-ploop-noopts.json create mode 100644 tests/qemublocktestdata/xml2json/file-ploop-noopts.xml create mode 100644 tests/qemublocktestdata/xml2json/file-vdi-noopts.json create mode 100644 tests/qemublocktestdata/xml2json/file-vdi-noopts.xml create mode 100644 tests/qemublocktestdata/xml2json/file-vhd-noopts.json create mode 100644 tests/qemublocktestdata/xml2json/file-vhd-noopts.xml create mode 100644 tests/qemublocktestdata/xml2json/file-vpc-noopts.json create mode 100644 tests/qemublocktestdata/xml2json/file-vpc-noopts.xml diff --git a/tests/qemublocktest.c b/tests/qemublocktest.c index c9a2f91992..feb25c69e3 100644 --- a/tests/qemublocktest.c +++ b/tests/qemublocktest.c @@ -405,6 +405,13 @@ mymain(void) TEST_DISK_TO_JSON_FULL("nodename-long-protocol", true); TEST_DISK_TO_JSON("file-raw-noopts"); + TEST_DISK_TO_JSON("file-bochs-noopts"); + TEST_DISK_TO_JSON("file-cloop-noopts"); + TEST_DISK_TO_JSON("file-dmg-noopts"); + TEST_DISK_TO_JSON("file-ploop-noopts"); + TEST_DISK_TO_JSON("file-vdi-noopts"); + TEST_DISK_TO_JSON("file-vhd-noopts"); + TEST_DISK_TO_JSON("file-vpc-noopts"); cleanup: virHashFree(diskxmljsondata.schema); diff --git a/tests/qemublocktestdata/xml2json/file-bochs-noopts.json b/test= s/qemublocktestdata/xml2json/file-bochs-noopts.json new file mode 100644 index 0000000000..22e2560998 --- /dev/null +++ b/tests/qemublocktestdata/xml2json/file-bochs-noopts.json @@ -0,0 +1,12 @@ +{ + "node-name": "test1", + "read-only": false, + "driver": "bochs", + "file": { + "driver": "file", + "filename": "/path/to/i.img", + "node-name": "test2", + "read-only": false, + "discard": "unmap" + } +} diff --git a/tests/qemublocktestdata/xml2json/file-bochs-noopts.xml b/tests= /qemublocktestdata/xml2json/file-bochs-noopts.xml new file mode 100644 index 0000000000..23da6c4feb --- /dev/null +++ b/tests/qemublocktestdata/xml2json/file-bochs-noopts.xml @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/tests/qemublocktestdata/xml2json/file-cloop-noopts.json b/test= s/qemublocktestdata/xml2json/file-cloop-noopts.json new file mode 100644 index 0000000000..b72bb5df56 --- /dev/null +++ b/tests/qemublocktestdata/xml2json/file-cloop-noopts.json @@ -0,0 +1,12 @@ +{ + "node-name": "test1", + "read-only": false, + "driver": "cloop", + "file": { + "driver": "file", + "filename": "/path/to/i.img", + "node-name": "test2", + "read-only": false, + "discard": "unmap" + } +} diff --git a/tests/qemublocktestdata/xml2json/file-cloop-noopts.xml b/tests= /qemublocktestdata/xml2json/file-cloop-noopts.xml new file mode 100644 index 0000000000..4dff296983 --- /dev/null +++ b/tests/qemublocktestdata/xml2json/file-cloop-noopts.xml @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/tests/qemublocktestdata/xml2json/file-dmg-noopts.json b/tests/= qemublocktestdata/xml2json/file-dmg-noopts.json new file mode 100644 index 0000000000..9f2912b8d3 --- /dev/null +++ b/tests/qemublocktestdata/xml2json/file-dmg-noopts.json @@ -0,0 +1,12 @@ +{ + "node-name": "test1", + "read-only": false, + "driver": "dmg", + "file": { + "driver": "file", + "filename": "/path/to/i.img", + "node-name": "test2", + "read-only": false, + "discard": "unmap" + } +} diff --git a/tests/qemublocktestdata/xml2json/file-dmg-noopts.xml b/tests/q= emublocktestdata/xml2json/file-dmg-noopts.xml new file mode 100644 index 0000000000..3650a1758f --- /dev/null +++ b/tests/qemublocktestdata/xml2json/file-dmg-noopts.xml @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/tests/qemublocktestdata/xml2json/file-ploop-noopts.json b/test= s/qemublocktestdata/xml2json/file-ploop-noopts.json new file mode 100644 index 0000000000..64006d28a3 --- /dev/null +++ b/tests/qemublocktestdata/xml2json/file-ploop-noopts.json @@ -0,0 +1,12 @@ +{ + "node-name": "test1", + "read-only": false, + "driver": "parallels", + "file": { + "driver": "file", + "filename": "/path/to/i.img", + "node-name": "test2", + "read-only": false, + "discard": "unmap" + } +} diff --git a/tests/qemublocktestdata/xml2json/file-ploop-noopts.xml b/tests= /qemublocktestdata/xml2json/file-ploop-noopts.xml new file mode 100644 index 0000000000..5435c4d8d7 --- /dev/null +++ b/tests/qemublocktestdata/xml2json/file-ploop-noopts.xml @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/tests/qemublocktestdata/xml2json/file-vdi-noopts.json b/tests/= qemublocktestdata/xml2json/file-vdi-noopts.json new file mode 100644 index 0000000000..ce8e359c91 --- /dev/null +++ b/tests/qemublocktestdata/xml2json/file-vdi-noopts.json @@ -0,0 +1,12 @@ +{ + "node-name": "test1", + "read-only": false, + "driver": "vdi", + "file": { + "driver": "file", + "filename": "/path/to/i.img", + "node-name": "test2", + "read-only": false, + "discard": "unmap" + } +} diff --git a/tests/qemublocktestdata/xml2json/file-vdi-noopts.xml b/tests/q= emublocktestdata/xml2json/file-vdi-noopts.xml new file mode 100644 index 0000000000..3fa489e24b --- /dev/null +++ b/tests/qemublocktestdata/xml2json/file-vdi-noopts.xml @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/tests/qemublocktestdata/xml2json/file-vhd-noopts.json b/tests/= qemublocktestdata/xml2json/file-vhd-noopts.json new file mode 100644 index 0000000000..d4b8e1f55a --- /dev/null +++ b/tests/qemublocktestdata/xml2json/file-vhd-noopts.json @@ -0,0 +1,12 @@ +{ + "node-name": "test1", + "read-only": false, + "driver": "vhdx", + "file": { + "driver": "file", + "filename": "/path/to/i.img", + "node-name": "test2", + "read-only": false, + "discard": "unmap" + } +} diff --git a/tests/qemublocktestdata/xml2json/file-vhd-noopts.xml b/tests/q= emublocktestdata/xml2json/file-vhd-noopts.xml new file mode 100644 index 0000000000..25fd1ba7b0 --- /dev/null +++ b/tests/qemublocktestdata/xml2json/file-vhd-noopts.xml @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/tests/qemublocktestdata/xml2json/file-vpc-noopts.json b/tests/= qemublocktestdata/xml2json/file-vpc-noopts.json new file mode 100644 index 0000000000..be1ec795a7 --- /dev/null +++ b/tests/qemublocktestdata/xml2json/file-vpc-noopts.json @@ -0,0 +1,12 @@ +{ + "node-name": "test1", + "read-only": false, + "driver": "vpc", + "file": { + "driver": "file", + "filename": "/path/to/i.img", + "node-name": "test2", + "read-only": false, + "discard": "unmap" + } +} diff --git a/tests/qemublocktestdata/xml2json/file-vpc-noopts.xml b/tests/q= emublocktestdata/xml2json/file-vpc-noopts.xml new file mode 100644 index 0000000000..d761bb33cc --- /dev/null +++ b/tests/qemublocktestdata/xml2json/file-vpc-noopts.xml @@ -0,0 +1,12 @@ + + + + + + + + + + + + --=20 2.16.2 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list