From nobody Wed May 14 14:10:42 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 1524151611053120.08768770631843; Thu, 19 Apr 2018 08:26:51 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 6388E80474; Thu, 19 Apr 2018 15:26: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 14C5E6C359; Thu, 19 Apr 2018 15:26:44 +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 5AA96180BAF4; Thu, 19 Apr 2018 15:26:44 +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 w3JFQ4ho022077 for ; Thu, 19 Apr 2018 11:26:04 -0400 Received: by smtp.corp.redhat.com (Postfix) id E63DF84422; Thu, 19 Apr 2018 15:26:03 +0000 (UTC) Received: from andariel.redhat.com (ovpn-204-221.brq.redhat.com [10.40.204.221]) by smtp.corp.redhat.com (Postfix) with ESMTP id 16C1784420; Thu, 19 Apr 2018 15:26:02 +0000 (UTC) From: Peter Krempa To: libvir-list@redhat.com Date: Thu, 19 Apr 2018 17:25:19 +0200 Message-Id: <1289d389a6a3e646ec67929383c67d71797e73f8.1524151023.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: kwolf@redhat.com, Peter Krempa Subject: [libvirt] [RFC PATCH 22/30] 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.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Thu, 19 Apr 2018 15:26:50 +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 --- tests/qemublocktest.c | 7 +++++++ tests/qemublocktestdata/xml2json/file-bochs-noopts.json | 12 ++++++++++++ tests/qemublocktestdata/xml2json/file-bochs-noopts.xml | 9 +++++++++ tests/qemublocktestdata/xml2json/file-cloop-noopts.json | 12 ++++++++++++ tests/qemublocktestdata/xml2json/file-cloop-noopts.xml | 9 +++++++++ tests/qemublocktestdata/xml2json/file-dmg-noopts.json | 12 ++++++++++++ tests/qemublocktestdata/xml2json/file-dmg-noopts.xml | 9 +++++++++ tests/qemublocktestdata/xml2json/file-ploop-noopts.json | 12 ++++++++++++ tests/qemublocktestdata/xml2json/file-ploop-noopts.xml | 9 +++++++++ tests/qemublocktestdata/xml2json/file-vdi-noopts.json | 12 ++++++++++++ tests/qemublocktestdata/xml2json/file-vdi-noopts.xml | 9 +++++++++ tests/qemublocktestdata/xml2json/file-vhd-noopts.json | 12 ++++++++++++ tests/qemublocktestdata/xml2json/file-vhd-noopts.xml | 9 +++++++++ tests/qemublocktestdata/xml2json/file-vpc-noopts.json | 12 ++++++++++++ tests/qemublocktestdata/xml2json/file-vpc-noopts.xml | 9 +++++++++ 15 files changed, 154 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..ebe9da438c --- /dev/null +++ b/tests/qemublocktestdata/xml2json/file-bochs-noopts.xml @@ -0,0 +1,9 @@ + + + + + + + + + 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..d48219145d --- /dev/null +++ b/tests/qemublocktestdata/xml2json/file-cloop-noopts.xml @@ -0,0 +1,9 @@ + + + + + + + + + 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..27f4fa8cd6 --- /dev/null +++ b/tests/qemublocktestdata/xml2json/file-dmg-noopts.xml @@ -0,0 +1,9 @@ + + + + + + + + + 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..5f47f6b73b --- /dev/null +++ b/tests/qemublocktestdata/xml2json/file-ploop-noopts.xml @@ -0,0 +1,9 @@ + + + + + + + + + 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..5d2e76656b --- /dev/null +++ b/tests/qemublocktestdata/xml2json/file-vdi-noopts.xml @@ -0,0 +1,9 @@ + + + + + + + + + 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..c6a9686a95 --- /dev/null +++ b/tests/qemublocktestdata/xml2json/file-vhd-noopts.xml @@ -0,0 +1,9 @@ + + + + + + + + + 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..5f79c4a826 --- /dev/null +++ b/tests/qemublocktestdata/xml2json/file-vpc-noopts.xml @@ -0,0 +1,9 @@ + + + + + + + + + --=20 2.14.3 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list