From nobody Mon Feb 9 02:51:56 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=1635511201; cv=none; d=zohomail.com; s=zohoarc; b=TR1iGyp4Kfu1zbe4qAvwgmJpfgYIgFh/WYzcWvrzKgh9aNWk7DpFYhdHSxOD23bRvQKIMH19ZbEYtkvF16h8s9Rr8+TAweZtJuTJLKl4SEhEaMI2Hu5diuRhNffItUH/zgPb2VFW24xYzwPeTQ5PtiJ0eKG8kelhuXwG5dIcfeQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1635511201; 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=LmLdpD2VQ6THshqogsRCfibV40q55aT2tNtv88OCVsY=; b=IXhJ/9U2f++mmrIunIs9twFXc3prYmoIhKe05W3xLs6RTaqhUgTpFKyNMvodHjw46Xh55a3wNkNTFNUBK/+3MWRnLREi+J1N4qKsPKZFWs8M2zP7nF2Q34MHmtKNukKIAivxRRKjwDz6psoLCtCGB/QEE52Qw1/oGbpSslBiN/4= 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 1635511201017601.5686383291586; Fri, 29 Oct 2021 05:40:01 -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-118-w0cbHek-PUmhjrxZ_B4AwA-1; Fri, 29 Oct 2021 08:39:57 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 50AE350755; Fri, 29 Oct 2021 12:39:51 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 2E5D9399; Fri, 29 Oct 2021 12:39: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 ED1AC4EA3E; Fri, 29 Oct 2021 12:39:50 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 19TCdhYj005845 for ; Fri, 29 Oct 2021 08:39:43 -0400 Received: by smtp.corp.redhat.com (Postfix) id C7ED913C8A; Fri, 29 Oct 2021 12:39:43 +0000 (UTC) Received: from speedmetal.lan (unknown [10.40.208.20]) by smtp.corp.redhat.com (Postfix) with ESMTP id 1C44A60854 for ; Fri, 29 Oct 2021 12:39:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1635511200; 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=LmLdpD2VQ6THshqogsRCfibV40q55aT2tNtv88OCVsY=; b=ZfFypuOkmQ0xt+Ry6TT8OfPpXVmi5WXVyihHrc0b7Jf/c07e1StHqHwlmRiP/061jv/Y+z SDTRlqM+Ww4di6CqvKII46SJlYy/KlFCXZoWqnZqOet3RlGeHfTYdggmm5KZb4I+x3S+Ag hXuVIOTSwwQrrMDZdS8uZieRI0/Xbuw= X-MC-Unique: w0cbHek-PUmhjrxZ_B4AwA-1 From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH v2 8/8] testQEMUSchemaValidateEnum: Validate deprecated members Date: Fri, 29 Oct 2021 14:39:25 +0200 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 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.23 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: 1635511202350100002 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 Reviewed-by: Michal Privoznik --- tests/testutilsqemuschema.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/testutilsqemuschema.c b/tests/testutilsqemuschema.c index aaa0fdaea9..4a0fb8d944 100644 --- a/tests/testutilsqemuschema.c +++ b/tests/testutilsqemuschema.c @@ -381,6 +381,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