From nobody Mon Feb 9 12:11:28 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 1700823538200137.92674654205678; Fri, 24 Nov 2023 02:58:58 -0800 (PST) Received: by lists.libvirt.org (Postfix, from userid 996) id 20BA219D8; Fri, 24 Nov 2023 05:58:57 -0500 (EST) Received: from lists.libvirt.org (localhost [IPv6:::1]) by lists.libvirt.org (Postfix) with ESMTP id 433BC18BE; Fri, 24 Nov 2023 05:51:23 -0500 (EST) Received: by lists.libvirt.org (Postfix, from userid 996) id 9C62B17C5; Fri, 24 Nov 2023 05:50:47 -0500 (EST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.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 A09D417A4 for ; Fri, 24 Nov 2023 05:50:45 -0500 (EST) Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-516-NuoRyaudMp-Q9yv8fLMEsw-1; Fri, 24 Nov 2023 05:50:44 -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 046AA811E88 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 6F309492BE7 for ; Fri, 24 Nov 2023 10:50:43 +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_H3, 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: NuoRyaudMp-Q9yv8fLMEsw-1 From: Peter Krempa To: devel@lists.libvirt.org Subject: [PATCH 4/7] virstoragetest: Use strings for storage type and format in output data Date: Fri, 24 Nov 2023 11:50:35 +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: EGLKYCKMRBSHXWFHV7WLFQFA36CYP56T X-Message-ID-Hash: EGLKYCKMRBSHXWFHV7WLFQFA36CYP56T 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: 1700823538727100001 Make it easier for the humans to read/compare the outputs. Signed-off-by: Peter Krempa --- tests/virstoragetest.c | 8 ++++---- tests/virstoragetestdata/out/directory-dir | 4 ++-- tests/virstoragetestdata/out/directory-none | 4 ++-- tests/virstoragetestdata/out/directory-raw | 4 ++-- .../out/qcow2-auto_qcow2-qcow2_raw-raw | 4 ++-- .../out/qcow2-auto_raw-raw-relative | 4 ++-- tests/virstoragetestdata/out/qcow2-qcow2_nbd-raw | 8 ++++---- tests/virstoragetestdata/out/qcow2-qcow2_qcow2-auto | 8 ++++---- .../out/qcow2-qcow2_qcow2-qcow2_qcow2-auto | 12 ++++++------ .../out/qcow2-qcow2_qcow2-qcow2_raw-auto | 12 ++++++------ .../out/qcow2-qcow2_qcow2-qcow2_raw-raw | 12 ++++++------ .../out/qcow2-qcow2_raw-raw-relative | 8 ++++---- tests/virstoragetestdata/out/qcow2-symlinks | 12 ++++++------ tests/virstoragetestdata/out/qed-auto_raw | 4 ++-- tests/virstoragetestdata/out/qed-qed_raw | 8 ++++---- tests/virstoragetestdata/out/raw-auto | 4 ++-- tests/virstoragetestdata/out/raw-raw | 4 ++-- 17 files changed, 60 insertions(+), 60 deletions(-) diff --git a/tests/virstoragetest.c b/tests/virstoragetest.c index 11f7abbda6..c7421c55de 100644 --- a/tests/virstoragetest.c +++ b/tests/virstoragetest.c @@ -187,8 +187,8 @@ testStorageChain(const void *args) "capacity: %lld\n" "encryption: %d\n" "relPath:%s\n" - "type:%d\n" - "format:%d\n" + "type:%s\n" + "format:%s\n" "protocol:%s\n" "hostname:%s\n\n", strippedPath, @@ -196,8 +196,8 @@ testStorageChain(const void *args) elt->capacity, !!elt->encryption, strippedRelPath, - elt->type, - elt->format, + NULLSTR(virStorageTypeToString(elt->type)), + NULLSTR(virStorageFileFormatTypeToString(elt->fo= rmat)), virStorageNetProtocolTypeToString(elt->protocol), NULLSTR(elt->nhosts ? elt->hosts[0].name : NULL)= ); } diff --git a/tests/virstoragetestdata/out/directory-dir b/tests/virstoraget= estdata/out/directory-dir index 65b7b91912..298c6cfb4a 100644 --- a/tests/virstoragetestdata/out/directory-dir +++ b/tests/virstoragetestdata/out/directory-dir @@ -3,7 +3,7 @@ backingStoreRaw: capacity: 0 encryption: 0 relPath: -type:3 -format:2 +type:dir +format:dir protocol:none hostname: diff --git a/tests/virstoragetestdata/out/directory-none b/tests/virstorage= testdata/out/directory-none index 65b7b91912..298c6cfb4a 100644 --- a/tests/virstoragetestdata/out/directory-none +++ b/tests/virstoragetestdata/out/directory-none @@ -3,7 +3,7 @@ backingStoreRaw: capacity: 0 encryption: 0 relPath: -type:3 -format:2 +type:dir +format:dir protocol:none hostname: diff --git a/tests/virstoragetestdata/out/directory-raw b/tests/virstoraget= estdata/out/directory-raw index 5def2c4b8b..42589746b8 100644 --- a/tests/virstoragetestdata/out/directory-raw +++ b/tests/virstoragetestdata/out/directory-raw @@ -3,7 +3,7 @@ backingStoreRaw: capacity: 0 encryption: 0 relPath: -type:3 -format:1 +type:dir +format:raw protocol:none hostname: diff --git a/tests/virstoragetestdata/out/qcow2-auto_qcow2-qcow2_raw-raw b/= tests/virstoragetestdata/out/qcow2-auto_qcow2-qcow2_raw-raw index 2ea087592e..7c299542a4 100644 --- a/tests/virstoragetestdata/out/qcow2-auto_qcow2-qcow2_raw-raw +++ b/tests/virstoragetestdata/out/qcow2-auto_qcow2-qcow2_raw-raw @@ -3,7 +3,7 @@ backingStoreRaw: capacity: 0 encryption: 0 relPath: -type:1 -format:1 +type:file +format:raw protocol:none hostname: diff --git a/tests/virstoragetestdata/out/qcow2-auto_raw-raw-relative b/tes= ts/virstoragetestdata/out/qcow2-auto_raw-raw-relative index f9afc138f0..9f8246900d 100644 --- a/tests/virstoragetestdata/out/qcow2-auto_raw-raw-relative +++ b/tests/virstoragetestdata/out/qcow2-auto_raw-raw-relative @@ -3,7 +3,7 @@ backingStoreRaw: capacity: 0 encryption: 0 relPath: -type:1 -format:1 +type:file +format:raw protocol:none hostname: diff --git a/tests/virstoragetestdata/out/qcow2-qcow2_nbd-raw b/tests/virst= oragetestdata/out/qcow2-qcow2_nbd-raw index 08a93b9f32..761e65b234 100644 --- a/tests/virstoragetestdata/out/qcow2-qcow2_nbd-raw +++ b/tests/virstoragetestdata/out/qcow2-qcow2_nbd-raw @@ -3,8 +3,8 @@ backingStoreRaw: nbd+tcp://example.org:6000/blah capacity: 1024 encryption: 0 relPath: -type:1 -format:14 +type:file +format:qcow2 protocol:none hostname: @@ -13,7 +13,7 @@ backingStoreRaw: capacity: 0 encryption: 0 relPath: -type:4 -format:1 +type:network +format:raw protocol:nbd hostname:example.org diff --git a/tests/virstoragetestdata/out/qcow2-qcow2_qcow2-auto b/tests/vi= rstoragetestdata/out/qcow2-qcow2_qcow2-auto index e23c43f328..57f2f51108 100644 --- a/tests/virstoragetestdata/out/qcow2-qcow2_qcow2-auto +++ b/tests/virstoragetestdata/out/qcow2-qcow2_qcow2-auto @@ -3,8 +3,8 @@ backingStoreRaw: qcow2 capacity: 1024 encryption: 0 relPath: -type:1 -format:14 +type:file +format:qcow2 protocol:none hostname: @@ -13,7 +13,7 @@ backingStoreRaw: capacity: 1024 encryption: 0 relPath:qcow2 -type:1 -format:14 +type:file +format:qcow2 protocol:none hostname: diff --git a/tests/virstoragetestdata/out/qcow2-qcow2_qcow2-qcow2_qcow2-aut= o b/tests/virstoragetestdata/out/qcow2-qcow2_qcow2-qcow2_qcow2-auto index 17f53f3ed0..99d3c4c273 100644 --- a/tests/virstoragetestdata/out/qcow2-qcow2_qcow2-qcow2_qcow2-auto +++ b/tests/virstoragetestdata/out/qcow2-qcow2_qcow2-qcow2_qcow2-auto @@ -3,8 +3,8 @@ backingStoreRaw: qcow2_qcow2-auto.qcow2 capacity: 1024 encryption: 0 relPath: -type:1 -format:14 +type:file +format:qcow2 protocol:none hostname: @@ -13,8 +13,8 @@ backingStoreRaw: qcow2 capacity: 1024 encryption: 0 relPath:qcow2_qcow2-auto.qcow2 -type:1 -format:14 +type:file +format:qcow2 protocol:none hostname: @@ -23,7 +23,7 @@ backingStoreRaw: capacity: 1024 encryption: 0 relPath:qcow2 -type:1 -format:14 +type:file +format:qcow2 protocol:none hostname: diff --git a/tests/virstoragetestdata/out/qcow2-qcow2_qcow2-qcow2_raw-auto = b/tests/virstoragetestdata/out/qcow2-qcow2_qcow2-qcow2_raw-auto index 1be5a82cc9..9734cf22b9 100644 --- a/tests/virstoragetestdata/out/qcow2-qcow2_qcow2-qcow2_raw-auto +++ b/tests/virstoragetestdata/out/qcow2-qcow2_qcow2-qcow2_raw-auto @@ -3,8 +3,8 @@ backingStoreRaw: qcow2_raw-auto.qcow2 capacity: 1024 encryption: 0 relPath: -type:1 -format:14 +type:file +format:qcow2 protocol:none hostname: @@ -13,8 +13,8 @@ backingStoreRaw: raw capacity: 1024 encryption: 0 relPath:qcow2_raw-auto.qcow2 -type:1 -format:14 +type:file +format:qcow2 protocol:none hostname: @@ -23,7 +23,7 @@ backingStoreRaw: capacity: 0 encryption: 0 relPath:raw -type:1 -format:1 +type:file +format:raw protocol:none hostname: diff --git a/tests/virstoragetestdata/out/qcow2-qcow2_qcow2-qcow2_raw-raw b= /tests/virstoragetestdata/out/qcow2-qcow2_qcow2-qcow2_raw-raw index 5f93fe746b..0c90e9858d 100644 --- a/tests/virstoragetestdata/out/qcow2-qcow2_qcow2-qcow2_raw-raw +++ b/tests/virstoragetestdata/out/qcow2-qcow2_qcow2-qcow2_raw-raw @@ -3,8 +3,8 @@ backingStoreRaw: ABS_BUILDDIR/virstoragedata/qcow2 capacity: 1024 encryption: 0 relPath: -type:1 -format:14 +type:file +format:qcow2 protocol:none hostname: @@ -13,8 +13,8 @@ backingStoreRaw: ABS_BUILDDIR/virstoragedata/raw capacity: 1024 encryption: 0 relPath: -type:1 -format:14 +type:file +format:qcow2 protocol:none hostname: @@ -23,7 +23,7 @@ backingStoreRaw: capacity: 0 encryption: 0 relPath: -type:1 -format:1 +type:file +format:raw protocol:none hostname: diff --git a/tests/virstoragetestdata/out/qcow2-qcow2_raw-raw-relative b/te= sts/virstoragetestdata/out/qcow2-qcow2_raw-raw-relative index 6e3f7ab339..552353e980 100644 --- a/tests/virstoragetestdata/out/qcow2-qcow2_raw-raw-relative +++ b/tests/virstoragetestdata/out/qcow2-qcow2_raw-raw-relative @@ -3,8 +3,8 @@ backingStoreRaw: raw capacity: 1024 encryption: 0 relPath: -type:1 -format:14 +type:file +format:qcow2 protocol:none hostname: @@ -13,7 +13,7 @@ backingStoreRaw: capacity: 0 encryption: 0 relPath:raw -type:1 -format:1 +type:file +format:raw protocol:none hostname: diff --git a/tests/virstoragetestdata/out/qcow2-symlinks b/tests/virstorage= testdata/out/qcow2-symlinks index 34c3a37c2e..8e531e4cf8 100644 --- a/tests/virstoragetestdata/out/qcow2-symlinks +++ b/tests/virstoragetestdata/out/qcow2-symlinks @@ -3,8 +3,8 @@ backingStoreRaw: ../sub/link1 capacity: 1024 encryption: 0 relPath: -type:1 -format:14 +type:file +format:qcow2 protocol:none hostname: @@ -13,8 +13,8 @@ backingStoreRaw: ../raw capacity: 1024 encryption: 0 relPath:../sub/link1 -type:1 -format:14 +type:file +format:qcow2 protocol:none hostname: @@ -23,7 +23,7 @@ backingStoreRaw: capacity: 0 encryption: 0 relPath:../raw -type:1 -format:1 +type:file +format:raw protocol:none hostname: diff --git a/tests/virstoragetestdata/out/qed-auto_raw b/tests/virstoragete= stdata/out/qed-auto_raw index 292a8fa7fb..a75ef8189b 100644 --- a/tests/virstoragetestdata/out/qed-auto_raw +++ b/tests/virstoragetestdata/out/qed-auto_raw @@ -3,7 +3,7 @@ backingStoreRaw: capacity: 0 encryption: 0 relPath: -type:1 -format:1 +type:file +format:raw protocol:none hostname: diff --git a/tests/virstoragetestdata/out/qed-qed_raw b/tests/virstoragetes= tdata/out/qed-qed_raw index 043ec4240b..18a5091e6f 100644 --- a/tests/virstoragetestdata/out/qed-qed_raw +++ b/tests/virstoragetestdata/out/qed-qed_raw @@ -3,8 +3,8 @@ backingStoreRaw: raw capacity: 1024 encryption: 0 relPath: -type:1 -format:15 +type:file +format:qed protocol:none hostname: @@ -13,7 +13,7 @@ backingStoreRaw: capacity: 0 encryption: 0 relPath:raw -type:1 -format:1 +type:file +format:raw protocol:none hostname: diff --git a/tests/virstoragetestdata/out/raw-auto b/tests/virstoragetestda= ta/out/raw-auto index d98b6e8bf5..90a9dfceda 100644 --- a/tests/virstoragetestdata/out/raw-auto +++ b/tests/virstoragetestdata/out/raw-auto @@ -3,7 +3,7 @@ backingStoreRaw: capacity: 0 encryption: 0 relPath: -type:1 -format:1 +type:file +format:raw protocol:none hostname: diff --git a/tests/virstoragetestdata/out/raw-raw b/tests/virstoragetestdat= a/out/raw-raw index d98b6e8bf5..90a9dfceda 100644 --- a/tests/virstoragetestdata/out/raw-raw +++ b/tests/virstoragetestdata/out/raw-raw @@ -3,7 +3,7 @@ backingStoreRaw: capacity: 0 encryption: 0 relPath: -type:1 -format:1 +type:file +format:raw protocol:none hostname: --=20 2.42.0 _______________________________________________ Devel mailing list -- devel@lists.libvirt.org To unsubscribe send an email to devel-leave@lists.libvirt.org