From nobody Mon Feb 9 03:12:05 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 207.211.31.81 as permitted sender) client-ip=207.211.31.81; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.81 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=1588167452; cv=none; d=zohomail.com; s=zohoarc; b=BEueBrKJXfMKsOpXtCeDmwgb3zB54Eg0b5vAM996rA11y1QpyDWt1Z5pO7aDZE6/2HnAdeNSYnNax/E3A0GNBSF2jIkAtnrarw+xH48jYgxbwMfcY8cT7EJ76wuj9EOk5JOPjTPyME54u5QiU2NnD8pRdmO9Hnb2olSQ7463Z9A= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1588167452; 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=AsTyAMadGbStE3eRnB2heQ6LikPnXcUbVYcQ8H4HjIo=; b=YwS/lqR6V6Ftl8fKN2nwH/pyo9zVf2z6rVVjfMnlOyi1DTfZn9+5j/5UaDfEXXpU8opwsOMjdRHU+rfEpGwOVQNF56XnogOK7R3BZO9uXTLxvUeamuFdWw67WypcgLU8EXgZqP/NfY6Y4VZnRik33vk9nEAgIswG6pOPX3sqG1M= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.81 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-1.mimecast.com (us-smtp-2.mimecast.com [207.211.31.81]) by mx.zohomail.com with SMTPS id 1588167452003921.1764142100651; Wed, 29 Apr 2020 06:37:32 -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-271-LYbTh_MQO7K2WGcXTY2usw-1; Wed, 29 Apr 2020 09:37:28 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 707931005510; Wed, 29 Apr 2020 13:37:22 +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 433E360DB4; Wed, 29 Apr 2020 13:37:21 +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 EFCAD4CAB0; Wed, 29 Apr 2020 13:37:20 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 03TDbEOu005116 for ; Wed, 29 Apr 2020 09:37:14 -0400 Received: by smtp.corp.redhat.com (Postfix) id 3D51E5D9D3; Wed, 29 Apr 2020 13:37:14 +0000 (UTC) Received: from localhost.localdomain.com (unknown [10.36.110.2]) by smtp.corp.redhat.com (Postfix) with ESMTP id 646E25D9C9; Wed, 29 Apr 2020 13:37:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1588167450; 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=AsTyAMadGbStE3eRnB2heQ6LikPnXcUbVYcQ8H4HjIo=; b=YE4wB4cNgVgh9ANlrl7cWysXNbTNcCXb3W5O9ACoq1tiTSmdRqxBeiMDH/I7KzOnMuljF5 bYZhjaPxmmGNdIoZHyUny4DTAV6wallaf8SJ5ZmE6nXxCb01+V3q5SfGzrdRN1R5qb/dod qbIdkDTtzuxstyg+fs7lgmi/5cbddVQ= X-MC-Unique: LYbTh_MQO7K2WGcXTY2usw-1 From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= To: libvir-list@redhat.com Subject: [libvirt-python PATCH 1/3] test: workaround missing VIR_TYPED_PARAM enums in API definition Date: Wed, 29 Apr 2020 14:36:58 +0100 Message-Id: <20200429133700.1628543-2-berrange@redhat.com> In-Reply-To: <20200429133700.1628543-1-berrange@redhat.com> References: <20200429133700.1628543-1-berrange@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 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.79 on 10.5.11.13 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" On Ubuntu 1804 with libvirt 4.0.0 libvirt-python build fails running test /usr/bin/python3 sanitytest.py build/lib.linux-x86_64-3.6 /usr/share/libvir= t/api/libvirt-api.xml Cannot get a value of enum VIR_TYPED_PARAM_BOOLEAN (originally VIR_DOMAIN_B= LKIO_PARAM_BOOLEAN) Cannot get a value of enum VIR_TYPED_PARAM_DOUBLE (originally VIR_DOMAIN_BL= KIO_PARAM_DOUBLE) Cannot get a value of enum VIR_TYPED_PARAM_INT (originally VIR_DOMAIN_BLKIO= _PARAM_INT) ...snip... The code generated for the binding is still correct and so we can just whitelist this error scenario. Signed-off-by: Daniel P. Berrang=C3=A9 --- sanitytest.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sanitytest.py b/sanitytest.py index 1bedd55..f187c15 100644 --- a/sanitytest.py +++ b/sanitytest.py @@ -73,7 +73,11 @@ for n in second_pass: val =3D int(v[val]) break =20 - if type(val) !=3D int: + # Version 4.0.0 was broken as missing VIR_TYPED_PARAM enums + # constants. This is harmless from POV of validating API + # coverage so ignore this error. + if (type(val) !=3D int and + not val.startswith("VIR_TYPED_PARAM_")): fail =3D True print("Cannot get a value of enum %s (originally %s)" % (val, name= )) enumvals[typ][name] =3D val --=20 2.25.4