From nobody Fri Nov 21 10:10:51 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) client-ip=8.43.85.245; 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 8.43.85.245 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=1763371186; cv=none; d=zohomail.com; s=zohoarc; b=Gkk/Akoi13qm5IdNBOBvaA6AmwEVn0yVGaUYZT7xS8Z5aXYzGWXjxDQqBrXRCqGWSRAlM1vbLe7/ZxYFErN7mB+pmuNi7clTCkgnoP9OEI3ReKhORUDOn7kHfHQcd2WdfwjK+3GkE2glkU9yrSIUO4wsLGdy1xydvE489LNm6Yw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1763371186; 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=SOGT/qrNdkh1n2V51MPP4fV/8bIh7/hD4wd1XHdtf+8=; b=KF3W4lMtjMPxQkXRMmrNd8WMp1O8MhlYutUPdxkdJtvvhFhshWsa47VR+ZkEU1krxm1my8B7T52EIbvYQcyigEN5WjyjCMylupREH12pVxpjoJwZCTjKtbGVWQXCIXMDUtA2wH409AxoCnTMo8Oge6Z7bS7OENdAA/u10E5tLwM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 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 [8.43.85.245]) by mx.zohomail.com with SMTPS id 176337118684923.479587173802656; Mon, 17 Nov 2025 01:19:46 -0800 (PST) Received: by lists.libvirt.org (Postfix, from userid 993) id 0ED5C3FABD; Mon, 17 Nov 2025 04:19:44 -0500 (EST) Received: from [172.19.199.36] (lists.libvirt.org [8.43.85.245]) by lists.libvirt.org (Postfix) with ESMTP id 672A2418AD; Mon, 17 Nov 2025 04:18:10 -0500 (EST) Received: by lists.libvirt.org (Postfix, from userid 993) id 4534A44EBB; Fri, 14 Nov 2025 10:53:34 -0500 (EST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.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 AE27B44EBE for ; Fri, 14 Nov 2025 10:53:33 -0500 (EST) 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-578-WpjIfBtcNDWptg7ULPzy1A-1; Fri, 14 Nov 2025 10:53:31 -0500 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (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 BF40F1953987 for ; Fri, 14 Nov 2025 15:53:30 +0000 (UTC) Received: from speedmetal.openshiftapps.com (unknown [10.45.242.12]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id E3A581955F1B for ; Fri, 14 Nov 2025 15:53:29 +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=-5.0 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED,SPF_PASS autolearn=unavailable autolearn_force=no version=4.0.1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1763135613; 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=SOGT/qrNdkh1n2V51MPP4fV/8bIh7/hD4wd1XHdtf+8=; b=MjIN34qjLtLg/oGlrTLoUYKFWXKFANGshE4zQGGmAQqTLi+7eCGc9Io7ht+y+K7c6DSxzV M5Pe6y3t3XOhCzt4R4molH/+RyutxYKpJlUcqcddEckGeW2mr3DHDkKe+QWt8D8FttaiMB N81nKIvB9+U8NGfBoffrpX4j3MwSmzY= X-MC-Unique: WpjIfBtcNDWptg7ULPzy1A-1 X-Mimecast-MFC-AGG-ID: WpjIfBtcNDWptg7ULPzy1A_1763135610 To: devel@lists.libvirt.org Subject: [PATCH 1/2] qemuxmlconftest: Improve coverage of 'disk-detect-zeroes' test case Date: Fri, 14 Nov 2025 16:53:25 +0100 Message-ID: <1e9f7e0afc53869c3ffb318a5ea7194d1c5f67b3.1763135037.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: 59rDqgdwOWkyc3nsXSsjD0AXGlqwbhOGeEsY9VOdcuY_1763135610 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: 5PYLV2FK2NLSYH5FYLT35LJ7FQ3EQIUR X-Message-ID-Hash: 5PYLV2FK2NLSYH5FYLT35LJ7FQ3EQIUR 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: 1763371190218153000 Content-Type: text/plain; charset="utf-8" From: Peter Krempa Add test cases for all three options 'off'/'on'/'unmap' as well as add backing store for each image to show how the configuration behaves. Signed-off-by: Peter Krempa --- .../disk-detect-zeroes.x86_64-latest.args | 20 +++++++++--- tests/qemuxmlconfdata/disk-detect-zeroes.xml | 31 +++++++++++++++++-- 2 files changed, 45 insertions(+), 6 deletions(-) diff --git a/tests/qemuxmlconfdata/disk-detect-zeroes.x86_64-latest.args b/= tests/qemuxmlconfdata/disk-detect-zeroes.x86_64-latest.args index 07acc46113..d959d4a717 100644 --- a/tests/qemuxmlconfdata/disk-detect-zeroes.x86_64-latest.args +++ b/tests/qemuxmlconfdata/disk-detect-zeroes.x86_64-latest.args @@ -27,10 +27,22 @@ XDG_CONFIG_HOME=3D/var/lib/libvirt/qemu/domain--1-test/= .config \ -no-shutdown \ -boot menu=3Don,strict=3Don \ -device '{"driver":"piix3-usb-uhci","id":"usb","bus":"pci.0","addr":"0x1.0= x2"}' \ --blockdev '{"driver":"file","filename":"/var/lib/libvirt/images/f14.img","= node-name":"libvirt-2-storage","auto-read-only":true,"discard":"unmap"}' \ --blockdev '{"node-name":"libvirt-2-format","read-only":false,"discard":"un= map","detect-zeroes":"unmap","driver":"qcow2","file":"libvirt-2-storage"}' \ --device '{"driver":"virtio-blk-pci","bus":"pci.0","addr":"0x4","drive":"li= bvirt-2-format","id":"virtio-disk0","bootindex":2}' \ --blockdev '{"driver":"file","filename":"/var/lib/libvirt/Fedora-14-x86_64-= Live-KDE.iso","node-name":"libvirt-1-storage","read-only":true,"discard":"i= gnore","detect-zeroes":"on"}' \ +-blockdev '{"driver":"file","filename":"/var/lib/libvirt/images/detect-zer= oes-unmap-back.img","node-name":"libvirt-7-storage","auto-read-only":true,"= discard":"unmap"}' \ +-blockdev '{"node-name":"libvirt-7-format","read-only":true,"discard":"unm= ap","driver":"qcow2","file":"libvirt-7-storage","backing":null}' \ +-blockdev '{"driver":"file","filename":"/var/lib/libvirt/images/detect-zer= oes-unmap.img","node-name":"libvirt-6-storage","auto-read-only":true,"disca= rd":"unmap"}' \ +-blockdev '{"node-name":"libvirt-6-format","read-only":false,"discard":"un= map","detect-zeroes":"unmap","driver":"qcow2","file":"libvirt-6-storage","b= acking":"libvirt-7-format"}' \ +-device '{"driver":"virtio-blk-pci","bus":"pci.0","addr":"0x4","drive":"li= bvirt-6-format","id":"virtio-disk0","bootindex":2}' \ +-blockdev '{"driver":"file","filename":"/var/lib/libvirt/images/detect-zer= oes-on-back.img","node-name":"libvirt-5-storage","auto-read-only":true,"dis= card":"unmap"}' \ +-blockdev '{"node-name":"libvirt-5-format","read-only":true,"discard":"unm= ap","driver":"qcow2","file":"libvirt-5-storage","backing":null}' \ +-blockdev '{"driver":"file","filename":"/var/lib/libvirt/images/detect-zer= oes-on.img","node-name":"libvirt-4-storage","auto-read-only":true,"discard"= :"unmap"}' \ +-blockdev '{"node-name":"libvirt-4-format","read-only":false,"discard":"un= map","detect-zeroes":"on","driver":"qcow2","file":"libvirt-4-storage","back= ing":"libvirt-5-format"}' \ +-device '{"driver":"virtio-blk-pci","bus":"pci.0","addr":"0x5","drive":"li= bvirt-4-format","id":"virtio-disk1"}' \ +-blockdev '{"driver":"file","filename":"/var/lib/libvirt/images/detect-zer= oes-off-back.img","node-name":"libvirt-3-storage","auto-read-only":true,"di= scard":"unmap"}' \ +-blockdev '{"node-name":"libvirt-3-format","read-only":true,"discard":"unm= ap","driver":"qcow2","file":"libvirt-3-storage","backing":null}' \ +-blockdev '{"driver":"file","filename":"/var/lib/libvirt/images/detect-zer= oes-off.img","node-name":"libvirt-2-storage","auto-read-only":true,"discard= ":"unmap"}' \ +-blockdev '{"node-name":"libvirt-2-format","read-only":false,"discard":"un= map","detect-zeroes":"off","driver":"qcow2","file":"libvirt-2-storage","bac= king":"libvirt-3-format"}' \ +-device '{"driver":"virtio-blk-pci","bus":"pci.0","addr":"0x6","drive":"li= bvirt-2-format","id":"virtio-disk2"}' \ +-blockdev '{"driver":"file","filename":"/var/lib/libvirt/detect-zeroes-cdr= om.iso","node-name":"libvirt-1-storage","read-only":true,"discard":"ignore"= ,"detect-zeroes":"on"}' \ -device '{"driver":"ide-cd","bus":"ide.1","unit":0,"drive":"libvirt-1-stor= age","id":"ide0-1-0","bootindex":1}' \ -audiodev '{"id":"audio1","driver":"none"}' \ -device '{"driver":"virtio-balloon-pci","id":"balloon0","bus":"pci.0","add= r":"0x3"}' \ diff --git a/tests/qemuxmlconfdata/disk-detect-zeroes.xml b/tests/qemuxmlco= nfdata/disk-detect-zeroes.xml index ca3732c391..3ea15c3a46 100644 --- a/tests/qemuxmlconfdata/disk-detect-zeroes.xml +++ b/tests/qemuxmlconfdata/disk-detect-zeroes.xml @@ -21,13 +21,40 @@ /usr/bin/qemu-system-x86_64 - + + + + + +
+ + + + + + + + + +
+ + + + + + + + + + +
+ - +
--=20 2.51.1