From nobody Mon Feb 9 15:45:27 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 207.211.31.120 as permitted sender) client-ip=207.211.31.120; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zoho.com: domain of redhat.com designates 207.211.31.120 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1573641239; cv=none; d=zoho.com; s=zohoarc; b=eAhHN6eSYrYU9M2oc0P42zS5iCrMF81JdRZHFfs0KY0JDe9WMCI6vx8/3dpYQl95Sme/fWEyZTqbseZaio2H9KHBn2Pm4bY9Kk1HR59hmx36NcZ4F7IScXBk7vOtYwM6yorDNH/J2aruxJSP/5BfJWswC9M3CcPZRzoAoXBsuqg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1573641239; h=Content-Type:Content-Transfer-Encoding:Cc: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=Rn9zCVEQxLtw9mhCH5rB7RxC2cB7GGXfrWgndXzbFcc=; b=bvdpZIJIPHEe+0X/yAi/VrJIG1UIEj5qAhD2LILTCxXXuTWzuBMShJQ/uD/mAWlCSJfbB+B7FPCWSOKQD/EIdcx4T6skIDn+/OrYK0mg/ePHQlxAP1ycxVKS8JSPq7O7qLgLTMMgjIjVzxYISI1G4kDb/tPIMq+8EVnW2aDGZ7E= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=pass; spf=pass (zoho.com: domain of redhat.com designates 207.211.31.120 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) by mx.zohomail.com with SMTPS id 1573641239774545.6120535281469; Wed, 13 Nov 2019 02:33:59 -0800 (PST) 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-79-uUbVTBSqPZq7ip0gNXHivQ-1; Wed, 13 Nov 2019 05:33:56 -0500 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 952D518B5F79; Wed, 13 Nov 2019 10:33:51 +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 5DB865E258; Wed, 13 Nov 2019 10:33:51 +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 C580818089D0; Wed, 13 Nov 2019 10:33:50 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id xAD96219025516 for ; Wed, 13 Nov 2019 04:06:02 -0500 Received: by smtp.corp.redhat.com (Postfix) id 0B65517897; Wed, 13 Nov 2019 09:06:02 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast01.extmail.prod.ext.rdu2.redhat.com [10.11.55.17]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 06DF81D089 for ; Wed, 13 Nov 2019 09:05:59 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-1.mimecast.com [205.139.110.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id D2A518E3868 for ; Wed, 13 Nov 2019 09:05:59 +0000 (UTC) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-362-nH1hUApwO4G_kY9ZurjeEg-3; Wed, 13 Nov 2019 04:05:58 -0500 Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 13 Nov 2019 01:05:57 -0800 Received: from david-unc.bj.intel.com ([10.238.157.59]) by orsmga006.jf.intel.com with ESMTP; 13 Nov 2019 01:05:56 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1573641238; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc: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=Rn9zCVEQxLtw9mhCH5rB7RxC2cB7GGXfrWgndXzbFcc=; b=TnNYZ6jHJbp+EKyT34PgF+wqfcZiI2IvPGwhpUGKlhdpO6+2CuAj2QBdyb9uN6TnrayaI+ s4mRFRarrJ+l0KwUmNiyjWzpHmdJtIyggup6gAwLzd+mEWi+pJyPKTYlhB5YPrIoUJHUXC GGxJxVKRpR7V42xrOTVHf+c6RmfoU2w= X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.68,299,1569308400"; d="scan'208";a="207740847" From: Wang Huaqiang To: libvir-list@redhat.com Date: Thu, 14 Nov 2019 01:08:21 +0800 Message-Id: <20191113170823.17776-4-huaqiang.wang@intel.com> In-Reply-To: <20191113170823.17776-1-huaqiang.wang@intel.com> References: <20191113170823.17776-1-huaqiang.wang@intel.com> MIME-Version: 1.0 X-MC-Unique: nH1hUApwO4G_kY9ZurjeEg-3 X-MC-Unique: uUbVTBSqPZq7ip0gNXHivQ-1 X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-MIME-Autoconverted: from quoted-printable to 8bit by lists01.pubmisc.prod.ext.phx2.redhat.com id xAD96219025516 X-loop: libvir-list@redhat.com X-Mailman-Approved-At: Wed, 13 Nov 2019 05:33:31 -0500 Cc: Huaqiang Subject: [libvirt] [PATCH 3/5] cachetune schema: a looser check for the order of and element 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.14 X-Mimecast-Spam-Score: 0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" From: Huaqiang Originally, inside , it requires the element to be in the position before , and following configuration is not permitted by schema, but it is better to let it be valid. ^ |__ Not permitted originally because it is in the place before element. ... And, let schema do more strict check by identifying following configuration= to be invalid, due to should contain at least one or element. ^ |__ a SHOULD contain at least one or ... Signed-off-by: Huaqiang Reviewed-by: Daniel P. Berrang=C3=A9 --- docs/schemas/domaincommon.rng | 68 +++++++++++------------ tests/genericxml2xmlindata/cachetune.xml | 1 + tests/genericxml2xmloutdata/cachetune.xml | 34 ++++++++++++ tests/genericxml2xmltest.c | 2 +- 4 files changed, 70 insertions(+), 35 deletions(-) create mode 100644 tests/genericxml2xmloutdata/cachetune.xml diff --git a/docs/schemas/domaincommon.rng b/docs/schemas/domaincommon.rng index e06f892da3..aa4f512e5c 100644 --- a/docs/schemas/domaincommon.rng +++ b/docs/schemas/domaincommon.rng @@ -980,41 +980,41 @@ - - - - - - - - - - - both - code - data - - - - - - - - + + + + + - - - - - - - - - - - - - + + + + + + both + code + data + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/genericxml2xmlindata/cachetune.xml b/tests/genericxml2xm= lindata/cachetune.xml index 645cab7771..eda2ca6fb6 100644 --- a/tests/genericxml2xmlindata/cachetune.xml +++ b/tests/genericxml2xmlindata/cachetune.xml @@ -6,6 +6,7 @@ 4 + diff --git a/tests/genericxml2xmloutdata/cachetune.xml b/tests/genericxml2x= mloutdata/cachetune.xml new file mode 100644 index 0000000000..dcde0ebc2a --- /dev/null +++ b/tests/genericxml2xmloutdata/cachetune.xml @@ -0,0 +1,34 @@ + + QEMUGuest1 + c7a5fdbd-edaf-9455-926a-d65c16db1809 + 219136 + 219136 + 4 + + + + + + + + + + + + hvm + + + + destroy + restart + destroy + + /usr/bin/qemu-system-i686 + + + + + + + + diff --git a/tests/genericxml2xmltest.c b/tests/genericxml2xmltest.c index 0d04413712..62005a5393 100644 --- a/tests/genericxml2xmltest.c +++ b/tests/genericxml2xmltest.c @@ -125,9 +125,9 @@ mymain(void) DO_TEST_FULL("chardev-reconnect-invalid-mode", 0, false, TEST_COMPARE_DOM_XML2XML_RESULT_FAIL_PARSE); =20 - DO_TEST("cachetune"); DO_TEST("cachetune-small"); DO_TEST("cachetune-cdp"); + DO_TEST_DIFFERENT("cachetune"); DO_TEST_DIFFERENT("cachetune-extra-tunes"); DO_TEST_FULL("cachetune-colliding-allocs", false, true, TEST_COMPARE_DOM_XML2XML_RESULT_FAIL_PARSE); --=20 2.23.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list