From nobody Mon Feb 9 02:42:23 2026 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=1632145838; cv=none; d=zohomail.com; s=zohoarc; b=RKXyGp+CFOIv/tOcFE50Ku4aS9IlM2IyPC4hrtDZkEbd57nv2jfgRLnPab9HpDKE4T1ZbWDt2/8rX9qlSvuWfuG7x1XKWJQ5jFGk6LZYrMJxwS2Y2DwPt2/w4IBQPc73qgq1S50rnL0YZwXl2VUGLHUAtGcfo1tsb8S7cd+c0T8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1632145838; 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=hRqElu1ZeUS7NWm8RIjtNQ90CMDn42zp2+KD3JcTC3s=; b=Ao7zhNmiqP4w8A9KecJBrVQh7e3U4OE57+O1P+z5gMdyr1a7lpaom0ByPCWqA+pEs70c+bFBmtk1hAQ/sOFldqpCNSDC82Exo4NOg+aAXQA6mKceu/D8j0RNkWLQdjOqQ4js7Wwh0dYn7oFoI/KKYMqQif5eC37Z8eythaPSIUU= 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 1632145838057746.6147944436495; Mon, 20 Sep 2021 06:50:38 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-594-hZm727tQN8qL1hVrjjpJLg-1; Mon, 20 Sep 2021 09:50:35 -0400 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 925EFA40C1; Mon, 20 Sep 2021 13:50:30 +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 7622F10246ED; Mon, 20 Sep 2021 13:50:30 +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 474A51806D04; Mon, 20 Sep 2021 13:50:30 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 18KDoSSq009585 for ; Mon, 20 Sep 2021 09:50:28 -0400 Received: by smtp.corp.redhat.com (Postfix) id 93FE218B5E; Mon, 20 Sep 2021 13:50:28 +0000 (UTC) Received: from speedmetal.redhat.com (unknown [10.40.208.16]) by smtp.corp.redhat.com (Postfix) with ESMTP id F2FA96D98C for ; Mon, 20 Sep 2021 13:50:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1632145837; 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=hRqElu1ZeUS7NWm8RIjtNQ90CMDn42zp2+KD3JcTC3s=; b=eIPWuEKJpA1hJdEWt60Umt1HQAekujp8oOQL258kKJcA8j70z/H5yyPNcGnCBDgtwPxFHY HnnUyqxQVyq7ID8G8qjVCZ6aVgJsOXtlqq6v+CarwZlT9vajATI6MpP7fJBceoCTVlNRE+ EV6hUtd+SsQ9TqGoMeKSFr0djBbKU+g= X-MC-Unique: hZm727tQN8qL1hVrjjpJLg-1 From: Peter Krempa To: libvir-list@redhat.com Subject: [RFC PATCH 7/7] testQEMUSchemaValidateEnum: Validate deprecated members Date: Mon, 20 Sep 2021 15:49:38 +0200 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-loop: libvir-list@redhat.com X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1632145838618100001 Content-Type: text/plain; charset="utf-8" Starting from QEMU-6.2 enum members can be deprecated. Add support to the validator. Signed-off-by: Peter Krempa --- tests/testutilsqemuschema.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/testutilsqemuschema.c b/tests/testutilsqemuschema.c index 38dd0e14bc..b4b5eb1ed6 100644 --- a/tests/testutilsqemuschema.c +++ b/tests/testutilsqemuschema.c @@ -376,6 +376,12 @@ testQEMUSchemaValidateEnum(virJSONValue *obj, virJSONValue *member =3D virJSONValueArrayGet(members, i); if (STREQ_NULLABLE(objstr, virJSONValueObjectGetString(member,= "name"))) { + int rc; + + /* the new 'members' array allows us to check deprecations= */ + if ((rc =3D testQEMUSchemaValidateDeprecated(member, objst= r, ctxt)) < 0) + return rc; + virBufferAsprintf(ctxt->debug, "'%s' OK", NULLSTR(objstr)); return 0; } --=20 2.31.1