From nobody Mon May 6 02:13:40 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=1667311386; cv=none; d=zohomail.com; s=zohoarc; b=KGJbl3bG501U6+vFmuMj43sl/20/6f/cgBnEfvx+fyF2koQNrqC9bbNfILB2PbSYjJBqX/3ZURj0DtaC3vwTw5mPOM6udOCMUkmXeYij9ajNgMB27ua8suNdI98vo6GWEgiz7pm7bV5La2DhugRbuptebFQrX75NJpt7XoIhXSQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1667311386; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=t2ghnfaBzgjxkhk0WMxJv2yOTNxFKun9HxtBltSL7Ic=; b=A0TskryGmgKOx9r/q7tB0YJ0VjYCh5QwDARP2y4gOJ0/jsFFY0tJgXElcl2HQ6MVWBWU7GI8qAXnx/y/rd+Pmv8ZSB70c4omnx/5c4p0NvdBz/d4yW3Nzo73dxDsBbOHiaMd/37gBo9Z+zHBHZ5+Fd0e8c418GG3ySlfKMZuHAY= 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) 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 1667311386049976.2703876974043; Tue, 1 Nov 2022 07:03:06 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-563-0AMKU_1ePZazj1lEtAJyLA-1; Tue, 01 Nov 2022 10:02:09 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 0292888B7B8; Tue, 1 Nov 2022 14:01:57 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (unknown [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 302CA2022EA2; Tue, 1 Nov 2022 14:01:56 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id A7E071946A62; Tue, 1 Nov 2022 14:01:54 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id A82C31946594 for ; Tue, 1 Nov 2022 14:01:53 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 99639200B42E; Tue, 1 Nov 2022 14:01:53 +0000 (UTC) Received: from speedmetal.lan (ovpn-208-27.brq.redhat.com [10.40.208.27]) by smtp.corp.redhat.com (Postfix) with ESMTP id 0B42D2028E90 for ; Tue, 1 Nov 2022 14:01:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1667311383; 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: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=t2ghnfaBzgjxkhk0WMxJv2yOTNxFKun9HxtBltSL7Ic=; b=QMQEAl5QFa2M8y6xQSoNPOt+PCng2PsXdsp+0a+w8rgVyTzO6K319xRbQKDXb4VYDVfB07 C8j+1l4jOJjoRy4JAVM8UJwftIKnI+16ivYa6A+xvIy5JXiWqLQLkUvE1LfMB/fHAA2xaa l/CvFQ4/kBcVoAkv1wepkj8wmHArZXI= X-MC-Unique: 0AMKU_1ePZazj1lEtAJyLA-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 01/12] virschematest: Test 'nodedevxml2xmlout' directory Date: Tue, 1 Nov 2022 15:01:39 +0100 Message-Id: <37a9890a19b7a3ab54bf8beab40fcc55e7c3a705.1667310693.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.4 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 3.1 on 10.11.54.4 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1667311388260100003 Content-Type: text/plain; charset="utf-8" Test the output files against the RNG schema. Signed-off-by: Peter Krempa Reviewed-by: J=C3=A1n Tomko --- tests/virschematest.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/virschematest.c b/tests/virschematest.c index cae502a338..3c91bd37bb 100644 --- a/tests/virschematest.c +++ b/tests/virschematest.c @@ -280,6 +280,7 @@ static const struct testSchemaEntry schemaNetworkport[]= =3D { static const struct testSchemaEntry schemaNodedev[] =3D { { .dir =3D "tests/nodedevschemadata" }, + { .dir =3D "tests/nodedevxml2xmlout" }, { .file =3D "examples/xml/test/testdev.xml" }, }; --=20 2.38.1 From nobody Mon May 6 02:13:40 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) client-ip=170.10.129.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.129.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=1667311387; cv=none; d=zohomail.com; s=zohoarc; b=iNifz7dXVzEUX2oM2fLXV/gkkZV+1Gk9i4q/s2Qli1zEjPrhj+h6obBWxJo9erph7AYA3M2tcugynNl8WcEbo9qPxkeEvzeTCWDC+TMUJ/PDELCSFy2wSFIOeNFbT/a/oWrQ0vnlZStVrlyTywrDP57WT26RtSnXPctv4rOLOeg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1667311387; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=iXkwM28raeJEd0HZ8vYKZ923DZo8J48zplm8UWZTsLk=; b=LBrMFuKYSl46mgR7rA6+qACdodQGqt/g3RgPSGXI1HkwezosamEsDho+R0y9+7ou4Ei7n9qI0OjZV79XLFmhAZEO91lAwDL/w9KfATyA+sDiti+B2hhGl7pTucy07Olnu5V9bd3c1SQ/xwN9Hn0fPjFoS4lsDAP1tfPthN7oNeM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.zohomail.com with SMTPS id 1667311387711108.04842195576373; Tue, 1 Nov 2022 07:03:07 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-67-5oosTML5P_KAUtY_-4ISrQ-1; Tue, 01 Nov 2022 10:02:02 -0400 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 035CD2932495; Tue, 1 Nov 2022 14:01:57 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (unknown [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 7EC901415123; Tue, 1 Nov 2022 14:01:56 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 9BA481946A45; Tue, 1 Nov 2022 14:01:55 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id A19F51946A5A for ; Tue, 1 Nov 2022 14:01:54 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 97DAE2024CC0; Tue, 1 Nov 2022 14:01:54 +0000 (UTC) Received: from speedmetal.lan (ovpn-208-27.brq.redhat.com [10.40.208.27]) by smtp.corp.redhat.com (Postfix) with ESMTP id 08CBC200BA7D for ; Tue, 1 Nov 2022 14:01:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1667311385; 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: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=iXkwM28raeJEd0HZ8vYKZ923DZo8J48zplm8UWZTsLk=; b=LwDif6h5jzBVRZDq7ZzcNS5Dc1ZjS/A77JSXYxjLlqFj5gGrQHco4fTQ0AeMwKXocPNXak ctF4ObhYkh/6h1HnGj09BYRXqKyrf7+Megu0Y+1who6cN/r+wShssUQ5obKna2VgxTpZo0 TB/QdSkX84D4qn3CC4s/7IcJqujVtys= X-MC-Unique: 5oosTML5P_KAUtY_-4ISrQ-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 02/12] qemustatusxml2xml: Remove obsolete 'json' attribute Date: Tue, 1 Nov 2022 15:01:40 +0100 Message-Id: <8b9dfbaccbe2e21ae5803d26b3f29ef7f228122c.1667310693.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.4 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 3.1 on 10.11.54.7 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1667311388268100004 Content-Type: text/plain; charset="utf-8" We no longer support HMP-only qemus. Remove the leftover attribute from the test files. Signed-off-by: Peter Krempa Reviewed-by: J=C3=A1n Tomko --- tests/qemustatusxml2xmldata/migration-out-nbd-in.xml | 2 +- tests/qemustatusxml2xmldata/migration-out-nbd-tls-in.xml | 2 +- tests/qemustatusxml2xmldata/upgrade-in.xml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/qemustatusxml2xmldata/migration-out-nbd-in.xml b/tests/q= emustatusxml2xmldata/migration-out-nbd-in.xml index 636accf054..95eca028e9 100644 --- a/tests/qemustatusxml2xmldata/migration-out-nbd-in.xml +++ b/tests/qemustatusxml2xmldata/migration-out-nbd-in.xml @@ -1,6 +1,6 @@ - + diff --git a/tests/qemustatusxml2xmldata/migration-out-nbd-tls-in.xml b/tes= ts/qemustatusxml2xmldata/migration-out-nbd-tls-in.xml index 2cd6c9a5e9..2e37184715 100644 --- a/tests/qemustatusxml2xmldata/migration-out-nbd-tls-in.xml +++ b/tests/qemustatusxml2xmldata/migration-out-nbd-tls-in.xml @@ -1,6 +1,6 @@ - + diff --git a/tests/qemustatusxml2xmldata/upgrade-in.xml b/tests/qemustatusx= ml2xmldata/upgrade-in.xml index 7fa56429f4..6e00bb5ddf 100644 --- a/tests/qemustatusxml2xmldata/upgrade-in.xml +++ b/tests/qemustatusxml2xmldata/upgrade-in.xml @@ -1,5 +1,5 @@ - + --=20 2.38.1 From nobody Mon May 6 02:13:40 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) client-ip=170.10.129.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.129.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=1667311333; cv=none; d=zohomail.com; s=zohoarc; b=QquFYIbvoJIIRvq6Y2gVRtQEExMU5QjN2fUPlkJo8XZhV1XjzBO1Z1mORou4d8siI5vVQAhVKlGowEKWOC2q2sg2rT2bpEUOKGk8eU9YyheETWdSKN4AD2qFeK6Y8mwZu13MgchYkk3Kcx2PYaYvPNvtVjRXZ4vNFhTeJHOYPGA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1667311333; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=US7VsMgblVCkf+2IG0SFv9cJVcMVJgDi7V6G9smKoJc=; b=ixy+uejAtJpL133Uag+s1SpAK7kgBQZ9I1ihD/c6+6+vpMuTVeZ3uj189p59e1rgRRBWZ+uHC05n3ZoFC2Xm/h5HglHRhm2QVoaBtGYl2f13vU/asHgYLUNqSV3CQky5Sjk1sNw6GzA96jgTrOIQM89CawqzC+ke3YfrAy+lkAQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.zohomail.com with SMTPS id 1667311333277178.07755817039754; Tue, 1 Nov 2022 07:02:13 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-513-z6UHWAy3PPC594O0GtQBZg-1; Tue, 01 Nov 2022 10:02:04 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 39D7E1C0A135; Tue, 1 Nov 2022 14:01:57 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (unknown [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 2509640C83EC; Tue, 1 Nov 2022 14:01:57 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id F21291946A42; Tue, 1 Nov 2022 14:01:56 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 9FDA31946A74 for ; Tue, 1 Nov 2022 14:01:55 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 9602C2022C3D; Tue, 1 Nov 2022 14:01:55 +0000 (UTC) Received: from speedmetal.lan (ovpn-208-27.brq.redhat.com [10.40.208.27]) by smtp.corp.redhat.com (Postfix) with ESMTP id F1BD12028DC1 for ; Tue, 1 Nov 2022 14:01:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1667311332; 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: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=US7VsMgblVCkf+2IG0SFv9cJVcMVJgDi7V6G9smKoJc=; b=E34QvOOhlxBcb/3DHPsydsRlD9vfsV6HrJTUiEgeu0SLX59tygiZheOOXW1gwhZ4zOA9Yf jVRBqEBF/roLUTN8CEH/HGFkjeSuyCgAePuZpkvTjKAb/uDhwewbjCYGVijmFq/u9dFkKV 6Pq4+0ONqW2WgwL5pXiiKhquHjTh7Ss= X-MC-Unique: z6UHWAy3PPC594O0GtQBZg-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 03/12] util: xml: Refactor cleanup path in virXMLValidatorInit Date: Tue, 1 Nov 2022 15:01:41 +0100 Message-Id: <623dc1b4e20522ff5ee356d472bf06d9a9ad4a52.1667310693.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.4 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 3.1 on 10.11.54.1 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1667311334210100001 Content-Type: text/plain; charset="utf-8" Automatically free 'validator' on errors. Signed-off-by: Peter Krempa Reviewed-by: J=C3=A1n Tomko --- src/util/virxml.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/src/util/virxml.c b/src/util/virxml.c index 35c0340779..e9595da97d 100644 --- a/src/util/virxml.c +++ b/src/util/virxml.c @@ -1608,7 +1608,7 @@ virXMLValidatorRNGErrorIgnore(void *ctx G_GNUC_UNUSED, virXMLValidator * virXMLValidatorInit(const char *schemafile) { - virXMLValidator *validator =3D NULL; + g_autoptr(virXMLValidator) validator =3D NULL; validator =3D g_new0(virXMLValidator, 1); @@ -1619,7 +1619,7 @@ virXMLValidatorInit(const char *schemafile) virReportError(VIR_ERR_INTERNAL_ERROR, _("Unable to create RNG parser for %s"), validator->schemafile); - goto error; + return NULL; } xmlRelaxNGSetParserErrors(validator->rngParser, @@ -1632,25 +1632,22 @@ virXMLValidatorInit(const char *schemafile) _("Unable to parse RNG %s: %s"), validator->schemafile, virBufferCurrentContent(&validator->buf)); - goto error; + return NULL; } if (!(validator->rngValid =3D xmlRelaxNGNewValidCtxt(validator->rng)))= { virReportError(VIR_ERR_INTERNAL_ERROR, _("Unable to create RNG validation context %s"), validator->schemafile); - goto error; + return NULL; } xmlRelaxNGSetValidErrors(validator->rngValid, virXMLValidatorRNGErrorCatch, virXMLValidatorRNGErrorIgnore, &validator->buf); - return validator; - error: - virXMLValidatorFree(validator); - return NULL; + return g_steal_pointer(&validator); } --=20 2.38.1 From nobody Mon May 6 02:13:40 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=1667311329; cv=none; d=zohomail.com; s=zohoarc; b=Qkeai/Xh9QWee3Fo4RSwVsPoWk7dSa/7gt6TMAD7/y6sLn3MM3eqQKD0HvKR88UGc8csH2yMyxW8se4A4gTZepT+MnXD6ettAVPdQOXUsAC/wDBzaOA7CQncJz+uMJNaesP8aVKbgOTclCmMi+T//AJhSDaduvW5/9xqKqJ9c0g= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1667311329; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=zrmTWGG4gBN+C9pOrP72ZTwCwoomOq9OJX/EwSEBFJk=; b=mf75AD3PGU4Ys/lMh0Cem7Qxumx2b8yR1RKVpF1pH3VY/F0M59XwrckVOVpvOZbYc+loAH9pzRW5RmonKS1KX6ha14j/BeXiU96JgMY2yVCJb2hZGI2zyr2HNUeBGc64/gsVkdO9AdxpM/2jdez02g2x1O/UxyoKHHqAW1HgqXU= 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) 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 1667311329448449.80572943284835; Tue, 1 Nov 2022 07:02:09 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-400-AUyop6iGN8GpsT65sqawfw-1; Tue, 01 Nov 2022 10:02:02 -0400 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 23B311C0A115; Tue, 1 Nov 2022 14:01:58 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (unknown [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 100D44B3FC6; Tue, 1 Nov 2022 14:01:58 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id E95AE19465B3; Tue, 1 Nov 2022 14:01:57 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id A73A41946594 for ; Tue, 1 Nov 2022 14:01:56 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 8531B2024CC0; Tue, 1 Nov 2022 14:01:56 +0000 (UTC) Received: from speedmetal.lan (ovpn-208-27.brq.redhat.com [10.40.208.27]) by smtp.corp.redhat.com (Postfix) with ESMTP id E836C200BA7D for ; Tue, 1 Nov 2022 14:01:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1667311327; 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: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=zrmTWGG4gBN+C9pOrP72ZTwCwoomOq9OJX/EwSEBFJk=; b=EHJaM1fqnGdIEqDyKWArS2PYVbuzl3xChwt63HGPwqddrqzXeXa1p/O/qxxUhQQm3ss8YE cL37/nbzUVlGqK3Wj5mjXEgnyAO9vQvx3TjV8ELy7ILz2kp3qkGaDkOfXw0efdXU3G0oOj 4kwT7P82sRV97l6jkSOgA/p5RNyu6z0= X-MC-Unique: AUyop6iGN8GpsT65sqawfw-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 04/12] util: xml: Refactor cleanup in virXMLValidateAgainstSchema Date: Tue, 1 Nov 2022 15:01:42 +0100 Message-Id: <7799989bdef4bfe7576802dae10c519321dea426.1667310693.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.4 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 3.1 on 10.11.54.9 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1667311330051100003 Content-Type: text/plain; charset="utf-8" Use automatic freeing of the validator context to remove 'ret'/'cleanup:'. Signed-off-by: Peter Krempa Reviewed-by: J=C3=A1n Tomko --- src/util/virxml.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/util/virxml.c b/src/util/virxml.c index e9595da97d..a2fe2e6b6d 100644 --- a/src/util/virxml.c +++ b/src/util/virxml.c @@ -1671,19 +1671,15 @@ int virXMLValidateAgainstSchema(const char *schemafile, xmlDocPtr doc) { - virXMLValidator *validator =3D NULL; - int ret =3D -1; + g_autoptr(virXMLValidator) validator =3D NULL; if (!(validator =3D virXMLValidatorInit(schemafile))) return -1; if (virXMLValidatorValidate(validator, doc) < 0) - goto cleanup; + return -1; - ret =3D 0; - cleanup: - virXMLValidatorFree(validator); - return ret; + return 0; } --=20 2.38.1 From nobody Mon May 6 02:13:40 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=1667311327; cv=none; d=zohomail.com; s=zohoarc; b=LPf5sNlaaSrYYTaznsGdcsER+huVVMyP4s0IIrihu8FUEQkMZjGKNPmttKOl2JmYvNLjT7M9K4ejF3LTzww+0bHk3SLN8l30bzxMZ7eaN/Te79ycQqGQzUIWXad0vftGf2T7cH9nQH3oTER3GmIR6Xefa+vxPNd6AF9ME1AjdIQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1667311327; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=ePpcWCcTibH3aExjdcYYAmukh5CJAJYzaOU3+VMTY1g=; b=QIuyUG5OZN3E2KRiaWMlkpSXdEaVRtvtVez2+/Kik3IB2U6MHchVd3ZIakpg98kQoLJtRVb7yZunhfHYgtfmjByppqNqaYRdWiIsbbfQsDqnkkVF33/EP48v9b/5B7s9cNuSDusfxhT1p9997sHYPFHb6L8jWi9yubVCtHDz7gM= 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) 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 1667311327395410.88925252770025; Tue, 1 Nov 2022 07:02:07 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-352-g0SrNYz0NAeUkIV8Zj5Vvw-1; Tue, 01 Nov 2022 10:02:02 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 897FF1C0A125; Tue, 1 Nov 2022 14:01:58 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (unknown [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 7161E40C955A; Tue, 1 Nov 2022 14:01:58 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 498E41946A45; Tue, 1 Nov 2022 14:01:58 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 9400E19465B3 for ; Tue, 1 Nov 2022 14:01:57 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 8583B2023A1F; Tue, 1 Nov 2022 14:01:57 +0000 (UTC) Received: from speedmetal.lan (ovpn-208-27.brq.redhat.com [10.40.208.27]) by smtp.corp.redhat.com (Postfix) with ESMTP id EA971202323C for ; Tue, 1 Nov 2022 14:01:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1667311326; 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: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=ePpcWCcTibH3aExjdcYYAmukh5CJAJYzaOU3+VMTY1g=; b=QNbzL6OHcGs7xkwF47yOZ4BZxZUnl09qVL4mgFXdQwV+i8vjdd5oG/WiX6nr7HLS9E9ixJ 3RsvpClhgVGEGzeNqMe+K85vTcGz/BgaootOW4Lgxu0OZHMmKsj7GqHsTdU82dg54ibs7H 3FSHc96AkKz5K+aAAcWzdiA3lGZiBEE= X-MC-Unique: g0SrNYz0NAeUkIV8Zj5Vvw-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 05/12] virschematest: Construct path to the schema in the SCHEMAS_PATH Date: Tue, 1 Nov 2022 15:01:43 +0100 Message-Id: <4a72ac01a9f782fd0f1b094addb84ce604650706.1667310693.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.4 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 3.1 on 10.11.54.2 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1667311328070100001 Content-Type: text/plain; charset="utf-8" 'abs_top_srcdir' can be prepended to the schema in the macro. Apart from removing one needles string copy it will also allow pointing to schema files in the builddir which will come handy in upcoming patches. Signed-off-by: Peter Krempa Reviewed-by: J=C3=A1n Tomko --- tests/virschematest.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/tests/virschematest.c b/tests/virschematest.c index 3c91bd37bb..2a89f6a1c0 100644 --- a/tests/virschematest.c +++ b/tests/virschematest.c @@ -151,13 +151,10 @@ testSchemaGrammarReport(const void *opaque) static virXMLValidator * testSchemaGrammarLoad(const char *schema) { - g_autofree char *schema_path =3D NULL; g_autofree char *testname =3D NULL; virXMLValidator *ret; - schema_path =3D g_strdup_printf("%s/%s", abs_top_srcdir, schema); - - ret =3D virXMLValidatorInit(schema_path); + ret =3D virXMLValidatorInit(schema); testname =3D g_strdup_printf("test schema grammar file: '%s'", schema); @@ -335,7 +332,7 @@ mymain(void) { int ret =3D 0; -#define SCHEMAS_PATH "src/conf/schemas/" +#define SCHEMAS_PATH abs_top_srcdir "/src/conf/schemas/" #define DO_TEST(sch, ent) \ if (testSchemaEntries((sch), (ent), G_N_ELEMENTS(ent)) < 0) \ --=20 2.38.1 From nobody Mon May 6 02:13:40 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=1667311331; cv=none; d=zohomail.com; s=zohoarc; b=nb9wemgLFtoX9MeFGWe3UUNoEAgO95a87/Gfbf/ysq0vowQqhV4krV1/aAliKibfWvp9TTsx0X0O/GLZIJAvsWnepYUU3YEF0MgAkCg5CjOhP7J8LLV52xAPKefGU1c5XXKQypwOYsfFIrkoK7JWd9p27A85j30WWoulW+MYnCE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1667311331; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=DWWSH/fZRQkmKPsveMXz6FnQBDWOacHQ3ovw2Z9wMgc=; b=CiuCyKCKqi++dHgBvcXT5ANBxNlcHnEyvo6uCUDBFiCcBcLmhIpdBGoypfwDYVDBut+F+1cRNTL/BdtvZkSfyWAllP+TDQ9vvk5d9n7kLOSIAzqHaWBBgCJM5crZz+upM0FwV+iCo0FDWfhAsMEfIWXnRBSsAkP4Tuol1I97MK0= 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) 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 1667311331773972.8472452754021; Tue, 1 Nov 2022 07:02:11 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-340-7wjyKI89O5aFtrJfpAGWUQ-1; Tue, 01 Nov 2022 10:02:08 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id C79B8101B44C; Tue, 1 Nov 2022 14:02:00 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (unknown [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id AA83140C955B; Tue, 1 Nov 2022 14:02:00 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 9B2EB1946A4E; Tue, 1 Nov 2022 14:02:00 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 8D53B1946A4D for ; Tue, 1 Nov 2022 14:01:58 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 7F9B820290A6; Tue, 1 Nov 2022 14:01:58 +0000 (UTC) Received: from speedmetal.lan (ovpn-208-27.brq.redhat.com [10.40.208.27]) by smtp.corp.redhat.com (Postfix) with ESMTP id E4574202E9E2 for ; Tue, 1 Nov 2022 14:01:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1667311330; 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: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=DWWSH/fZRQkmKPsveMXz6FnQBDWOacHQ3ovw2Z9wMgc=; b=YcI6iayAY/UHWUvJ1us4i4HlehwgVh8W2Z61lPo4OEmOBqj8ow/ZJia/mdRkK+tKi8R48x RDtMGvUC6ecmVPAVT1nyGCzVUxDVh1YDCHyLUqhmG7rlBU86ImObQfanck5lPVxIzps+/b j3RBsR1TBQ0TIFQq/jFZn7HBM4W1DKE= X-MC-Unique: 7wjyKI89O5aFtrJfpAGWUQ-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 06/12] virschematest: Improve testing schemas in 'tests/cputestdata' Date: Tue, 1 Nov 2022 15:01:44 +0100 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.4 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 3.1 on 10.11.54.2 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1667311334213100002 Content-Type: text/plain; charset="utf-8" The 'cputestdata' directory has a collection of XML files with very complicated naming schemes for various input and output XML files. Rather than trying to write complex regexes for selecting specific files which diverged already multiple times we can introduce an internal schema file which will cover all of the 3 top level elements used in the XML files. Schema for is taken from our main RNG schema, is just a collection of elements, and finally is a simple enough to describe inline. To keep the validator happy we have to generate the schema file to place full paths for the included documents. Signed-off-by: Peter Krempa Reviewed-by: J=C3=A1n Tomko --- tests/meson.build | 1 + tests/schemas/cpu-baseline.rng.in | 84 +++++++++++++++++++++++++++++++ tests/schemas/meson.build | 16 ++++++ tests/virschematest.c | 13 ++--- 4 files changed, 106 insertions(+), 8 deletions(-) create mode 100644 tests/schemas/cpu-baseline.rng.in create mode 100644 tests/schemas/meson.build diff --git a/tests/meson.build b/tests/meson.build index 1149211756..3365dce307 100644 --- a/tests/meson.build +++ b/tests/meson.build @@ -208,6 +208,7 @@ tests_deps +=3D executable( ], ) +subdir('schemas') # build and define libvirt tests diff --git a/tests/schemas/cpu-baseline.rng.in b/tests/schemas/cpu-baseline= .rng.in new file mode 100644 index 0000000000..1a3b19a45b --- /dev/null +++ b/tests/schemas/cpu-baseline.rng.in @@ -0,0 +1,84 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + x86 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/schemas/meson.build b/tests/schemas/meson.build new file mode 100644 index 0000000000..33c16bb2fb --- /dev/null +++ b/tests/schemas/meson.build @@ -0,0 +1,16 @@ +# we need to replace proper paths to our schemas in the test schemas +virschematest_test_schemas_conf =3D configuration_data({ + 'SCHEMADIR': meson.project_source_root() / 'src' / 'conf' / 'schemas', +}) + +virschematest_schemas =3D [ + 'cpu-baseline.rng.in', +] + +foreach file : virschematest_schemas + configure_file( + input: file, + output: '@BASENAME@', + configuration: virschematest_test_schemas_conf, + ) +endforeach diff --git a/tests/virschematest.c b/tests/virschematest.c index 2a89f6a1c0..29a1d59134 100644 --- a/tests/virschematest.c +++ b/tests/virschematest.c @@ -318,13 +318,8 @@ static const struct testSchemaEntry schemaStorageVol[]= =3D { { .file =3D "examples/xml/test/testvol.xml" }, }; -static const struct testSchemaEntry schemaCpu[] =3D { - { . dir =3D "tests/cputestdata", - . dirRegex =3D "^[^-]+-cpuid-.*(-host|-guest|-json)\\.xml$" }, - { . dir =3D "tests/cputestdata", - . dirRegex =3D "^[^-]+-baseline-.*-result\\.xml$" }, - { . dir =3D "tests/cputestdata", - . dirRegex =3D "^[^-]+-(?!cpuid|baseline).*$" }, +static const struct testSchemaEntry testsCpuBaseline[] =3D { + { . dir =3D "tests/cputestdata" }, }; static int @@ -333,6 +328,7 @@ mymain(void) int ret =3D 0; #define SCHEMAS_PATH abs_top_srcdir "/src/conf/schemas/" +#define INTERNAL_SCHEMAS_PATH abs_builddir "/schemas/" #define DO_TEST(sch, ent) \ if (testSchemaEntries((sch), (ent), G_N_ELEMENTS(ent)) < 0) \ @@ -354,7 +350,8 @@ mymain(void) DO_TEST(SCHEMAS_PATH "storagepoolcaps.rng", schemaStoragepoolcaps); DO_TEST(SCHEMAS_PATH "storagepool.rng", schemaStoragePool); DO_TEST(SCHEMAS_PATH "storagevol.rng", schemaStorageVol); - DO_TEST(SCHEMAS_PATH "cpu.rng", schemaCpu); + + DO_TEST(INTERNAL_SCHEMAS_PATH "cpu-baseline.rng", testsCpuBaseline); return ret =3D=3D 0 ? EXIT_SUCCESS : EXIT_FAILURE; } --=20 2.38.1 From nobody Mon May 6 02:13:40 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) client-ip=170.10.129.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.129.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=1667311399; cv=none; d=zohomail.com; s=zohoarc; b=aMgNCvzV3m3rl8tgVI8Qw2+q5Uzj2mu31XwSMxQof0cHezt3UFF0liiesJgf5a38qaTWMRJVEYTg01z8vpn8wURLARtFkmPTFbZqQ2Oj6ELEf1ALoIErjAU/iLTYOUFC6bGbZaUzWEYiLbZiswBGS1zTZ/Jzzdt8HePKCkUvUOM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1667311399; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=Bq10VW+VNignXHCt3tndmd+iJdpayIUrEzp/jN0t5N8=; b=Jy2bMSYOSKx1NXDWwE4E7kIR1ITqNP0EKK2TqmQMW+qmPcvpUI69XHL15jr/kYPOrvruHZXi/PIfkIJ5G1SiKYUo2L5FPQYFBTlexyJzWzFSFXFZjf+0M13749+yEdjdmBhcjP82XEbTI5qHioRiAPD1Sd/3A7/vVLEgZ4MpJII= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.zohomail.com with SMTPS id 1667311399060465.1877472107477; Tue, 1 Nov 2022 07:03:19 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-253-eTSyWabsMvCajjjEwMtaSA-1; Tue, 01 Nov 2022 10:02:20 -0400 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 792D9848558; Tue, 1 Nov 2022 14:02:00 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (unknown [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 66A3246EE10; Tue, 1 Nov 2022 14:02:00 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 43DBD19465B3; Tue, 1 Nov 2022 14:02:00 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id A21001946594 for ; Tue, 1 Nov 2022 14:01:59 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 8077620290AD; Tue, 1 Nov 2022 14:01:59 +0000 (UTC) Received: from speedmetal.lan (ovpn-208-27.brq.redhat.com [10.40.208.27]) by smtp.corp.redhat.com (Postfix) with ESMTP id DB685200B42E for ; Tue, 1 Nov 2022 14:01:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1667311398; 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: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=Bq10VW+VNignXHCt3tndmd+iJdpayIUrEzp/jN0t5N8=; b=F3RJ4OYBL616pnrfNWOgb0Y6zYwu+Adw2lBLoSpCeEm6NJJWf3Oj7VNNiQhzUWq9otxcLy bTjADrYcZkY4L6ynSr6I3pIreRsa1fxUoBeRVTz1PxvEZ9b6yDQkWcwdodCLck78mFf85s uHqdoIqieyoBfwBeGK3WE8RkS7MEfxM= X-MC-Unique: eTSyWabsMvCajjjEwMtaSA-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 07/12] schema: Introduce scaffolding for schema for elements Date: Tue, 1 Nov 2022 15:01:45 +0100 Message-Id: <02d97c200652be6b41286d85474fce092597fe25.1667310693.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.4 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 3.1 on 10.11.54.9 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1667311400349100001 Content-Type: text/plain; charset="utf-8" Libvirt internally (e.g. in the status XML) stores additional data for various objects described by the XML. The data is usually stored in or similar sub-elements. This patch adds possibility for internal schema files to describe the elements by schema while still disallowing them for the public schema. This patch adds definitions for private data of and the corresponding storage source of a disk. Signed-off-by: Peter Krempa Reviewed-by: J=C3=A1n Tomko --- src/conf/schemas/domaincommon.rng | 3 +++ src/conf/schemas/privatedata.rng | 30 ++++++++++++++++++++++++++++++ 2 files changed, 33 insertions(+) create mode 100644 src/conf/schemas/privatedata.rng diff --git a/src/conf/schemas/domaincommon.rng b/src/conf/schemas/domaincom= mon.rng index ebdf21fe99..85e2e0c57b 100644 --- a/src/conf/schemas/domaincommon.rng +++ b/src/conf/schemas/domaincommon.rng @@ -6,6 +6,7 @@ + + + + + + + + + + + + + + + + + + + --=20 2.38.1 From nobody Mon May 6 02:13:40 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) client-ip=170.10.129.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.129.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=1667311664; cv=none; d=zohomail.com; s=zohoarc; b=ga4m0mdaLXXZIdE5bQo1AY1Sly94EUCP90O0ElkrY6aeSyT6fCSAx21/pEULskDGR2Dnnq6jm9nY/SQ3oT/fOvuNmwSJclE0gpuWSpcvBIMJNIFNCPTS4z7YPB87j25Uwq9Gg34ejpr0GYhNvWkvhHRDSbkNokfAYQ7NmI2Km+4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1667311664; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=j8QXH1JTaaf3a4+XiZUB5FUU8JL7zoHzrQzutVNNnBc=; b=MCPCyMmScnikG8T7W43HylHVZiNpaDiKqaHm0t5SxoTG5Al5Yq5ZVyoMMh2M/3XXXFVX0Yixy8Jn71DMpwKEBH7UHbIDwuxWpzX9IbqHpIm4gn6kMKLIlObPMwuTKQaXE/IBbDPiX1FGaxsavBhpgBbTD2KRcGZudAjasiBo6eU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.zohomail.com with SMTPS id 1667311664082861.9287968755647; Tue, 1 Nov 2022 07:07:44 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-643-lpeKJAjrOPmqKp6oY-Twdw-1; Tue, 01 Nov 2022 10:03:17 -0400 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id ABFCA3C10682; Tue, 1 Nov 2022 14:02:01 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (unknown [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 988A9477F64; Tue, 1 Nov 2022 14:02:01 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 8988919465B3; Tue, 1 Nov 2022 14:02:01 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id A2FD21946A52 for ; Tue, 1 Nov 2022 14:02:00 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 9155D200B42E; Tue, 1 Nov 2022 14:02:00 +0000 (UTC) Received: from speedmetal.lan (ovpn-208-27.brq.redhat.com [10.40.208.27]) by smtp.corp.redhat.com (Postfix) with ESMTP id DDAD420290A6 for ; Tue, 1 Nov 2022 14:01:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1667311635; 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: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=j8QXH1JTaaf3a4+XiZUB5FUU8JL7zoHzrQzutVNNnBc=; b=KtTbGblzxupk0wrI30C0k6PTokksiJ8g+paw87s/nBU56ibDK4Wuc5fi6teX6SeSlU3CNr KVT3KQNIRBQu0maYNeFlrmCNX6wPkPvMtDVadSZ1H0nuWODgruIr+jJ3aSZphnOL3K7Xmy 8kC3Qi3eFR+hYdS3UaR869XZbDvQK8k= X-MC-Unique: lpeKJAjrOPmqKp6oY-Twdw-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 08/12] qemublocktestdata: Fix 'block-raw-reservations' case Date: Tue, 1 Nov 2022 15:01:46 +0100 Message-Id: <31332af5766a00c4314af514dba1b38a7403a6d1.1667310693.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.4 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 3.1 on 10.11.54.9 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1667311664655100001 Content-Type: text/plain; charset="utf-8" The 'reservations' element doesn't have an 'enabled' attribute according to our schema, remove it. Signed-off-by: Peter Krempa Reviewed-by: J=C3=A1n Tomko --- tests/qemublocktestdata/xml2json/block-raw-reservations.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/qemublocktestdata/xml2json/block-raw-reservations.xml b/= tests/qemublocktestdata/xml2json/block-raw-reservations.xml index 3ebfe61186..bf59137fd4 100644 --- a/tests/qemublocktestdata/xml2json/block-raw-reservations.xml +++ b/tests/qemublocktestdata/xml2json/block-raw-reservations.xml @@ -1,7 +1,7 @@ - + --=20 2.38.1 From nobody Mon May 6 02:13:40 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=1667311360; cv=none; d=zohomail.com; s=zohoarc; b=ekLObRgzv8VcGWuObYY+YZ8hvbAD5Gq3t7e3tH/w7S5BGTWUKS9mLVfShpdfyL5QzZg7D2j9DQC9VhUO1hhiiiWtiEEfKZ36WpHvs899tv6isvLgSKR3mh0dHb4AgqvW0BE4jx7woYGuK3zeISI0tPYVAKnaffBPeQPcdyYlwak= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1667311360; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=mo54vDCmVGAViouI3F3FNLg+OScQPkyPXvJpCeLQFR0=; b=ZryBP0Xe5/N4NrPb0SJg46aEL5PyyX0iE3i1Uy1JRA9LE7Qjcj1TZczrqTlYqtSXvrCqsF0C0iGTHWos5H3obvGXhuwmwwEgNtuyEQImXuPLgr7AMe1iGCDZ2r58kU8PoxsQG0zvEvTIkORV8oJr30wJQcmtHKJl3dqxUB1wa2g= 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) 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 1667311360946483.0286770475292; Tue, 1 Nov 2022 07:02:40 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-208-w-GZ1XrDP_CNmSFktWWsyQ-1; Tue, 01 Nov 2022 10:02:13 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 448D4296A607; Tue, 1 Nov 2022 14:02:03 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (unknown [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 31917111DCE7; Tue, 1 Nov 2022 14:02:03 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 0C6F519465B3; Tue, 1 Nov 2022 14:02:03 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id C90D41946A45 for ; Tue, 1 Nov 2022 14:02:01 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id A96DF2028CE4; Tue, 1 Nov 2022 14:02:01 +0000 (UTC) Received: from speedmetal.lan (ovpn-208-27.brq.redhat.com [10.40.208.27]) by smtp.corp.redhat.com (Postfix) with ESMTP id F099720227AD for ; Tue, 1 Nov 2022 14:02:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1667311337; 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: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=mo54vDCmVGAViouI3F3FNLg+OScQPkyPXvJpCeLQFR0=; b=U8EV34A9rwxle2j1UcP3+kaLyQmlraujZeayUtJiGy/jwCWE8rez9AaYTOka4jQTQK0oBA 7yL0DLU6fR4REQTUCqjuM2FEt91yC5GTq645K4AF+nqKn7643HibGotuZAyfrulJeqfup7 q05eyRD9D9H6W504hPKT5XCSCjegpOA= X-MC-Unique: w-GZ1XrDP_CNmSFktWWsyQ-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 09/12] tests: qemublocktestdata/imagecreate: Remove bogus 'name="vda"' attribute from Date: Tue, 1 Nov 2022 15:01:47 +0100 Message-Id: <9585ab838d451ef5b190dba70365c91b4e00e266.1667310693.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.4 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 3.1 on 10.11.54.3 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1667311364777100001 Content-Type: text/plain; charset="utf-8" Signed-off-by: Peter Krempa Reviewed-by: J=C3=A1n Tomko --- tests/qemublocktestdata/imagecreate/luks-encopts.xml | 2 +- tests/qemublocktestdata/imagecreate/luks-noopts.xml | 2 +- tests/qemublocktestdata/imagecreate/network-gluster-qcow2.xml | 2 +- tests/qemublocktestdata/imagecreate/network-rbd-qcow2.xml | 2 +- tests/qemublocktestdata/imagecreate/network-ssh-qcow2.xml | 2 +- tests/qemublocktestdata/imagecreate/qcow2-luks-encopts.xml | 2 +- tests/qemublocktestdata/imagecreate/qcow2-luks-noopts.xml | 2 +- tests/qemublocktestdata/imagecreate/qcow2-slice.xml | 2 +- tests/qemublocktestdata/imagecreate/qcow2.xml | 2 +- tests/qemublocktestdata/imagecreate/raw-nbd.xml | 2 +- tests/qemublocktestdata/imagecreate/raw-slice.xml | 2 +- tests/qemublocktestdata/imagecreate/raw.xml | 2 +- 12 files changed, 12 insertions(+), 12 deletions(-) diff --git a/tests/qemublocktestdata/imagecreate/luks-encopts.xml b/tests/q= emublocktestdata/imagecreate/luks-encopts.xml index bb0ee54adc..15a6038bde 100644 --- a/tests/qemublocktestdata/imagecreate/luks-encopts.xml +++ b/tests/qemublocktestdata/imagecreate/luks-encopts.xml @@ -1,4 +1,4 @@ - + diff --git a/tests/qemublocktestdata/imagecreate/luks-noopts.xml b/tests/qe= mublocktestdata/imagecreate/luks-noopts.xml index ac224b02de..fc4013afcf 100644 --- a/tests/qemublocktestdata/imagecreate/luks-noopts.xml +++ b/tests/qemublocktestdata/imagecreate/luks-noopts.xml @@ -1,4 +1,4 @@ - + diff --git a/tests/qemublocktestdata/imagecreate/network-gluster-qcow2.xml = b/tests/qemublocktestdata/imagecreate/network-gluster-qcow2.xml index f3dbf24180..12d7de0f52 100644 --- a/tests/qemublocktestdata/imagecreate/network-gluster-qcow2.xml +++ b/tests/qemublocktestdata/imagecreate/network-gluster-qcow2.xml @@ -1,4 +1,4 @@ - + diff --git a/tests/qemublocktestdata/imagecreate/network-rbd-qcow2.xml b/te= sts/qemublocktestdata/imagecreate/network-rbd-qcow2.xml index 0f6c1ddb98..63aeaeb9be 100644 --- a/tests/qemublocktestdata/imagecreate/network-rbd-qcow2.xml +++ b/tests/qemublocktestdata/imagecreate/network-rbd-qcow2.xml @@ -1,4 +1,4 @@ - + diff --git a/tests/qemublocktestdata/imagecreate/network-ssh-qcow2.xml b/te= sts/qemublocktestdata/imagecreate/network-ssh-qcow2.xml index 4c44f81c81..046f7892db 100644 --- a/tests/qemublocktestdata/imagecreate/network-ssh-qcow2.xml +++ b/tests/qemublocktestdata/imagecreate/network-ssh-qcow2.xml @@ -1,4 +1,4 @@ - + diff --git a/tests/qemublocktestdata/imagecreate/qcow2-luks-encopts.xml b/t= ests/qemublocktestdata/imagecreate/qcow2-luks-encopts.xml index d6616bd164..0d0315167f 100644 --- a/tests/qemublocktestdata/imagecreate/qcow2-luks-encopts.xml +++ b/tests/qemublocktestdata/imagecreate/qcow2-luks-encopts.xml @@ -1,4 +1,4 @@ - + diff --git a/tests/qemublocktestdata/imagecreate/qcow2-luks-noopts.xml b/te= sts/qemublocktestdata/imagecreate/qcow2-luks-noopts.xml index e2d1c42424..707d86b459 100644 --- a/tests/qemublocktestdata/imagecreate/qcow2-luks-noopts.xml +++ b/tests/qemublocktestdata/imagecreate/qcow2-luks-noopts.xml @@ -1,4 +1,4 @@ - + diff --git a/tests/qemublocktestdata/imagecreate/qcow2-slice.xml b/tests/qe= mublocktestdata/imagecreate/qcow2-slice.xml index 6c5ae3107b..06ce282247 100644 --- a/tests/qemublocktestdata/imagecreate/qcow2-slice.xml +++ b/tests/qemublocktestdata/imagecreate/qcow2-slice.xml @@ -1,4 +1,4 @@ - + diff --git a/tests/qemublocktestdata/imagecreate/qcow2.xml b/tests/qemubloc= ktestdata/imagecreate/qcow2.xml index f3c235f82f..6ca08dda7c 100644 --- a/tests/qemublocktestdata/imagecreate/qcow2.xml +++ b/tests/qemublocktestdata/imagecreate/qcow2.xml @@ -1,4 +1,4 @@ - + diff --git a/tests/qemublocktestdata/imagecreate/raw-nbd.xml b/tests/qemubl= ocktestdata/imagecreate/raw-nbd.xml index 256bf23797..9c5a4a5952 100644 --- a/tests/qemublocktestdata/imagecreate/raw-nbd.xml +++ b/tests/qemublocktestdata/imagecreate/raw-nbd.xml @@ -1,4 +1,4 @@ - + diff --git a/tests/qemublocktestdata/imagecreate/raw-slice.xml b/tests/qemu= blocktestdata/imagecreate/raw-slice.xml index adc7a175ce..f440ba9922 100644 --- a/tests/qemublocktestdata/imagecreate/raw-slice.xml +++ b/tests/qemublocktestdata/imagecreate/raw-slice.xml @@ -1,4 +1,4 @@ - + diff --git a/tests/qemublocktestdata/imagecreate/raw.xml b/tests/qemublockt= estdata/imagecreate/raw.xml index 3a91600bd8..316b7abb12 100644 --- a/tests/qemublocktestdata/imagecreate/raw.xml +++ b/tests/qemublocktestdata/imagecreate/raw.xml @@ -1,4 +1,4 @@ - + --=20 2.38.1 From nobody Mon May 6 02:13:40 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=1667311343; cv=none; d=zohomail.com; s=zohoarc; b=lVWnKUUWMxEfAZqMBef/J0mB36w2Nt7la4diVhBTNUtDGrTdbHTjyk8yWVckdF/W0Z/5zKDSlSu95D3xhTmN3DzaPHtMyjmdf+SOyuqZYZNJS/NLoeirhcMbl6ZQh6plY2RCi2SxkePD9DoMHGe2DSRL3XoQfxb/vRwKPiZFBms= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1667311343; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=u3QSzy0LGjdKj5rCx7HxjhWsSiuyzaa8D9X224vWEq8=; b=BQG3V/rHXGPywCi7LOGbhTWgHc1Fa1IOwbQsiHV1K2tskV2ZfcQluQO0zkRVQPuc7MCxsEJMIbTGn/RTQQbLCpmajb73YxSVZAFC0JwIVXHXkhhEyFSA4/EGOx1xrlQLEDdMBQBy1xzANxsBrktWJMpKeVMZJGM8uzTc/+7MvkQ= 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) 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 1667311343155247.1481415323815; Tue, 1 Nov 2022 07:02:23 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-314-orTuS5CtO5S3GZOngQK_HA-1; Tue, 01 Nov 2022 10:02:16 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 02E421012478; Tue, 1 Nov 2022 14:02:04 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (unknown [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id E433040C94CE; Tue, 1 Nov 2022 14:02:03 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id D188E19465B3; Tue, 1 Nov 2022 14:02:03 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id BBEAB1946594 for ; Tue, 1 Nov 2022 14:02:02 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 9B8FA200B42E; Tue, 1 Nov 2022 14:02:02 +0000 (UTC) Received: from speedmetal.lan (ovpn-208-27.brq.redhat.com [10.40.208.27]) by smtp.corp.redhat.com (Postfix) with ESMTP id 103702022EA2 for ; Tue, 1 Nov 2022 14:02:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1667311341; 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: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=u3QSzy0LGjdKj5rCx7HxjhWsSiuyzaa8D9X224vWEq8=; b=fd64FEMiWBym+XC7nnlem+EkyyZYAsXtpNdp4BNatOjTWghgFDZlycsY5qwvasmmzzdqjG DlxSzpeqhMaJBOKBtU6CceSYquCBWMjpAiWG1e+PcBsL1UIKE32h+xN8jOwKCEzxICD6+t BcaXHewdPHl+n0zMdkYsTccdB1Nenv4= X-MC-Unique: orTuS5CtO5S3GZOngQK_HA-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 10/12] qemublocktest: Mark 'network-ssh-qcow2' input XML as invalid Date: Tue, 1 Nov 2022 15:01:48 +0100 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.4 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 3.1 on 10.11.54.2 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1667311344291100001 Content-Type: text/plain; charset="utf-8" The XML does not conform to the RNG schema as we don't yet expose the 'ssh' protocol officially. Mark the XML as invalid by renaming it. Signed-off-by: Peter Krempa Reviewed-by: J=C3=A1n Tomko --- tests/qemublocktest.c | 2 +- .../{network-ssh-qcow2.json =3D> network-ssh-qcow2-invalid.json} | 0 .../{network-ssh-qcow2.xml =3D> network-ssh-qcow2-invalid.xml} | 0 3 files changed, 1 insertion(+), 1 deletion(-) rename tests/qemublocktestdata/imagecreate/{network-ssh-qcow2.json =3D> ne= twork-ssh-qcow2-invalid.json} (100%) rename tests/qemublocktestdata/imagecreate/{network-ssh-qcow2.xml =3D> net= work-ssh-qcow2-invalid.xml} (100%) diff --git a/tests/qemublocktest.c b/tests/qemublocktest.c index 1c1013d4d9..010b52f4b3 100644 --- a/tests/qemublocktest.c +++ b/tests/qemublocktest.c @@ -1211,7 +1211,7 @@ mymain(void) TEST_IMAGE_CREATE("network-gluster-qcow2", NULL); TEST_IMAGE_CREATE("network-rbd-qcow2", NULL); - TEST_IMAGE_CREATE("network-ssh-qcow2", NULL); + TEST_IMAGE_CREATE("network-ssh-qcow2-invalid", NULL); #define TEST_BITMAP_DETECT(testname) \ do { \ diff --git a/tests/qemublocktestdata/imagecreate/network-ssh-qcow2.json b/t= ests/qemublocktestdata/imagecreate/network-ssh-qcow2-invalid.json similarity index 100% rename from tests/qemublocktestdata/imagecreate/network-ssh-qcow2.json rename to tests/qemublocktestdata/imagecreate/network-ssh-qcow2-invalid.json diff --git a/tests/qemublocktestdata/imagecreate/network-ssh-qcow2.xml b/te= sts/qemublocktestdata/imagecreate/network-ssh-qcow2-invalid.xml similarity index 100% rename from tests/qemublocktestdata/imagecreate/network-ssh-qcow2.xml rename to tests/qemublocktestdata/imagecreate/network-ssh-qcow2-invalid.xml --=20 2.38.1 From nobody Mon May 6 02:13:40 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=1667311390; cv=none; d=zohomail.com; s=zohoarc; b=mAzPAcBHZgGyLJ0RFcRrCbp+aGu/NQ2VDm+RklDahhPmW/ZtG5PDuLE64XDIQ8JlCmMhctP2B50nL+1CUqqiBCwOJAEpDihjA1SWQRJDz+Ik26H4CD1d0tq1ccEUwqo10iPC982RqObX1hRF1O1ZBK/5idey/XfxJT2eW90zbAY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1667311390; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=3Bn3iQInasMVGxQijWb7sf2ULxY8XOzOwD7fwSI+A6M=; b=d4vjgRKkEWn70fNQRd7IVOA5ZP03rgHV/qgBR8Ov3FwN8tvqtpP6okUQVEJ3ZAaiWjr/3ySABAS3+gZSDF4MRQp7JHbmZZOxs4KWNf67C8+xc3OV/7GqjN8/vUtXM/cXjkPvbfUJlKZlsWy6BKjDrgiAxjhbkaw6a6h+50J8+sE= 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) 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 1667311390387233.21658722880227; Tue, 1 Nov 2022 07:03:10 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-640-j6K8ID5yPt-CsldL67j7Qg-1; Tue, 01 Nov 2022 10:02:19 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 4C2731C0A595; Tue, 1 Nov 2022 14:02:04 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (unknown [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 369D420290AF; Tue, 1 Nov 2022 14:02:04 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 1FC181946A42; Tue, 1 Nov 2022 14:02:04 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 9DA3319465B3 for ; Tue, 1 Nov 2022 14:02:03 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 92CFC2022EA2; Tue, 1 Nov 2022 14:02:03 +0000 (UTC) Received: from speedmetal.lan (ovpn-208-27.brq.redhat.com [10.40.208.27]) by smtp.corp.redhat.com (Postfix) with ESMTP id 080D32028CE4 for ; Tue, 1 Nov 2022 14:02:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1667311389; 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: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=3Bn3iQInasMVGxQijWb7sf2ULxY8XOzOwD7fwSI+A6M=; b=hWwaHe9ymSw0Ns/aVViXzq+ZhElTmnQPgUpPR4BtzOA7EXFNRG2y3TOQrqzrixSkVBmxu7 YJvpsSomVmy86FZOs4LK8dFYiqAJRNcATnF3ioMZRuiiziv0XQWVe7415JYFTugTrdKIHa gv1oFjZwsBSrEWpOp7ClcXk/maldn+Q= X-MC-Unique: j6K8ID5yPt-CsldL67j7Qg-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 11/12] schema: Rename definition of disk 'target' element to 'diskTarget' Date: Tue, 1 Nov 2022 15:01:49 +0100 Message-Id: <29f07797d034fe2445def5ccf7b6b66028d93eb8.1667310693.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.4 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 3.1 on 10.11.54.4 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1667311392289100001 Content-Type: text/plain; charset="utf-8" Rename 'diskTarget' to 'diskTargetDev' and then 'target' to 'diskTarget'. This will make it less confusing when overriding the definition. Signed-off-by: Peter Krempa Reviewed-by: J=C3=A1n Tomko --- src/conf/schemas/domainbackup.rng | 4 ++-- src/conf/schemas/domaincheckpoint.rng | 2 +- src/conf/schemas/domaincommon.rng | 9 +++++---- src/conf/schemas/domainsnapshot.rng | 2 +- 4 files changed, 9 insertions(+), 8 deletions(-) diff --git a/src/conf/schemas/domainbackup.rng b/src/conf/schemas/domainbac= kup.rng index 1ac9da62c1..bfc29a6c06 100644 --- a/src/conf/schemas/domainbackup.rng +++ b/src/conf/schemas/domainbackup.rng @@ -157,7 +157,7 @@ - + @@ -227,7 +227,7 @@ - + diff --git a/src/conf/schemas/domaincheckpoint.rng b/src/conf/schemas/domai= ncheckpoint.rng index a1c8b0bb9c..72c4186235 100644 --- a/src/conf/schemas/domaincheckpoint.rng +++ b/src/conf/schemas/domaincheckpoint.rng @@ -55,7 +55,7 @@ - + diff --git a/src/conf/schemas/domaincommon.rng b/src/conf/schemas/domaincom= mon.rng index 85e2e0c57b..ebb39de3ef 100644 --- a/src/conf/schemas/domaincommon.rng +++ b/src/conf/schemas/domaincommon.rng @@ -1512,7 +1512,7 @@ - + @@ -2351,15 +2351,16 @@ - + (ioemu:)?(fd|hd|sd|vd|xvd|ubd)[a-zA-Z0-9_]+<= /param> - + + - + diff --git a/src/conf/schemas/domainsnapshot.rng b/src/conf/schemas/domains= napshot.rng index 3db9f458ba..4048266f1d 100644 --- a/src/conf/schemas/domainsnapshot.rng +++ b/src/conf/schemas/domainsnapshot.rng @@ -127,7 +127,7 @@ - + --=20 2.38.1 From nobody Mon May 6 02:13:40 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) client-ip=170.10.129.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.129.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=1667311385; cv=none; d=zohomail.com; s=zohoarc; b=Jp9zmEL+UhvX1frByx7Gb8oeWPxZCgmOMCGgEFmVc6sUpVIoE04qwL8D83yAya0zMszG7ZZkHwGB3ACb5FLzvK0xksxCrwkYJpzlZCvlXr0uzRrAqmAEDySmyTuexbTZDziD/K00qxEvvGYgSj5ap8nmSAqT3uufSPy2L6t2ARc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1667311385; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=jIFRkWd4Oiq8yiCv6HHsYyZvWznfCBbUPbH1EiTVVcU=; b=akziSJSnxyXQo69QWTRBO03TB7sIumWBG4gGWdUDjUCTmwUXpkw+tCd4aZW9h7pYjHp+tBsJvKuGRM2Lo/9kA3jpidgUdWvxb7TzqsQyapOsapji930Gn0y5XTynGYLln+efnREZ2Bwwhrv6VYov8Rv/KMvK7fFvLcWU8HUT63U= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.zohomail.com with SMTPS id 1667311385104991.8339193813132; Tue, 1 Nov 2022 07:03:05 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-82-8AO6K_tsPSS7Krw3fQBwog-1; Tue, 01 Nov 2022 10:02:20 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id A05A21C0BC60; Tue, 1 Nov 2022 14:02:06 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (unknown [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 8DA5742220; Tue, 1 Nov 2022 14:02:06 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 69D6B19465B3; Tue, 1 Nov 2022 14:02:06 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id C0B3A1946594 for ; Tue, 1 Nov 2022 14:02:04 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 8B1742024CC0; Tue, 1 Nov 2022 14:02:04 +0000 (UTC) Received: from speedmetal.lan (ovpn-208-27.brq.redhat.com [10.40.208.27]) by smtp.corp.redhat.com (Postfix) with ESMTP id EF1872028DC1 for ; Tue, 1 Nov 2022 14:02:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1667311384; 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: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=jIFRkWd4Oiq8yiCv6HHsYyZvWznfCBbUPbH1EiTVVcU=; b=c2UBvYXg8AZSEHi5MDC+ybAs8idtS8T9br2EucE4fzEvpHJdSH4IXq7V1yJgn9a8zcR2NE BfkOMZIQQnWijIk2pKLV0/R6ubFzFMlR+XE2ysyNF4ecxKcevu0GFBfHtuoXOvEM7UeSCj s/jF8CGq8kpvkXYR/xbx0r/D9yvTGlE= X-MC-Unique: 8AO6K_tsPSS7Krw3fQBwog-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 12/12] virschematest: Add infrastructure for testing single devices Date: Tue, 1 Nov 2022 15:01:50 +0100 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.4 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 3.1 on 10.11.54.5 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1667311386279100001 Content-Type: text/plain; charset="utf-8" Introduce an internal schema for a single device and use it to test the various files in tests/qemuhotplugtestdevices and tests/qemublocktestdata directories. This also requires us to implement schema for (some) privateData bits for the disk source. Signed-off-by: Peter Krempa Reviewed-by: J=C3=A1n Tomko --- tests/schemas/device.rng.in | 51 ++++++++++++++++++++++++ tests/schemas/meson.build | 2 + tests/schemas/privatedata.rng.in | 68 ++++++++++++++++++++++++++++++++ tests/virschematest.c | 7 ++++ 4 files changed, 128 insertions(+) create mode 100644 tests/schemas/device.rng.in create mode 100644 tests/schemas/privatedata.rng.in diff --git a/tests/schemas/device.rng.in b/tests/schemas/device.rng.in new file mode 100644 index 0000000000..b322b5275e --- /dev/null +++ b/tests/schemas/device.rng.in @@ -0,0 +1,51 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/schemas/meson.build b/tests/schemas/meson.build index 33c16bb2fb..851355d4e9 100644 --- a/tests/schemas/meson.build +++ b/tests/schemas/meson.build @@ -5,6 +5,8 @@ virschematest_test_schemas_conf =3D configuration_data({ virschematest_schemas =3D [ 'cpu-baseline.rng.in', + 'device.rng.in', + 'privatedata.rng.in', ] foreach file : virschematest_schemas diff --git a/tests/schemas/privatedata.rng.in b/tests/schemas/privatedata.r= ng.in new file mode 100644 index 0000000000..945f7a06b3 --- /dev/null +++ b/tests/schemas/privatedata.rng.in @@ -0,0 +1,68 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + storage + format + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/virschematest.c b/tests/virschematest.c index 29a1d59134..fcf3838630 100644 --- a/tests/virschematest.c +++ b/tests/virschematest.c @@ -322,6 +322,12 @@ static const struct testSchemaEntry testsCpuBaseline[]= =3D { { . dir =3D "tests/cputestdata" }, }; +static const struct testSchemaEntry testDevice[] =3D { + { .dir =3D "tests/qemuhotplugtestdevices" }, + { .dir =3D "tests/qemublocktestdata/imagecreate" }, + { .dir =3D "tests/qemublocktestdata/xml2json" }, +}; + static int mymain(void) { @@ -352,6 +358,7 @@ mymain(void) DO_TEST(SCHEMAS_PATH "storagevol.rng", schemaStorageVol); DO_TEST(INTERNAL_SCHEMAS_PATH "cpu-baseline.rng", testsCpuBaseline); + DO_TEST(INTERNAL_SCHEMAS_PATH "device.rng", testDevice); return ret =3D=3D 0 ? EXIT_SUCCESS : EXIT_FAILURE; } --=20 2.38.1