From nobody Sun Sep 20 20:47:51 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.libvirt.org designates 38.145.34.151 as permitted sender) client-ip=38.145.34.151; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 38.145.34.151 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass(p=reject dis=none) header.from=lists.libvirt.org ARC-Seal: i=1; a=rsa-sha256; t=1785879501; cv=none; d=zohomail.com; s=zohoarc; b=a4pAGI/df8c1MzIuVzb8GnXWB19Hqx3UjO2uR1Wv7SLEPZKNHqPhoPWJfocpCslHoSAoibKmyBCvOuyhCHCawsoJn4GC/ya5ijbHb2llbGk8OhJpb0faKT7Q5GGuJPVx9fx1f1Nk3lpUgPfuxIPsBNv6JpcFsMAEReRvLBGeQNs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1785879501; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Owner:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Reply-To:References:Subject:Subject:To:To:Message-Id:Cc; bh=oIcXhy5cA9NuGWYjtrWIBd+IbtKZ6jHa4Wyv3pYM5bk=; b=dC0XdyMIlFGj57HCxsLV5YtjZUQ48/hNH/pWm8DTDE9DwfACno8/N+6rFT1FWGhiDj8nHSXYGEmodtrD1p9cbwYYUz7xHMSDnQZwmfIuq0roEfJU/EDmQof4cwhG2OUSKp/d3goPiqx91tG4mTJYD0PKBtAaA5mkR3PXSxdC9E4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 38.145.34.151 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [38.145.34.151]) by mx.zohomail.com with SMTPS id 1785879501878124.72740000810006; Tue, 4 Aug 2026 14:38:21 -0700 (PDT) Received: by lists.libvirt.org (Postfix, from userid 993) id B0A3D41851; Tue, 4 Aug 2026 17:38:20 -0400 (EDT) Received: from [172.19.199.10] (unknown [10.16.107.18]) by lists.libvirt.org (Postfix) with ESMTP id 7839641B89; Tue, 4 Aug 2026 17:35:22 -0400 (EDT) Received: by lists.libvirt.org (Postfix, from userid 993) id 76153418F9; Tue, 4 Aug 2026 17:35:11 -0400 (EDT) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (3072 bits) server-digest SHA256) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id 41286418F0 for ; Tue, 4 Aug 2026 17:34:57 -0400 (EDT) Received: from mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-683-ISPjzIu-M7CHtxjCaYXg5g-1; Tue, 04 Aug 2026 17:34:50 -0400 Received: from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.12]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 8BEB919560A6 for ; Tue, 4 Aug 2026 21:34:49 +0000 (UTC) Received: from speedmetal.openshiftapps.com (unknown [10.44.22.5]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id C127B1956087 for ; Tue, 4 Aug 2026 21:34:48 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=0.6 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2, RCVD_IN_SBL_CSS,SPF_HELO_PASS autolearn=no autolearn_force=no version=4.0.1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1785879296; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=oIcXhy5cA9NuGWYjtrWIBd+IbtKZ6jHa4Wyv3pYM5bk=; b=V5QATnorNYq9TsbNL7zNuBbyZx3fChtq5SuK1KcK+A3dzOLD6VCNePjMth6u2sW9ciNPoV rosjtqU9NhE7MFS5pu1QQKscWnbu4FxgM6PZtySvRpyR2/uE5mvdxRuqbiS8+JlK0AyMwA VJe4Db98Ai7hpahZCRynrPRzt832Sc4= X-MC-Unique: ISPjzIu-M7CHtxjCaYXg5g-1 X-Mimecast-MFC-AGG-ID: ISPjzIu-M7CHtxjCaYXg5g_1785879289 To: devel@lists.libvirt.org Subject: [PATCH 1/2] virstoragetest: Add example of a qcow2 image with a backing image pointing to a data_file without 'backing_format' Date: Tue, 4 Aug 2026 23:34:44 +0200 Message-ID: <29d8d6bb1f2348f7c7c8b56e33b3663e21d81ece.1785879137.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: YCLYgAeqKGEVlxeyUl-SsGkRZ2Ij6K4a6E4cnN1l7_k_1785879289 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: 63QSYI453MNVASJV6GXYWARWAR2YMQ6T X-Message-ID-Hash: 63QSYI453MNVASJV6GXYWARWAR2YMQ6T X-MailFrom: pkrempa@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; header-match-devel.lists.libvirt.org-0; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Peter Krempa via Devel Reply-To: Peter Krempa X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1785879503193158500 Content-Type: text/plain; charset="utf-8" From: Peter Krempa Add an image example which specifies a 'backing_file' without 'backing_format' and the backing file has 'data_file'. This was obtained by running a hacked qemu-img with bypassed requirement to specify backing file format: $ qemu-img create -f qcow2 -b datafile.qcow2 -u qcow2_datafile-auto.qcow2= 1024 In the test directory. Signed-off-by: Peter Krempa --- tests/virstoragetest.c | 7 +++- .../images/qcow2_datafile-auto.qcow2 | Bin 0 -> 196616 bytes .../qcow2datafile-qcow2_qcow2-datafile-auto | 31 ++++++++++++++++++ 3 files changed, 37 insertions(+), 1 deletion(-) create mode 100644 tests/virstoragetestdata/images/qcow2_datafile-auto.qco= w2 create mode 100644 tests/virstoragetestdata/out/qcow2datafile-qcow2_qcow2-= datafile-auto diff --git a/tests/virstoragetest.c b/tests/virstoragetest.c index e568bd3141..1514991c20 100644 --- a/tests/virstoragetest.c +++ b/tests/virstoragetest.c @@ -488,13 +488,18 @@ mymain(void) /* qcow2 + datafile * 1) qcow2 image with data file - * 2) qcow2 -> qcow2 backing image with data file */ + * 2) qcow2 -> qcow2 backing image with data file + * 3) qcow2 (with no backing file format specified) -> qcow2 backing i= mage with data file + */ TEST_CHAIN("qcow2-datafile", abs_srcdir "/virstoragetestdata/images/datafile.qcow2", VIR_STORAGE_FILE_QCOW2, EXP_PASS); TEST_CHAIN("qcow2datafile-qcow2_qcow2-datafile", abs_srcdir "/virstoragetestdata/images/qcow2datafile-datafi= le.qcow2", VIR_STORAGE_FILE_QCOW2, EXP_PASS); + TEST_CHAIN("qcow2datafile-qcow2_qcow2-datafile-auto", + abs_srcdir "/virstoragetestdata/images/qcow2_datafile-auto.= qcow2", + VIR_STORAGE_FILE_QCOW2, EXP_PASS); /* broken qcow2 with a 'data_file' which is an empty string */ TEST_CHAIN("qcow2-datafile-broken", diff --git a/tests/virstoragetestdata/images/qcow2_datafile-auto.qcow2 b/te= sts/virstoragetestdata/images/qcow2_datafile-auto.qcow2 new file mode 100644 index 0000000000000000000000000000000000000000..e8a6c2710b5841236b8360d260b= 751f60349e2fa GIT binary patch literal 196616 zcmeIuyH3L}7zWTkX=3DlVE8Xjxj-7MrJUY!?HyqMkVsDf0*NE&ZVp;d;P|WLeSsIru z+P>d)>AySj>LXQsQ?83;naW~SudC4uCX05{_0@J;w@r}_-FP};I-K7ut7Y*#E2<{- zb+sM2Ad7YRc_{j7wP<%u8jBv~F|X66?5+mS@~kiS#h*7{mPQSqGyKiN`=3DZ^?Mxy`# z00000000000000000000000000000000000000000000000000000000000000000 z0000000000z%9sc;gJ9U000000000000000000000000000000000000000000000 z0000000000000000000000000000000F27c1poj50000000000000000000000000 u00000000000000000000000000000000000000000000000000BH|Zt@-@W( literal 0 HcmV?d00001 diff --git a/tests/virstoragetestdata/out/qcow2datafile-qcow2_qcow2-datafil= e-auto b/tests/virstoragetestdata/out/qcow2datafile-qcow2_qcow2-datafile-au= to new file mode 100644 index 0000000000..421e0c8d5a --- /dev/null +++ b/tests/virstoragetestdata/out/qcow2datafile-qcow2_qcow2-datafile-auto @@ -0,0 +1,31 @@ +path:ABS_SRCDIR/virstoragetestdata/images/qcow2_datafile-auto.qcow2 +backingStoreRaw: datafile.qcow2 +backingStoreRawFormat: (-1) +dataFileRaw: +capacity: 1024 +encryption: 0 +relPath: +type:file +format:qcow2 +protocol:none +hostname: + +path:ABS_SRCDIR/virstoragetestdata/images/datafile.qcow2 +backingStoreRaw: +backingStoreRawFormat: none(0) +dataFileRaw: raw +capacity: 1024 +encryption: 0 +relPath:datafile.qcow2 +type:file +format:qcow2 +protocol:none +hostname: + + dataFileStoreSource for 'ABS_SRCDIR/virstoragetestdata/images/datafile.qc= ow2': + path: ABS_SRCDIR/virstoragetestdata/images/raw + capacity: 0 + encryption: 0 + type:file + format:raw + --=20 2.55.0