From nobody Mon Feb 9 00:02:47 2026 Delivered-To: importer@patchew.org Received-SPF: none (zohomail.com: 8.43.85.245 is neither permitted nor denied by domain of lists.libvirt.org) client-ip=8.43.85.245; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; spf=none (zohomail.com: 8.43.85.245 is neither permitted nor denied by domain of lists.libvirt.org) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 170082368772752.97495362887571; Fri, 24 Nov 2023 03:01:27 -0800 (PST) Received: by lists.libvirt.org (Postfix, from userid 996) id 8B953193E; Fri, 24 Nov 2023 06:01:26 -0500 (EST) Received: from lists.libvirt.org (localhost [IPv6:::1]) by lists.libvirt.org (Postfix) with ESMTP id 6CC64189B; Fri, 24 Nov 2023 05:51:32 -0500 (EST) Received: by lists.libvirt.org (Postfix, from userid 996) id D02801887; Fri, 24 Nov 2023 05:50:50 -0500 (EST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id A0BDB17C0 for ; Fri, 24 Nov 2023 05:50:46 -0500 (EST) Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-495-yUODONXBPE6ftKO4PDhNhw-1; Fri, 24 Nov 2023 05:50:45 -0500 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (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 mimecast-mx02.redhat.com (Postfix) with ESMTPS id C10BB3C0BE2E for ; Fri, 24 Nov 2023 10:50:44 +0000 (UTC) Received: from speedmetal.lan (unknown [10.45.242.11]) by smtp.corp.redhat.com (Postfix) with ESMTP id 48EAF492BE7 for ; Fri, 24 Nov 2023 10:50:44 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE,WEIRD_PORT autolearn=unavailable autolearn_force=no version=3.4.4 X-MC-Unique: yUODONXBPE6ftKO4PDhNhw-1 From: Peter Krempa To: devel@lists.libvirt.org Subject: [PATCH 5/7] virstoragetest: Format detected/unprocessed backing store format into output files Date: Fri, 24 Nov 2023 11:50:36 +0100 Message-ID: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.9 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Message-ID-Hash: UE4ZBJBCHSIN4YNM7HJW4GOF73JKRYFQ X-Message-ID-Hash: UE4ZBJBCHSIN4YNM7HJW4GOF73JKRYFQ X-MailFrom: pkrempa@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-config-1; header-match-config-2; header-match-config-3; header-match-devel.lists.libvirt.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header X-Mailman-Version: 3.2.2 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZM-MESSAGEID: 1700823689621100001 Compare also the detected format of the backing file ('backingStoreRawFormat' field) into the outptu data for comparison with others. Since the ToString function can't convert VIR_STORAGE_FILE_AUTO use also the numeric value. Signed-off-by: Peter Krempa --- tests/virstoragetest.c | 3 +++ tests/virstoragetestdata/out/directory-dir | 1 + tests/virstoragetestdata/out/directory-none | 1 + tests/virstoragetestdata/out/directory-raw | 1 + tests/virstoragetestdata/out/qcow2-auto_qcow2-qcow2_raw-raw | 1 + tests/virstoragetestdata/out/qcow2-auto_raw-raw-relative | 1 + tests/virstoragetestdata/out/qcow2-qcow2_nbd-raw | 2 ++ tests/virstoragetestdata/out/qcow2-qcow2_qcow2-auto | 2 ++ .../virstoragetestdata/out/qcow2-qcow2_qcow2-qcow2_qcow2-auto | 3 +++ tests/virstoragetestdata/out/qcow2-qcow2_qcow2-qcow2_raw-auto | 3 +++ tests/virstoragetestdata/out/qcow2-qcow2_qcow2-qcow2_raw-raw | 3 +++ tests/virstoragetestdata/out/qcow2-qcow2_raw-raw-relative | 2 ++ tests/virstoragetestdata/out/qcow2-symlinks | 3 +++ tests/virstoragetestdata/out/qed-auto_raw | 1 + tests/virstoragetestdata/out/qed-qed_raw | 2 ++ tests/virstoragetestdata/out/raw-auto | 1 + tests/virstoragetestdata/out/raw-raw | 1 + 17 files changed, 31 insertions(+) diff --git a/tests/virstoragetest.c b/tests/virstoragetest.c index c7421c55de..c28a23e332 100644 --- a/tests/virstoragetest.c +++ b/tests/virstoragetest.c @@ -184,6 +184,7 @@ testStorageChain(const void *args) virBufferAsprintf(&buf, "path:%s\n" "backingStoreRaw: %s\n" + "backingStoreRawFormat: %s(%d)\n" "capacity: %lld\n" "encryption: %d\n" "relPath:%s\n" @@ -193,6 +194,8 @@ testStorageChain(const void *args) "hostname:%s\n\n", strippedPath, strippedBackingStoreRaw, + NULLSTR(virStorageFileFormatTypeToString(elt->ba= ckingStoreRawFormat)), + elt->backingStoreRawFormat, elt->capacity, !!elt->encryption, strippedRelPath, diff --git a/tests/virstoragetestdata/out/directory-dir b/tests/virstoraget= estdata/out/directory-dir index 298c6cfb4a..c6a2fa3673 100644 --- a/tests/virstoragetestdata/out/directory-dir +++ b/tests/virstoragetestdata/out/directory-dir @@ -1,5 +1,6 @@ path:ABS_SRCDIR/virstoragetestdata/images/ backingStoreRaw: +backingStoreRawFormat: none(0) capacity: 0 encryption: 0 relPath: diff --git a/tests/virstoragetestdata/out/directory-none b/tests/virstorage= testdata/out/directory-none index 298c6cfb4a..c6a2fa3673 100644 --- a/tests/virstoragetestdata/out/directory-none +++ b/tests/virstoragetestdata/out/directory-none @@ -1,5 +1,6 @@ path:ABS_SRCDIR/virstoragetestdata/images/ backingStoreRaw: +backingStoreRawFormat: none(0) capacity: 0 encryption: 0 relPath: diff --git a/tests/virstoragetestdata/out/directory-raw b/tests/virstoraget= estdata/out/directory-raw index 42589746b8..6e190c97f4 100644 --- a/tests/virstoragetestdata/out/directory-raw +++ b/tests/virstoragetestdata/out/directory-raw @@ -1,5 +1,6 @@ path:ABS_SRCDIR/virstoragetestdata/images/ backingStoreRaw: +backingStoreRawFormat: none(0) capacity: 0 encryption: 0 relPath: diff --git a/tests/virstoragetestdata/out/qcow2-auto_qcow2-qcow2_raw-raw b/= tests/virstoragetestdata/out/qcow2-auto_qcow2-qcow2_raw-raw index 7c299542a4..0540be0c09 100644 --- a/tests/virstoragetestdata/out/qcow2-auto_qcow2-qcow2_raw-raw +++ b/tests/virstoragetestdata/out/qcow2-auto_qcow2-qcow2_raw-raw @@ -1,5 +1,6 @@ path:ABS_BUILDDIR/virstoragedata/wrap backingStoreRaw: +backingStoreRawFormat: none(0) capacity: 0 encryption: 0 relPath: diff --git a/tests/virstoragetestdata/out/qcow2-auto_raw-raw-relative b/tes= ts/virstoragetestdata/out/qcow2-auto_raw-raw-relative index 9f8246900d..e145cca417 100644 --- a/tests/virstoragetestdata/out/qcow2-auto_raw-raw-relative +++ b/tests/virstoragetestdata/out/qcow2-auto_raw-raw-relative @@ -1,5 +1,6 @@ path:ABS_SRCDIR/virstoragetestdata/images/qcow2_raw-raw-relative.qcow2 backingStoreRaw: +backingStoreRawFormat: none(0) capacity: 0 encryption: 0 relPath: diff --git a/tests/virstoragetestdata/out/qcow2-qcow2_nbd-raw b/tests/virst= oragetestdata/out/qcow2-qcow2_nbd-raw index 761e65b234..0c2bb0ddc4 100644 --- a/tests/virstoragetestdata/out/qcow2-qcow2_nbd-raw +++ b/tests/virstoragetestdata/out/qcow2-qcow2_nbd-raw @@ -1,5 +1,6 @@ path:ABS_SRCDIR/virstoragetestdata/images/qcow2_nbd-raw.qcow2 backingStoreRaw: nbd+tcp://example.org:6000/blah +backingStoreRawFormat: raw(1) capacity: 1024 encryption: 0 relPath: @@ -10,6 +11,7 @@ hostname: path:blah backingStoreRaw: +backingStoreRawFormat: none(0) capacity: 0 encryption: 0 relPath: diff --git a/tests/virstoragetestdata/out/qcow2-qcow2_qcow2-auto b/tests/vi= rstoragetestdata/out/qcow2-qcow2_qcow2-auto index 57f2f51108..58f1dd6d9e 100644 --- a/tests/virstoragetestdata/out/qcow2-qcow2_qcow2-auto +++ b/tests/virstoragetestdata/out/qcow2-qcow2_qcow2-auto @@ -1,5 +1,6 @@ path:ABS_SRCDIR/virstoragetestdata/images/qcow2_qcow2-auto.qcow2 backingStoreRaw: qcow2 +backingStoreRawFormat: (-1) capacity: 1024 encryption: 0 relPath: @@ -10,6 +11,7 @@ hostname: path:ABS_SRCDIR/virstoragetestdata/images/qcow2 backingStoreRaw: +backingStoreRawFormat: none(0) capacity: 1024 encryption: 0 relPath:qcow2 diff --git a/tests/virstoragetestdata/out/qcow2-qcow2_qcow2-qcow2_qcow2-aut= o b/tests/virstoragetestdata/out/qcow2-qcow2_qcow2-qcow2_qcow2-auto index 99d3c4c273..81263c4bc0 100644 --- a/tests/virstoragetestdata/out/qcow2-qcow2_qcow2-qcow2_qcow2-auto +++ b/tests/virstoragetestdata/out/qcow2-qcow2_qcow2-qcow2_qcow2-auto @@ -1,5 +1,6 @@ path:ABS_SRCDIR/virstoragetestdata/images/qcow2_qcow2-qcow2_qcow2-auto.qco= w2 backingStoreRaw: qcow2_qcow2-auto.qcow2 +backingStoreRawFormat: qcow2(14) capacity: 1024 encryption: 0 relPath: @@ -10,6 +11,7 @@ hostname: path:ABS_SRCDIR/virstoragetestdata/images/qcow2_qcow2-auto.qcow2 backingStoreRaw: qcow2 +backingStoreRawFormat: (-1) capacity: 1024 encryption: 0 relPath:qcow2_qcow2-auto.qcow2 @@ -20,6 +22,7 @@ hostname: path:ABS_SRCDIR/virstoragetestdata/images/qcow2 backingStoreRaw: +backingStoreRawFormat: none(0) capacity: 1024 encryption: 0 relPath:qcow2 diff --git a/tests/virstoragetestdata/out/qcow2-qcow2_qcow2-qcow2_raw-auto = b/tests/virstoragetestdata/out/qcow2-qcow2_qcow2-qcow2_raw-auto index 9734cf22b9..cbb8d6a33f 100644 --- a/tests/virstoragetestdata/out/qcow2-qcow2_qcow2-qcow2_raw-auto +++ b/tests/virstoragetestdata/out/qcow2-qcow2_qcow2-qcow2_raw-auto @@ -1,5 +1,6 @@ path:ABS_SRCDIR/virstoragetestdata/images/qcow2_qcow2-qcow2_raw-auto.qcow2 backingStoreRaw: qcow2_raw-auto.qcow2 +backingStoreRawFormat: qcow2(14) capacity: 1024 encryption: 0 relPath: @@ -10,6 +11,7 @@ hostname: path:ABS_SRCDIR/virstoragetestdata/images/qcow2_raw-auto.qcow2 backingStoreRaw: raw +backingStoreRawFormat: (-1) capacity: 1024 encryption: 0 relPath:qcow2_raw-auto.qcow2 @@ -20,6 +22,7 @@ hostname: path:ABS_SRCDIR/virstoragetestdata/images/raw backingStoreRaw: +backingStoreRawFormat: none(0) capacity: 0 encryption: 0 relPath:raw diff --git a/tests/virstoragetestdata/out/qcow2-qcow2_qcow2-qcow2_raw-raw b= /tests/virstoragetestdata/out/qcow2-qcow2_qcow2-qcow2_raw-raw index 0c90e9858d..de11029922 100644 --- a/tests/virstoragetestdata/out/qcow2-qcow2_qcow2-qcow2_raw-raw +++ b/tests/virstoragetestdata/out/qcow2-qcow2_qcow2-qcow2_raw-raw @@ -1,5 +1,6 @@ path:ABS_BUILDDIR/virstoragedata/wrap backingStoreRaw: ABS_BUILDDIR/virstoragedata/qcow2 +backingStoreRawFormat: qcow2(14) capacity: 1024 encryption: 0 relPath: @@ -10,6 +11,7 @@ hostname: path:ABS_BUILDDIR/virstoragedata/qcow2 backingStoreRaw: ABS_BUILDDIR/virstoragedata/raw +backingStoreRawFormat: raw(1) capacity: 1024 encryption: 0 relPath: @@ -20,6 +22,7 @@ hostname: path:ABS_BUILDDIR/virstoragedata/raw backingStoreRaw: +backingStoreRawFormat: none(0) capacity: 0 encryption: 0 relPath: diff --git a/tests/virstoragetestdata/out/qcow2-qcow2_raw-raw-relative b/te= sts/virstoragetestdata/out/qcow2-qcow2_raw-raw-relative index 552353e980..b4bfd432ad 100644 --- a/tests/virstoragetestdata/out/qcow2-qcow2_raw-raw-relative +++ b/tests/virstoragetestdata/out/qcow2-qcow2_raw-raw-relative @@ -1,5 +1,6 @@ path:ABS_SRCDIR/virstoragetestdata/images/qcow2_raw-raw-relative.qcow2 backingStoreRaw: raw +backingStoreRawFormat: raw(1) capacity: 1024 encryption: 0 relPath: @@ -10,6 +11,7 @@ hostname: path:ABS_SRCDIR/virstoragetestdata/images/raw backingStoreRaw: +backingStoreRawFormat: none(0) capacity: 0 encryption: 0 relPath:raw diff --git a/tests/virstoragetestdata/out/qcow2-symlinks b/tests/virstorage= testdata/out/qcow2-symlinks index 8e531e4cf8..f053f95fd7 100644 --- a/tests/virstoragetestdata/out/qcow2-symlinks +++ b/tests/virstoragetestdata/out/qcow2-symlinks @@ -1,5 +1,6 @@ path:ABS_SRCDIR/virstoragetestdata/images/sub/link2 backingStoreRaw: ../sub/link1 +backingStoreRawFormat: qcow2(14) capacity: 1024 encryption: 0 relPath: @@ -10,6 +11,7 @@ hostname: path:ABS_SRCDIR/virstoragetestdata/images/sub/../sub/link1 backingStoreRaw: ../raw +backingStoreRawFormat: raw(1) capacity: 1024 encryption: 0 relPath:../sub/link1 @@ -20,6 +22,7 @@ hostname: path:ABS_SRCDIR/virstoragetestdata/images/sub/../sub/../raw backingStoreRaw: +backingStoreRawFormat: none(0) capacity: 0 encryption: 0 relPath:../raw diff --git a/tests/virstoragetestdata/out/qed-auto_raw b/tests/virstoragete= stdata/out/qed-auto_raw index a75ef8189b..260c3fbc79 100644 --- a/tests/virstoragetestdata/out/qed-auto_raw +++ b/tests/virstoragetestdata/out/qed-auto_raw @@ -1,5 +1,6 @@ path:ABS_SRCDIR/virstoragetestdata/images/qed_raw-raw-relative backingStoreRaw: +backingStoreRawFormat: none(0) capacity: 0 encryption: 0 relPath: diff --git a/tests/virstoragetestdata/out/qed-qed_raw b/tests/virstoragetes= tdata/out/qed-qed_raw index 18a5091e6f..a13d407a5f 100644 --- a/tests/virstoragetestdata/out/qed-qed_raw +++ b/tests/virstoragetestdata/out/qed-qed_raw @@ -1,5 +1,6 @@ path:ABS_SRCDIR/virstoragetestdata/images/qed_raw-raw-relative backingStoreRaw: raw +backingStoreRawFormat: raw(1) capacity: 1024 encryption: 0 relPath: @@ -10,6 +11,7 @@ hostname: path:ABS_SRCDIR/virstoragetestdata/images/raw backingStoreRaw: +backingStoreRawFormat: none(0) capacity: 0 encryption: 0 relPath:raw diff --git a/tests/virstoragetestdata/out/raw-auto b/tests/virstoragetestda= ta/out/raw-auto index 90a9dfceda..70ec22f309 100644 --- a/tests/virstoragetestdata/out/raw-auto +++ b/tests/virstoragetestdata/out/raw-auto @@ -1,5 +1,6 @@ path:ABS_SRCDIR/virstoragetestdata/images/raw backingStoreRaw: +backingStoreRawFormat: none(0) capacity: 0 encryption: 0 relPath: diff --git a/tests/virstoragetestdata/out/raw-raw b/tests/virstoragetestdat= a/out/raw-raw index 90a9dfceda..70ec22f309 100644 --- a/tests/virstoragetestdata/out/raw-raw +++ b/tests/virstoragetestdata/out/raw-raw @@ -1,5 +1,6 @@ path:ABS_SRCDIR/virstoragetestdata/images/raw backingStoreRaw: +backingStoreRawFormat: none(0) capacity: 0 encryption: 0 relPath: --=20 2.42.0 _______________________________________________ Devel mailing list -- devel@lists.libvirt.org To unsubscribe send an email to devel-leave@lists.libvirt.org