From nobody Wed May 15 11:52:17 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 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=1621601851; cv=none; d=zohomail.com; s=zohoarc; b=YViJTXwOVW/Nc2LJtX04eLVefgJiFgQiXQMuEBZQwgciAXgjiciVtzuovB0tkb5UFJy2ohIL5KjYO0VvrDI3XI9MawCef9pqQzyUU25YZpZnGTctCjuSM5mJqWGyoAN1TgECx3T8+Nbxc0R03IXiLzIQaRFoz8qpqFwN7pukvtg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1621601851; h=Content-Type:Content-Transfer-Encoding:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=nr2QAk4eb9XFyfiN/udl464rJh2vT776GrzsKf2R2zE=; b=oKg/QvPsAyjDuBZ5OEf+Y34OynA8B83bqr3EXr7gQ+aL/32EIda9Cg3/e4GJ1ecaSU00s0kBVACuBOGFymcDgakxOsmyKW2anYrVPJ0cAhPISJvDqYrpVnL+cicdopNCmLNMTn3+00IaMS7+BvxNjpK9bIP5KK9iZtW6bogHoJk= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 1621601851631124.52658806768295; Fri, 21 May 2021 05:57:31 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-326-L9eKzQ2KNomZrlJ-CTHiQQ-1; Fri, 21 May 2021 08:57:28 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 2637A107ACCA; Fri, 21 May 2021 12:57:24 +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 5012760FC2; Fri, 21 May 2021 12:57:23 +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 8216A1800BB4; Fri, 21 May 2021 12:57:22 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 14LCvLIB000852 for ; Fri, 21 May 2021 08:57:21 -0400 Received: by smtp.corp.redhat.com (Postfix) id A6D105D9D5; Fri, 21 May 2021 12:57:21 +0000 (UTC) Received: from speedmetal.lan (unknown [10.40.208.14]) by smtp.corp.redhat.com (Postfix) with ESMTP id 172B85D9CA for ; Fri, 21 May 2021 12:57:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1621601850; h=from:from:sender:sender: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:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=nr2QAk4eb9XFyfiN/udl464rJh2vT776GrzsKf2R2zE=; b=Q6KFSBRb1mUNYNgs7VYyodsuObtb3J8qkIdUmALFM8nDW+b8wcp8djEDhK9nWrIVnCUDTc xa+iB8M8bhZXypnYYpSNDbiDJF1tbIbjoLVYQ1/XsERXrPKZxzlodkBxjsKEHSheyJH/a7 0P/qJ1EdrdOqN9FabvOpX8wN1Wy/6zA= X-MC-Unique: L9eKzQ2KNomZrlJ-CTHiQQ-1 From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH] schema: Allow '0' offset for a of Date: Fri, 21 May 2021 14:57:16 +0200 Message-Id: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-loop: libvir-list@redhat.com 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: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" Using slice to cut off the end of the image is a perfectly vaid configuration. Use 'unsignedInt' instead of 'positiveInteger' for the 'offset' attribute in the XML schema and modify one test case to cover this use case. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=3D1960993 Signed-off-by: Peter Krempa Reviewed-by: Pavel Hrdina --- docs/schemas/domaincommon.rng | 2 +- tests/qemuxml2argvdata/disk-slices.x86_64-latest.args | 2 +- tests/qemuxml2argvdata/disk-slices.xml | 2 +- tests/qemuxml2xmloutdata/disk-slices.x86_64-latest.xml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/schemas/domaincommon.rng b/docs/schemas/domaincommon.rng index a2e5c50c1d..475f7f1a42 100644 --- a/docs/schemas/domaincommon.rng +++ b/docs/schemas/domaincommon.rng @@ -1638,7 +1638,7 @@ - + diff --git a/tests/qemuxml2argvdata/disk-slices.x86_64-latest.args b/tests/= qemuxml2argvdata/disk-slices.x86_64-latest.args index d337ea91a7..f41bbeea09 100644 --- a/tests/qemuxml2argvdata/disk-slices.x86_64-latest.args +++ b/tests/qemuxml2argvdata/disk-slices.x86_64-latest.args @@ -28,7 +28,7 @@ XDG_CONFIG_HOME=3D/tmp/lib/domain--1-QEMUGuest1/.config \ -boot strict=3Don \ -device piix3-usb-uhci,id=3Dusb,bus=3Dpci.0,addr=3D0x1.0x2 \ -blockdev '{"driver":"file","filename":"/var/lib/libvirt/images/raw.img","= node-name":"libvirt-6-storage","auto-read-only":true,"discard":"unmap"}' \ --blockdev '{"node-name":"libvirt-6-format","read-only":false,"driver":"raw= ","offset":1234,"size":321,"file":"libvirt-6-storage"}' \ +-blockdev '{"node-name":"libvirt-6-format","read-only":false,"driver":"raw= ","offset":0,"size":321,"file":"libvirt-6-storage"}' \ -device virtio-blk-pci,bus=3Dpci.0,addr=3D0x2,drive=3Dlibvirt-6-format,id= =3Dvirtio-disk0,bootindex=3D1 \ -blockdev '{"driver":"file","filename":"/var/lib/libvirt/images/raw.img","= node-name":"libvirt-5-storage","auto-read-only":true,"discard":"unmap"}' \ -blockdev '{"driver":"raw","node-name":"libvirt-5-slice-sto","offset":9876= ,"size":123456789,"file":"libvirt-5-storage","auto-read-only":true,"discard= ":"unmap"}' \ diff --git a/tests/qemuxml2argvdata/disk-slices.xml b/tests/qemuxml2argvdat= a/disk-slices.xml index 1675766a46..016aa1b905 100644 --- a/tests/qemuxml2argvdata/disk-slices.xml +++ b/tests/qemuxml2argvdata/disk-slices.xml @@ -18,7 +18,7 @@ - + diff --git a/tests/qemuxml2xmloutdata/disk-slices.x86_64-latest.xml b/tests= /qemuxml2xmloutdata/disk-slices.x86_64-latest.xml index 5c200ad31c..be5cd25084 100644 --- a/tests/qemuxml2xmloutdata/disk-slices.x86_64-latest.xml +++ b/tests/qemuxml2xmloutdata/disk-slices.x86_64-latest.xml @@ -21,7 +21,7 @@ - + --=20 2.31.1