From nobody Sat Nov 23 18:23:52 2024 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=fail(p=none dis=none) header.from=gmail.com Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 1724084600209808.4180842610176; Mon, 19 Aug 2024 09:23:20 -0700 (PDT) Received: by lists.libvirt.org (Postfix, from userid 996) id 0652816EF; Mon, 19 Aug 2024 12:23:18 -0400 (EDT) Received: from lists.libvirt.org (localhost [IPv6:::1]) by lists.libvirt.org (Postfix) with ESMTP id 85F7915FE; Mon, 19 Aug 2024 12:20:23 -0400 (EDT) Received: by lists.libvirt.org (Postfix, from userid 996) id 5FC471525; Mon, 19 Aug 2024 12:20:18 -0400 (EDT) Received: from mail-ed1-f42.google.com (mail-ed1-f42.google.com [209.85.208.42]) (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 126FF1570 for ; Mon, 19 Aug 2024 12:19:59 -0400 (EDT) Received: by mail-ed1-f42.google.com with SMTP id 4fb4d7f45d1cf-5beb6ea9ed6so4441384a12.1 for ; Mon, 19 Aug 2024 09:19:58 -0700 (PDT) Received: from localhost.localdomain ([37.186.51.21]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5bebbde4964sm5738298a12.24.2024.08.19.09.19.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Aug 2024 09:19:55 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-0.6 required=5.0 tests=DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1724084397; x=1724689197; darn=lists.libvirt.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=H3C5iDEQvJuxJ0ZItThkuGdgj2D6zlT0IgW/3rdU2wU=; b=H+pou8V2e+39XsBZr5+tWcQICah+ZbD6l3krqySMz+OzG0Vm/fA+kYxHJctdcmewxm 95w+wRbcC2QOvqWR5b8kD6Q5jwuEA4pWcFedGgtTQYsBcAdHhSH8wY5mVaIRWPVyEBP6 xEwlKSHCnExG8sVbFJlhSkMehIM+HRRGBdw0fwMObVyO/IfgxYfhR7dgZ7LvxlS827Ad YdNI15FAOtaaBNti7vFqsronQGbYIwhVVOWVNV5o5mrllRUk1Ar83yI3ZIvRnvyrupQF 9EpktFHsAB6Za3RXvIA9ncp/6xcajfcHFCUtCS0YSFiJccZM/yWM43t2iJxZVGRirSxk ow+A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724084397; x=1724689197; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=H3C5iDEQvJuxJ0ZItThkuGdgj2D6zlT0IgW/3rdU2wU=; b=C8gQWQiySS18RNV6P7Dloo375os/iqfMWTmhhjF0ByclevbEbLjJBC5Qu+2Ehv4zEJ 022xUrpxxMTaOdQLdyGf9ad6NJXRoPNQ5FFOe8+l3n92dio23Yb4RWvNsBcpZQrDCk2x lPgRVVCBfoW+Bm1gOWj1qO9EsLfbYzJwrXOnzxAHfZ/gq90oBnrTvtnV+Ezi0cc6Yd6t cxtpKNdr0wjUkZnj37eMiu2o1nec1ShwvgWewcaPDP2QhLQINurtY6CRMOG9SLfxyONg LHSeZRX4JmEgcXAbXam7VvYRMON21BnKgULX3omOYBxt5AMZ2BXF+xwY1ciFDdotfkjQ sZsg== X-Gm-Message-State: AOJu0Yyto0tNr21adcvjA93awy0tI8eSQMzlREv9+polOMrHSKtxpB1l ShMmQr+ExeyGKZMGbJjnnDQtcpnqO6TEEf1Wzvoul0o5jqzidPHVciG/uA== X-Google-Smtp-Source: AGHT+IFTmgsHDNQ2kTelhDKiccr6FOSvHqwTY8fwhLMAeoDgRX6X1ft2iA5oXUgPrdSNNE9deawq5g== X-Received: by 2002:a05:6402:84b:b0:5be:9bc5:f6b3 with SMTP id 4fb4d7f45d1cf-5beca4e23bamr7366941a12.2.1724084395864; Mon, 19 Aug 2024 09:19:55 -0700 (PDT) From: Rayhan Faizel To: devel@lists.libvirt.org Subject: [PATCH 04/14] schemas: Refactor relaxNG schema to ease protobuf conversion Date: Mon, 19 Aug 2024 21:39:42 +0530 Message-Id: <20240819160952.351383-5-rayhan.faizel@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240819160952.351383-1-rayhan.faizel@gmail.com> References: <20240819160952.351383-1-rayhan.faizel@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Message-ID-Hash: MDW7XTUJEKU3JX44FZJ4JS3R2AXZDD6O X-Message-ID-Hash: MDW7XTUJEKU3JX44FZJ4JS3R2AXZDD6O X-MailFrom: rayhan.faizel@gmail.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 CC: Rayhan Faizel 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: X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1724084601925116600 Content-Type: text/plain; charset="utf-8" We make small modifications to the rng files to allow the relaxng-to-proto script to infer XML attribute types better. 1. Make iobase and irq refs so we can override their types in the script. 2. Replace deviceName with absFilePath so that vdpa devices get fuzzed corr= ectly with file paths. 3. The relaxng-to-proto script does not handle regexes, so convert some of = them to containing . Signed-off-by: Rayhan Faizel --- src/conf/schemas/basictypes.rng | 20 ++++++++++++++------ src/conf/schemas/domaincommon.rng | 11 +++++++---- src/conf/schemas/networkcommon.rng | 14 ++++++++------ 3 files changed, 29 insertions(+), 16 deletions(-) diff --git a/src/conf/schemas/basictypes.rng b/src/conf/schemas/basictypes.= rng index 2931e316b7..db05c085fe 100644 --- a/src/conf/schemas/basictypes.rng +++ b/src/conf/schemas/basictypes.rng @@ -555,19 +555,27 @@ =20 + + + 0x[a-fA-F0-9]{1,4} + + + + + + 0x[a-fA-F0-9] + + + - - 0x[a-fA-F0-9]{1,4} - + - - 0x[a-fA-F0-9] - + diff --git a/src/conf/schemas/domaincommon.rng b/src/conf/schemas/domaincom= mon.rng index 05ba697924..d635d2b179 100644 --- a/src/conf/schemas/domaincommon.rng +++ b/src/conf/schemas/domaincommon.rng @@ -3670,7 +3670,7 @@ - + @@ -8495,9 +8495,12 @@ - - (vepa|bridge|private|passthrough) - + + vepa + bridge + private + passthrough + diff --git a/src/conf/schemas/networkcommon.rng b/src/conf/schemas/networkc= ommon.rng index 6df6d43f54..0254bac693 100644 --- a/src/conf/schemas/networkcommon.rng +++ b/src/conf/schemas/networkcommon.rng @@ -199,14 +199,16 @@ - - (tcp)|(udp) - + + tcp + udp + - - (ipv4)|(ipv6) - + + ipv4 + ipv6 + =20 --=20 2.34.1