From nobody Wed May 14 14:08:57 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 1524151670336363.2955812853571; Thu, 19 Apr 2018 08:27:50 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id E746C3004431; Thu, 19 Apr 2018 15:27:48 +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 656BF827A9; Thu, 19 Apr 2018 15:27:33 +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 8D53E5BBE8; Thu, 19 Apr 2018 15:27:33 +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 w3JFQ5Pm022088 for ; Thu, 19 Apr 2018 11:26:05 -0400 Received: by smtp.corp.redhat.com (Postfix) id 220D284422; Thu, 19 Apr 2018 15:26:05 +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 3E74B84424; Thu, 19 Apr 2018 15:26:04 +0000 (UTC) From: Peter Krempa To: libvir-list@redhat.com Date: Thu, 19 Apr 2018 17:25:20 +0200 Message-Id: <426693388ba864d36df06e7f76f9771aaaa8eb9f.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 23/30] tests: qemublock: Add tests for basic backing chain formats 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.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.49]); Thu, 19 Apr 2018 15:27:49 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Formats supporting backing chain such as qed, vmdk, don't have any other parameters than the backing store and 'qcow' has only encryption params which will be tested extra. Add this test case so they are covered since any further test cases will mainly care about 'qcow2' and 'raw'. The top level disk image would generate the following '-drive' cmdline: -drive file=3D/var/lib/libvirt/images/a,format=3Dqed,if=3Dnone,id=3Ddrive-d= ummy -device virtio-blk-pci,scsi=3Doff,drive=3Ddrive-dummy,id=3Ddummy Signed-off-by: Peter Krempa --- tests/qemublocktest.c | 2 + .../xml2json/file-backing_basic-noopts.json | 51 ++++++++++++++++++= ++++ .../xml2json/file-backing_basic-noopts.xml | 34 +++++++++++++++ 3 files changed, 87 insertions(+) create mode 100644 tests/qemublocktestdata/xml2json/file-backing_basic-noo= pts.json create mode 100644 tests/qemublocktestdata/xml2json/file-backing_basic-noo= pts.xml diff --git a/tests/qemublocktest.c b/tests/qemublocktest.c index feb25c69e3..881d7c17ee 100644 --- a/tests/qemublocktest.c +++ b/tests/qemublocktest.c @@ -413,6 +413,8 @@ mymain(void) TEST_DISK_TO_JSON("file-vhd-noopts"); TEST_DISK_TO_JSON("file-vpc-noopts"); + TEST_DISK_TO_JSON("file-backing_basic-noopts"); + cleanup: virHashFree(diskxmljsondata.schema); qemuTestDriverFree(&driver); diff --git a/tests/qemublocktestdata/xml2json/file-backing_basic-noopts.jso= n b/tests/qemublocktestdata/xml2json/file-backing_basic-noopts.json new file mode 100644 index 0000000000..3285a6ec67 --- /dev/null +++ b/tests/qemublocktestdata/xml2json/file-backing_basic-noopts.json @@ -0,0 +1,51 @@ +{ + "node-name": "node-a-f", + "read-only": false, + "driver": "qed", + "file": { + "driver": "file", + "filename": "/var/lib/libvirt/images/a", + "node-name": "node-a-s", + "read-only": false, + "discard": "unmap" + }, + "backing": "node-b-f" +} +{ + "node-name": "node-b-f", + "read-only": true, + "driver": "qcow", + "file": { + "driver": "file", + "filename": "/var/lib/libvirt/images/b", + "node-name": "node-b-s", + "read-only": true, + "discard": "unmap" + }, + "backing": "node-c-f" +} +{ + "node-name": "node-c-f", + "read-only": true, + "driver": "vmdk", + "file": { + "driver": "file", + "filename": "/var/lib/libvirt/images/c", + "node-name": "node-c-s", + "read-only": true, + "discard": "unmap" + }, + "backing": "node-d-f" +} +{ + "node-name": "node-d-f", + "read-only": true, + "driver": "raw", + "file": { + "driver": "file", + "filename": "/var/lib/libvirt/images/d", + "node-name": "node-d-s", + "read-only": true, + "discard": "unmap" + } +} diff --git a/tests/qemublocktestdata/xml2json/file-backing_basic-noopts.xml= b/tests/qemublocktestdata/xml2json/file-backing_basic-noopts.xml new file mode 100644 index 0000000000..daa9423dcc --- /dev/null +++ b/tests/qemublocktestdata/xml2json/file-backing_basic-noopts.xml @@ -0,0 +1,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + --=20 2.14.3 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list