From nobody Mon Feb 9 17:24:15 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 ARC-Seal: i=1; a=rsa-sha256; t=1562250571; cv=none; d=zoho.com; s=zohoarc; b=Xc/259P8U882OQcuelYt2vdu6xGWlQ4slOzu5hFvQ2QgAmCu9F2R6h4V8d+Zc9lNEqVnY0EzKMihyI0/Miyn81nJE0GkkZj92/+V08jZ/Wa22aK5ZUwjBoatJJ6OjEcmLbwtbsrFAoaQXx/ErKExmIVLNvPv3YGHsM26jox71MA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1562250571; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=ZNZltaPgfkDQAjadFdvN9G2h96eBRDp5J1u3Bmz+evI=; b=cd88vGMUn2tZaQ0oxn+EyYcwDmz2Xgblb/36aSD6FFInWmwxuuKLre1fC2RplIPLzAVokDgWULVVwumWBSCyjLyJs+9kKYacW3auA1CgOpZYd5gd2Vmi+mDgYix/LHSmZsnl4EHz1ClydkV/caeU1C6sER6onbapJCMxxcCWx2U= ARC-Authentication-Results: i=1; mx.zoho.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 header.from= (p=none dis=none) header.from= Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1562250571942985.1887439709353; Thu, 4 Jul 2019 07:29:31 -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 EA88488304; Thu, 4 Jul 2019 14:29:29 +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 C72B21001B3E; Thu, 4 Jul 2019 14:29:29 +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 790991833002; Thu, 4 Jul 2019 14:29:28 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x64EQfBa029676 for ; Thu, 4 Jul 2019 10:26:41 -0400 Received: by smtp.corp.redhat.com (Postfix) id 223075B2FE; Thu, 4 Jul 2019 14:26:41 +0000 (UTC) Received: from angien.brq.redhat.com (unknown [10.43.2.229]) by smtp.corp.redhat.com (Postfix) with ESMTP id 55FBD5B77E; Thu, 4 Jul 2019 14:26:40 +0000 (UTC) From: Peter Krempa To: libvir-list@redhat.com Date: Thu, 4 Jul 2019 16:26:26 +0200 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-loop: libvir-list@redhat.com Cc: Kevin Wolf Subject: [libvirt] [PATCH 02/11] tests: qemublock: Add testing of pure disk source specification JSON generator 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: , 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]); Thu, 04 Jul 2019 14:29:30 +0000 (UTC) Content-Type: text/plain; charset="utf-8" Add testing of the host specification part so that we can be sure that no image/host specific data will be present. Signed-off-by: Peter Krempa Reviewed-by: J=C3=A1n Tomko --- tests/qemublocktest.c | 69 ++++++++++++++++++- .../xml2json/block-raw-noopts-srconly.json | 4 ++ .../block-raw-reservations-srconly.json | 4 ++ .../xml2json/dir-fat-cache-srconly.json | 5 ++ .../xml2json/dir-fat-floppy-srconly.json | 5 ++ .../xml2json/dir-fat-readonly-srconly.json | 5 ++ ...ile-backing_basic-aio_threads-srconly.json | 24 +++++++ ...acking_basic-cache-directsync-srconly.json | 24 +++++++ ...file-backing_basic-cache-none-srconly.json | 24 +++++++ ...le-backing_basic-cache-unsafe-srconly.json | 24 +++++++ ...backing_basic-cache-writeback-srconly.json | 24 +++++++ ...king_basic-cache-writethrough-srconly.json | 24 +++++++ .../file-backing_basic-detect-srconly.json | 24 +++++++ .../file-backing_basic-noopts-srconly.json | 16 +++++ ...le-backing_basic-unmap-detect-srconly.json | 24 +++++++ ...le-backing_basic-unmap-ignore-srconly.json | 24 +++++++ .../file-backing_basic-unmap-srconly.json | 24 +++++++ .../xml2json/file-bochs-noopts-srconly.json | 4 ++ .../xml2json/file-cloop-noopts-srconly.json | 4 ++ .../xml2json/file-dmg-noopts-srconly.json | 4 ++ .../xml2json/file-ploop-noopts-srconly.json | 4 ++ ...cow2-backing-chain-encryption-srconly.json | 8 +++ ...le-qcow2-backing-chain-noopts-srconly.json | 40 +++++++++++ ...w2-backing-chain-unterminated-srconly.json | 8 +++ .../xml2json/file-raw-aio_native-srconly.json | 4 ++ .../xml2json/file-raw-luks-srconly.json | 4 ++ .../xml2json/file-raw-noopts-srconly.json | 4 ++ .../xml2json/file-vdi-noopts-srconly.json | 4 ++ .../xml2json/file-vhd-noopts-srconly.json | 4 ++ .../xml2json/file-vpc-noopts-srconly.json | 4 ++ .../xml2json/network-nbd-tls-srconly.json | 8 +++ ...w2-backing-chain-cache-unsafe-srconly.json | 22 ++++++ ...backing-chain-encryption_auth-srconly.json | 22 ++++++ 33 files changed, 495 insertions(+), 1 deletion(-) create mode 100644 tests/qemublocktestdata/xml2json/block-raw-noopts-srcon= ly.json create mode 100644 tests/qemublocktestdata/xml2json/block-raw-reservations= -srconly.json create mode 100644 tests/qemublocktestdata/xml2json/dir-fat-cache-srconly.= json create mode 100644 tests/qemublocktestdata/xml2json/dir-fat-floppy-srconly= .json create mode 100644 tests/qemublocktestdata/xml2json/dir-fat-readonly-srcon= ly.json create mode 100644 tests/qemublocktestdata/xml2json/file-backing_basic-aio= _threads-srconly.json create mode 100644 tests/qemublocktestdata/xml2json/file-backing_basic-cac= he-directsync-srconly.json create mode 100644 tests/qemublocktestdata/xml2json/file-backing_basic-cac= he-none-srconly.json create mode 100644 tests/qemublocktestdata/xml2json/file-backing_basic-cac= he-unsafe-srconly.json create mode 100644 tests/qemublocktestdata/xml2json/file-backing_basic-cac= he-writeback-srconly.json create mode 100644 tests/qemublocktestdata/xml2json/file-backing_basic-cac= he-writethrough-srconly.json create mode 100644 tests/qemublocktestdata/xml2json/file-backing_basic-det= ect-srconly.json create mode 100644 tests/qemublocktestdata/xml2json/file-backing_basic-noo= pts-srconly.json create mode 100644 tests/qemublocktestdata/xml2json/file-backing_basic-unm= ap-detect-srconly.json create mode 100644 tests/qemublocktestdata/xml2json/file-backing_basic-unm= ap-ignore-srconly.json create mode 100644 tests/qemublocktestdata/xml2json/file-backing_basic-unm= ap-srconly.json create mode 100644 tests/qemublocktestdata/xml2json/file-bochs-noopts-srco= nly.json create mode 100644 tests/qemublocktestdata/xml2json/file-cloop-noopts-srco= nly.json create mode 100644 tests/qemublocktestdata/xml2json/file-dmg-noopts-srconl= y.json create mode 100644 tests/qemublocktestdata/xml2json/file-ploop-noopts-srco= nly.json create mode 100644 tests/qemublocktestdata/xml2json/file-qcow2-backing-cha= in-encryption-srconly.json create mode 100644 tests/qemublocktestdata/xml2json/file-qcow2-backing-cha= in-noopts-srconly.json create mode 100644 tests/qemublocktestdata/xml2json/file-qcow2-backing-cha= in-unterminated-srconly.json create mode 100644 tests/qemublocktestdata/xml2json/file-raw-aio_native-sr= conly.json create mode 100644 tests/qemublocktestdata/xml2json/file-raw-luks-srconly.= json create mode 100644 tests/qemublocktestdata/xml2json/file-raw-noopts-srconl= y.json create mode 100644 tests/qemublocktestdata/xml2json/file-vdi-noopts-srconl= y.json create mode 100644 tests/qemublocktestdata/xml2json/file-vhd-noopts-srconl= y.json create mode 100644 tests/qemublocktestdata/xml2json/file-vpc-noopts-srconl= y.json create mode 100644 tests/qemublocktestdata/xml2json/network-nbd-tls-srconl= y.json create mode 100644 tests/qemublocktestdata/xml2json/network-qcow2-backing-= chain-cache-unsafe-srconly.json create mode 100644 tests/qemublocktestdata/xml2json/network-qcow2-backing-= chain-encryption_auth-srconly.json diff --git a/tests/qemublocktest.c b/tests/qemublocktest.c index 29ce27021f..161615f7f0 100644 --- a/tests/qemublocktest.c +++ b/tests/qemublocktest.c @@ -115,6 +115,9 @@ struct testQemuDiskXMLToJSONData { virJSONValuePtr *props; size_t nprops; + virJSONValuePtr *propssrc; + size_t npropssrc; + virQEMUCapsPtr qemuCaps; }; @@ -127,8 +130,13 @@ testQemuDiskXMLToPropsClear(struct testQemuDiskXMLToJS= ONData *data) for (i =3D 0; i < data->nprops; i++) virJSONValueFree(data->props[i]); + for (i =3D 0; i < data->npropssrc; i++) + virJSONValueFree(data->propssrc[i]); + data->nprops =3D 0; VIR_FREE(data->props); + data->npropssrc =3D 0; + VIR_FREE(data->propssrc); } @@ -180,6 +188,7 @@ testQemuDiskXMLToProps(const void *opaque) virStorageSourcePtr n; virJSONValuePtr formatProps =3D NULL; virJSONValuePtr storageProps =3D NULL; + VIR_AUTOPTR(virJSONValue) storageSrcOnlyProps =3D NULL; char *xmlpath =3D NULL; char *xmlstr =3D NULL; int ret =3D -1; @@ -213,6 +222,7 @@ testQemuDiskXMLToProps(const void *opaque) goto cleanup; if (!(formatProps =3D qemuBlockStorageSourceGetBlockdevProps(n)) || + !(storageSrcOnlyProps =3D qemuBlockStorageSourceGetBackendProp= s(n, false, true)) || !(storageProps =3D qemuBlockStorageSourceGetBackendProps(n, fa= lse, false))) { if (!data->fail) { VIR_TEST_VERBOSE("failed to generate qemu blockdev props\n= "); @@ -224,7 +234,8 @@ testQemuDiskXMLToProps(const void *opaque) } if (VIR_APPEND_ELEMENT(data->props, data->nprops, formatProps) < 0= || - VIR_APPEND_ELEMENT(data->props, data->nprops, storageProps) < = 0) + VIR_APPEND_ELEMENT(data->props, data->nprops, storageProps) < = 0 || + VIR_APPEND_ELEMENT(data->propssrc, data->npropssrc, storageSrc= OnlyProps) < 0) goto cleanup; } @@ -268,6 +279,23 @@ testQemuDiskXMLToPropsValidateSchema(const void *opaqu= e) virBufferFreeAndReset(&debug); } + + for (i =3D 0; i < data->npropssrc; i++) { + if (testQEMUSchemaValidate(data->propssrc[i], data->schemaroot, + data->schema, &debug) < 0) { + debugmsg =3D virBufferContentAndReset(&debug); + propsstr =3D virJSONValueToString(data->propssrc[i], true); + VIR_TEST_VERBOSE("json does not conform to QAPI schema"); + VIR_TEST_DEBUG("json:\n%s\ndoes not match schema. Debug output= :\n %s", + propsstr, NULLSTR(debugmsg)); + VIR_FREE(debugmsg); + VIR_FREE(propsstr); + ret =3D -1; + } + + virBufferFreeAndReset(&debug); + } + return ret; } @@ -313,6 +341,40 @@ testQemuDiskXMLToPropsValidateFile(const void *opaque) } +static int +testQemuDiskXMLToPropsValidateFileSrcOnly(const void *opaque) +{ + struct testQemuDiskXMLToJSONData *data =3D (void *) opaque; + virBuffer buf =3D VIR_BUFFER_INITIALIZER; + VIR_AUTOFREE(char *) jsonpath =3D NULL; + VIR_AUTOFREE(char *) actual =3D NULL; + size_t i; + + if (data->fail) + return EXIT_AM_SKIP; + + if (virAsprintf(&jsonpath, "%s%s-srconly.json", + testQemuDiskXMLToJSONPath, data->name) < 0) + return -1; + + for (i =3D 0; i < data->npropssrc; i++) { + VIR_AUTOFREE(char *) jsonstr =3D NULL; + + if (!(jsonstr =3D virJSONValueToString(data->propssrc[i], true))) + return -1; + + virBufferAdd(&buf, jsonstr, -1); + } + + if (virBufferCheckError(&buf) < 0) + return -1; + + actual =3D virBufferContentAndReset(&buf); + + return virTestCompareToFile(actual, jsonpath); +} + + static int mymain(void) { @@ -411,6 +473,8 @@ mymain(void) diskxmljsondata.name =3D nme; \ diskxmljsondata.props =3D NULL; \ diskxmljsondata.nprops =3D 0; \ + diskxmljsondata.propssrc =3D NULL; \ + diskxmljsondata.npropssrc =3D 0; \ diskxmljsondata.fail =3D fl; \ if (virTestRun("disk xml to props " nme, testQemuDiskXMLToProps, \ &diskxmljsondata) < 0) \ @@ -421,6 +485,9 @@ mymain(void) if (virTestRun("disk xml to props validate file " nme, \ testQemuDiskXMLToPropsValidateFile, &diskxmljsonda= ta) < 0) \ ret =3D -1; \ + if (virTestRun("disk xml to props source only validate file " nme,= \ + testQemuDiskXMLToPropsValidateFileSrcOnly, &diskxm= ljsondata) < 0) \ + ret =3D -1; \ testQemuDiskXMLToPropsClear(&diskxmljsondata); \ } while (0) diff --git a/tests/qemublocktestdata/xml2json/block-raw-noopts-srconly.json= b/tests/qemublocktestdata/xml2json/block-raw-noopts-srconly.json new file mode 100644 index 0000000000..72f9067353 --- /dev/null +++ b/tests/qemublocktestdata/xml2json/block-raw-noopts-srconly.json @@ -0,0 +1,4 @@ +{ + "driver": "host_device", + "filename": "/dev/blah" +} diff --git a/tests/qemublocktestdata/xml2json/block-raw-reservations-srconl= y.json b/tests/qemublocktestdata/xml2json/block-raw-reservations-srconly.js= on new file mode 100644 index 0000000000..72f9067353 --- /dev/null +++ b/tests/qemublocktestdata/xml2json/block-raw-reservations-srconly.json @@ -0,0 +1,4 @@ +{ + "driver": "host_device", + "filename": "/dev/blah" +} diff --git a/tests/qemublocktestdata/xml2json/dir-fat-cache-srconly.json b/= tests/qemublocktestdata/xml2json/dir-fat-cache-srconly.json new file mode 100644 index 0000000000..6ec4f78d7b --- /dev/null +++ b/tests/qemublocktestdata/xml2json/dir-fat-cache-srconly.json @@ -0,0 +1,5 @@ +{ + "driver": "vvfat", + "dir": "/var/somefiles", + "floppy": false +} diff --git a/tests/qemublocktestdata/xml2json/dir-fat-floppy-srconly.json b= /tests/qemublocktestdata/xml2json/dir-fat-floppy-srconly.json new file mode 100644 index 0000000000..6b0388bc18 --- /dev/null +++ b/tests/qemublocktestdata/xml2json/dir-fat-floppy-srconly.json @@ -0,0 +1,5 @@ +{ + "driver": "vvfat", + "dir": "/var/somefiles", + "floppy": true +} diff --git a/tests/qemublocktestdata/xml2json/dir-fat-readonly-srconly.json= b/tests/qemublocktestdata/xml2json/dir-fat-readonly-srconly.json new file mode 100644 index 0000000000..6ec4f78d7b --- /dev/null +++ b/tests/qemublocktestdata/xml2json/dir-fat-readonly-srconly.json @@ -0,0 +1,5 @@ +{ + "driver": "vvfat", + "dir": "/var/somefiles", + "floppy": false +} diff --git a/tests/qemublocktestdata/xml2json/file-backing_basic-aio_thread= s-srconly.json b/tests/qemublocktestdata/xml2json/file-backing_basic-aio_th= reads-srconly.json new file mode 100644 index 0000000000..ea490b0034 --- /dev/null +++ b/tests/qemublocktestdata/xml2json/file-backing_basic-aio_threads-srcon= ly.json @@ -0,0 +1,24 @@ +{ + "driver": "file", + "filename": "/var/lib/libvirt/images/a" +} +{ + "driver": "file", + "filename": "/var/lib/libvirt/images/b" +} +{ + "driver": "gluster", + "volume": "images", + "path": "c", + "server": [ + { + "type": "inet", + "host": "test.org", + "port": "24007" + } + ] +} +{ + "driver": "file", + "filename": "/var/lib/libvirt/images/d" +} diff --git a/tests/qemublocktestdata/xml2json/file-backing_basic-cache-dire= ctsync-srconly.json b/tests/qemublocktestdata/xml2json/file-backing_basic-c= ache-directsync-srconly.json new file mode 100644 index 0000000000..ea490b0034 --- /dev/null +++ b/tests/qemublocktestdata/xml2json/file-backing_basic-cache-directsync-= srconly.json @@ -0,0 +1,24 @@ +{ + "driver": "file", + "filename": "/var/lib/libvirt/images/a" +} +{ + "driver": "file", + "filename": "/var/lib/libvirt/images/b" +} +{ + "driver": "gluster", + "volume": "images", + "path": "c", + "server": [ + { + "type": "inet", + "host": "test.org", + "port": "24007" + } + ] +} +{ + "driver": "file", + "filename": "/var/lib/libvirt/images/d" +} diff --git a/tests/qemublocktestdata/xml2json/file-backing_basic-cache-none= -srconly.json b/tests/qemublocktestdata/xml2json/file-backing_basic-cache-n= one-srconly.json new file mode 100644 index 0000000000..ea490b0034 --- /dev/null +++ b/tests/qemublocktestdata/xml2json/file-backing_basic-cache-none-srconl= y.json @@ -0,0 +1,24 @@ +{ + "driver": "file", + "filename": "/var/lib/libvirt/images/a" +} +{ + "driver": "file", + "filename": "/var/lib/libvirt/images/b" +} +{ + "driver": "gluster", + "volume": "images", + "path": "c", + "server": [ + { + "type": "inet", + "host": "test.org", + "port": "24007" + } + ] +} +{ + "driver": "file", + "filename": "/var/lib/libvirt/images/d" +} diff --git a/tests/qemublocktestdata/xml2json/file-backing_basic-cache-unsa= fe-srconly.json b/tests/qemublocktestdata/xml2json/file-backing_basic-cache= -unsafe-srconly.json new file mode 100644 index 0000000000..ea490b0034 --- /dev/null +++ b/tests/qemublocktestdata/xml2json/file-backing_basic-cache-unsafe-srco= nly.json @@ -0,0 +1,24 @@ +{ + "driver": "file", + "filename": "/var/lib/libvirt/images/a" +} +{ + "driver": "file", + "filename": "/var/lib/libvirt/images/b" +} +{ + "driver": "gluster", + "volume": "images", + "path": "c", + "server": [ + { + "type": "inet", + "host": "test.org", + "port": "24007" + } + ] +} +{ + "driver": "file", + "filename": "/var/lib/libvirt/images/d" +} diff --git a/tests/qemublocktestdata/xml2json/file-backing_basic-cache-writ= eback-srconly.json b/tests/qemublocktestdata/xml2json/file-backing_basic-ca= che-writeback-srconly.json new file mode 100644 index 0000000000..ea490b0034 --- /dev/null +++ b/tests/qemublocktestdata/xml2json/file-backing_basic-cache-writeback-s= rconly.json @@ -0,0 +1,24 @@ +{ + "driver": "file", + "filename": "/var/lib/libvirt/images/a" +} +{ + "driver": "file", + "filename": "/var/lib/libvirt/images/b" +} +{ + "driver": "gluster", + "volume": "images", + "path": "c", + "server": [ + { + "type": "inet", + "host": "test.org", + "port": "24007" + } + ] +} +{ + "driver": "file", + "filename": "/var/lib/libvirt/images/d" +} diff --git a/tests/qemublocktestdata/xml2json/file-backing_basic-cache-writ= ethrough-srconly.json b/tests/qemublocktestdata/xml2json/file-backing_basic= -cache-writethrough-srconly.json new file mode 100644 index 0000000000..ea490b0034 --- /dev/null +++ b/tests/qemublocktestdata/xml2json/file-backing_basic-cache-writethroug= h-srconly.json @@ -0,0 +1,24 @@ +{ + "driver": "file", + "filename": "/var/lib/libvirt/images/a" +} +{ + "driver": "file", + "filename": "/var/lib/libvirt/images/b" +} +{ + "driver": "gluster", + "volume": "images", + "path": "c", + "server": [ + { + "type": "inet", + "host": "test.org", + "port": "24007" + } + ] +} +{ + "driver": "file", + "filename": "/var/lib/libvirt/images/d" +} diff --git a/tests/qemublocktestdata/xml2json/file-backing_basic-detect-src= only.json b/tests/qemublocktestdata/xml2json/file-backing_basic-detect-srco= nly.json new file mode 100644 index 0000000000..ea490b0034 --- /dev/null +++ b/tests/qemublocktestdata/xml2json/file-backing_basic-detect-srconly.js= on @@ -0,0 +1,24 @@ +{ + "driver": "file", + "filename": "/var/lib/libvirt/images/a" +} +{ + "driver": "file", + "filename": "/var/lib/libvirt/images/b" +} +{ + "driver": "gluster", + "volume": "images", + "path": "c", + "server": [ + { + "type": "inet", + "host": "test.org", + "port": "24007" + } + ] +} +{ + "driver": "file", + "filename": "/var/lib/libvirt/images/d" +} diff --git a/tests/qemublocktestdata/xml2json/file-backing_basic-noopts-src= only.json b/tests/qemublocktestdata/xml2json/file-backing_basic-noopts-srco= nly.json new file mode 100644 index 0000000000..dbdf6e563b --- /dev/null +++ b/tests/qemublocktestdata/xml2json/file-backing_basic-noopts-srconly.js= on @@ -0,0 +1,16 @@ +{ + "driver": "file", + "filename": "/var/lib/libvirt/images/a" +} +{ + "driver": "file", + "filename": "/var/lib/libvirt/images/b" +} +{ + "driver": "file", + "filename": "/var/lib/libvirt/images/c" +} +{ + "driver": "file", + "filename": "/var/lib/libvirt/images/d" +} diff --git a/tests/qemublocktestdata/xml2json/file-backing_basic-unmap-dete= ct-srconly.json b/tests/qemublocktestdata/xml2json/file-backing_basic-unmap= -detect-srconly.json new file mode 100644 index 0000000000..ea490b0034 --- /dev/null +++ b/tests/qemublocktestdata/xml2json/file-backing_basic-unmap-detect-srco= nly.json @@ -0,0 +1,24 @@ +{ + "driver": "file", + "filename": "/var/lib/libvirt/images/a" +} +{ + "driver": "file", + "filename": "/var/lib/libvirt/images/b" +} +{ + "driver": "gluster", + "volume": "images", + "path": "c", + "server": [ + { + "type": "inet", + "host": "test.org", + "port": "24007" + } + ] +} +{ + "driver": "file", + "filename": "/var/lib/libvirt/images/d" +} diff --git a/tests/qemublocktestdata/xml2json/file-backing_basic-unmap-igno= re-srconly.json b/tests/qemublocktestdata/xml2json/file-backing_basic-unmap= -ignore-srconly.json new file mode 100644 index 0000000000..ea490b0034 --- /dev/null +++ b/tests/qemublocktestdata/xml2json/file-backing_basic-unmap-ignore-srco= nly.json @@ -0,0 +1,24 @@ +{ + "driver": "file", + "filename": "/var/lib/libvirt/images/a" +} +{ + "driver": "file", + "filename": "/var/lib/libvirt/images/b" +} +{ + "driver": "gluster", + "volume": "images", + "path": "c", + "server": [ + { + "type": "inet", + "host": "test.org", + "port": "24007" + } + ] +} +{ + "driver": "file", + "filename": "/var/lib/libvirt/images/d" +} diff --git a/tests/qemublocktestdata/xml2json/file-backing_basic-unmap-srco= nly.json b/tests/qemublocktestdata/xml2json/file-backing_basic-unmap-srconl= y.json new file mode 100644 index 0000000000..ea490b0034 --- /dev/null +++ b/tests/qemublocktestdata/xml2json/file-backing_basic-unmap-srconly.json @@ -0,0 +1,24 @@ +{ + "driver": "file", + "filename": "/var/lib/libvirt/images/a" +} +{ + "driver": "file", + "filename": "/var/lib/libvirt/images/b" +} +{ + "driver": "gluster", + "volume": "images", + "path": "c", + "server": [ + { + "type": "inet", + "host": "test.org", + "port": "24007" + } + ] +} +{ + "driver": "file", + "filename": "/var/lib/libvirt/images/d" +} diff --git a/tests/qemublocktestdata/xml2json/file-bochs-noopts-srconly.jso= n b/tests/qemublocktestdata/xml2json/file-bochs-noopts-srconly.json new file mode 100644 index 0000000000..c50fa903f5 --- /dev/null +++ b/tests/qemublocktestdata/xml2json/file-bochs-noopts-srconly.json @@ -0,0 +1,4 @@ +{ + "driver": "file", + "filename": "/path/to/i.img" +} diff --git a/tests/qemublocktestdata/xml2json/file-cloop-noopts-srconly.jso= n b/tests/qemublocktestdata/xml2json/file-cloop-noopts-srconly.json new file mode 100644 index 0000000000..c50fa903f5 --- /dev/null +++ b/tests/qemublocktestdata/xml2json/file-cloop-noopts-srconly.json @@ -0,0 +1,4 @@ +{ + "driver": "file", + "filename": "/path/to/i.img" +} diff --git a/tests/qemublocktestdata/xml2json/file-dmg-noopts-srconly.json = b/tests/qemublocktestdata/xml2json/file-dmg-noopts-srconly.json new file mode 100644 index 0000000000..c50fa903f5 --- /dev/null +++ b/tests/qemublocktestdata/xml2json/file-dmg-noopts-srconly.json @@ -0,0 +1,4 @@ +{ + "driver": "file", + "filename": "/path/to/i.img" +} diff --git a/tests/qemublocktestdata/xml2json/file-ploop-noopts-srconly.jso= n b/tests/qemublocktestdata/xml2json/file-ploop-noopts-srconly.json new file mode 100644 index 0000000000..c50fa903f5 --- /dev/null +++ b/tests/qemublocktestdata/xml2json/file-ploop-noopts-srconly.json @@ -0,0 +1,4 @@ +{ + "driver": "file", + "filename": "/path/to/i.img" +} diff --git a/tests/qemublocktestdata/xml2json/file-qcow2-backing-chain-encr= yption-srconly.json b/tests/qemublocktestdata/xml2json/file-qcow2-backing-c= hain-encryption-srconly.json new file mode 100644 index 0000000000..316dbc9df2 --- /dev/null +++ b/tests/qemublocktestdata/xml2json/file-qcow2-backing-chain-encryption-= srconly.json @@ -0,0 +1,8 @@ +{ + "driver": "file", + "filename": "/var/lib/libvirt/images/a" +} +{ + "driver": "file", + "filename": "/var/lib/libvirt/images/b" +} diff --git a/tests/qemublocktestdata/xml2json/file-qcow2-backing-chain-noop= ts-srconly.json b/tests/qemublocktestdata/xml2json/file-qcow2-backing-chain= -noopts-srconly.json new file mode 100644 index 0000000000..d998acc194 --- /dev/null +++ b/tests/qemublocktestdata/xml2json/file-qcow2-backing-chain-noopts-srco= nly.json @@ -0,0 +1,40 @@ +{ + "driver": "file", + "filename": "/var/lib/libvirt/images/rhel7.3.1507297895" +} +{ + "driver": "file", + "filename": "/var/lib/libvirt/images/rhel7.3.1484071872" +} +{ + "driver": "file", + "filename": "/var/lib/libvirt/images/rhel7.3.1483615252" +} +{ + "driver": "file", + "filename": "/var/lib/libvirt/images/rhel7.3.1483605924" +} +{ + "driver": "file", + "filename": "/var/lib/libvirt/images/rhel7.3.1483605920" +} +{ + "driver": "file", + "filename": "/var/lib/libvirt/images/rhel7.3.1483546244" +} +{ + "driver": "file", + "filename": "/var/lib/libvirt/images/rhel7.3.1483545901" +} +{ + "driver": "file", + "filename": "/var/lib/libvirt/images/rhel7.3.1483545313" +} +{ + "driver": "file", + "filename": "/var/lib/libvirt/images/rhel7.3.1483536402" +} +{ + "driver": "file", + "filename": "/var/lib/libvirt/images/rhel7.3.qcow2" +} diff --git a/tests/qemublocktestdata/xml2json/file-qcow2-backing-chain-unte= rminated-srconly.json b/tests/qemublocktestdata/xml2json/file-qcow2-backing= -chain-unterminated-srconly.json new file mode 100644 index 0000000000..e0bce3bcd2 --- /dev/null +++ b/tests/qemublocktestdata/xml2json/file-qcow2-backing-chain-unterminate= d-srconly.json @@ -0,0 +1,8 @@ +{ + "driver": "file", + "filename": "/var/lib/libvirt/images/rhel7.3.1507297895" +} +{ + "driver": "file", + "filename": "/var/lib/libvirt/images/rhel7.3.1484071872" +} diff --git a/tests/qemublocktestdata/xml2json/file-raw-aio_native-srconly.j= son b/tests/qemublocktestdata/xml2json/file-raw-aio_native-srconly.json new file mode 100644 index 0000000000..c50fa903f5 --- /dev/null +++ b/tests/qemublocktestdata/xml2json/file-raw-aio_native-srconly.json @@ -0,0 +1,4 @@ +{ + "driver": "file", + "filename": "/path/to/i.img" +} diff --git a/tests/qemublocktestdata/xml2json/file-raw-luks-srconly.json b/= tests/qemublocktestdata/xml2json/file-raw-luks-srconly.json new file mode 100644 index 0000000000..6d7088211f --- /dev/null +++ b/tests/qemublocktestdata/xml2json/file-raw-luks-srconly.json @@ -0,0 +1,4 @@ +{ + "driver": "file", + "filename": "/path/luks.img" +} diff --git a/tests/qemublocktestdata/xml2json/file-raw-noopts-srconly.json = b/tests/qemublocktestdata/xml2json/file-raw-noopts-srconly.json new file mode 100644 index 0000000000..bb3e8af9eb --- /dev/null +++ b/tests/qemublocktestdata/xml2json/file-raw-noopts-srconly.json @@ -0,0 +1,4 @@ +{ + "driver": "file", + "filename": "/var/lib/libvirt/images/i.img" +} diff --git a/tests/qemublocktestdata/xml2json/file-vdi-noopts-srconly.json = b/tests/qemublocktestdata/xml2json/file-vdi-noopts-srconly.json new file mode 100644 index 0000000000..c50fa903f5 --- /dev/null +++ b/tests/qemublocktestdata/xml2json/file-vdi-noopts-srconly.json @@ -0,0 +1,4 @@ +{ + "driver": "file", + "filename": "/path/to/i.img" +} diff --git a/tests/qemublocktestdata/xml2json/file-vhd-noopts-srconly.json = b/tests/qemublocktestdata/xml2json/file-vhd-noopts-srconly.json new file mode 100644 index 0000000000..c50fa903f5 --- /dev/null +++ b/tests/qemublocktestdata/xml2json/file-vhd-noopts-srconly.json @@ -0,0 +1,4 @@ +{ + "driver": "file", + "filename": "/path/to/i.img" +} diff --git a/tests/qemublocktestdata/xml2json/file-vpc-noopts-srconly.json = b/tests/qemublocktestdata/xml2json/file-vpc-noopts-srconly.json new file mode 100644 index 0000000000..c50fa903f5 --- /dev/null +++ b/tests/qemublocktestdata/xml2json/file-vpc-noopts-srconly.json @@ -0,0 +1,4 @@ +{ + "driver": "file", + "filename": "/path/to/i.img" +} diff --git a/tests/qemublocktestdata/xml2json/network-nbd-tls-srconly.json = b/tests/qemublocktestdata/xml2json/network-nbd-tls-srconly.json new file mode 100644 index 0000000000..455f4e5140 --- /dev/null +++ b/tests/qemublocktestdata/xml2json/network-nbd-tls-srconly.json @@ -0,0 +1,8 @@ +{ + "driver": "nbd", + "server": { + "type": "inet", + "host": "host1.example.com", + "port": "10809" + } +} diff --git a/tests/qemublocktestdata/xml2json/network-qcow2-backing-chain-c= ache-unsafe-srconly.json b/tests/qemublocktestdata/xml2json/network-qcow2-b= acking-chain-cache-unsafe-srconly.json new file mode 100644 index 0000000000..69ca9caf88 --- /dev/null +++ b/tests/qemublocktestdata/xml2json/network-qcow2-backing-chain-cache-un= safe-srconly.json @@ -0,0 +1,22 @@ +{ + "driver": "rbd", + "pool": "rbdpool", + "image": "rbdimg", + "server": [ + { + "host": "host1.example.com", + "port": "0" + }, + { + "host": "host2.example.com", + "port": "0" + } + ] +} +{ + "driver": "iscsi", + "portal": "example.org:3260", + "target": "iscsitarget", + "lun": 1, + "transport": "tcp" +} diff --git a/tests/qemublocktestdata/xml2json/network-qcow2-backing-chain-e= ncryption_auth-srconly.json b/tests/qemublocktestdata/xml2json/network-qcow= 2-backing-chain-encryption_auth-srconly.json new file mode 100644 index 0000000000..6298329812 --- /dev/null +++ b/tests/qemublocktestdata/xml2json/network-qcow2-backing-chain-encrypti= on_auth-srconly.json @@ -0,0 +1,22 @@ +{ + "driver": "rbd", + "pool": "rbdpool", + "image": "rbdimg", + "server": [ + { + "host": "host1.example.com", + "port": "0" + }, + { + "host": "host2.example.com", + "port": "0" + } + ] +} +{ + "driver": "iscsi", + "portal": "example.org:3260", + "target": "iqn.2016-09.com.example:iscsitarget", + "lun": 1, + "transport": "tcp" +} --=20 2.21.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list