From nobody Mon Feb 9 03:29:13 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=1633622678; cv=none; d=zohomail.com; s=zohoarc; b=g6KnTOHYZcbwQQBSQwNRBeflH78EOW7W+pIYPqtio7dOvjx41BWXlaBLWgu6UIymzIguqseTFhDuqOZvpHlzef3jOlLmLctEymcMNXhZmjwdlYg+n/qV9NchgkZdXdoc8bNVH+ktq4am5sqlCMZOIr+4aPHSCJwa7Q93EzXoTzw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1633622678; 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=6BBsgE9fgZaoC02BVw+/S/jTCabyZ3WK9yx7Q43Szek=; b=Cnvyg8XHzrqeiU6idpK/O7U6VoCqaPhDgPRGcJAR+XG+wwCMjgmFJo9ajHE9+HonKntARcYJbxRhHc6nvo3tp5dTESwXlUR9WbQSMN/QcJc3AatbZWQUO+st+c3lmlhX5xJPxaIBgs/Q3R86aBi8Zp31boXmW1PzI3n6VQlOIhs= 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 163362267848874.62399224163903; Thu, 7 Oct 2021 09:04: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-218-zNdBDudKOUSnYwBIjITOcA-1; Thu, 07 Oct 2021 12:04:36 -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 796D2C4AA91; Thu, 7 Oct 2021 15:47:27 +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 C5DB3109413D; Thu, 7 Oct 2021 15:47:02 +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 976DA1806D00; Thu, 7 Oct 2021 15:47:02 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 197FIhdP023579 for ; Thu, 7 Oct 2021 11:18:44 -0400 Received: by smtp.corp.redhat.com (Postfix) id EA8D35F4EE; Thu, 7 Oct 2021 15:18:43 +0000 (UTC) Received: from speedmetal.redhat.com (unknown [10.40.208.5]) by smtp.corp.redhat.com (Postfix) with ESMTP id 599625D6BA for ; Thu, 7 Oct 2021 15:18:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1633622677; 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=6BBsgE9fgZaoC02BVw+/S/jTCabyZ3WK9yx7Q43Szek=; b=P/gwcTDdBClbR50mBCZb6ThpSZfAYfEfSePZmiG3wWUr8v4OVDInMuD1bfndlYOLY/xhXf hDSC3VsPtODxsqzcUjBRFITksY7UZipAZfNVBj6YdEKLuwy26TRw+leivSTQyttRIMlOEY SVRtMfK6pkT3FsroAJJRoLnxSGxXVeg= X-MC-Unique: zNdBDudKOUSnYwBIjITOcA-1 From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 010/103] testCompareXMLToArgvValidateSchema: Base -netdev validation on JSON Date: Thu, 7 Oct 2021 17:16:58 +0200 Message-Id: <91bbdd8fb875774c8e99ce104bc08ab08bf8bab2.1633619630.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 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: 1633622679323100001 Content-Type: text/plain; charset="utf-8" Base the validation on presence of JSON as we do with other validated commands. This will prepare the code for a refactor so that it's the same for all validated commands. Signed-off-by: Peter Krempa Reviewed-by: J=C3=A1n Tomko --- tests/qemuxml2argvtest.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index 7df3946751..2190e03d18 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -503,7 +503,6 @@ testCompareXMLToArgvValidateSchema(virQEMUDriver *drv, GHashTable *schema =3D NULL; g_autoptr(virCommand) cmd =3D NULL; unsigned int parseFlags =3D info->parseFlags; - bool netdevQAPIfied =3D false; /* comment out with line comment to enable schema checking for non _CA= PS tests if (!info->schemafile) @@ -546,8 +545,6 @@ testCompareXMLToArgvValidateSchema(virQEMUDriver *drv, if (virCommandGetArgList(cmd, &args, &nargs) < 0) return -1; - netdevQAPIfied =3D !virQEMUQAPISchemaPathExists("netdev_add/arg-type/t= ype/!string", schema); - for (i =3D 0; i < nargs; i++) { g_auto(virBuffer) debug =3D VIR_BUFFER_INITIALIZER; g_autoptr(virJSONValue) jsonargs =3D NULL; @@ -565,7 +562,7 @@ testCompareXMLToArgvValidateSchema(virQEMUDriver *drv, i++; } else if (STREQ(args[i], "-netdev")) { - if (!netdevQAPIfied) { + if (*args[i + 1] !=3D '{') { i++; continue; } --=20 2.31.1