From nobody Thu May 2 19:58:24 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) client-ip=216.205.24.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 216.205.24.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=1629217548; cv=none; d=zohomail.com; s=zohoarc; b=GZAcJ0AHEUfDBkCHGjlbWXVmsvt4yh4bFrHyKuoRbqWxdRWyZbdZalWaBZUyaL0gUAnsFMi39Qb/Ioouiilek0DnOn1fxKzO2lja21e+vT2xByAIuHC3x9UcY+x1jbpyOCTbOeMx7vLVEeMx43FvXexwFA0OWaqR274knZqRcuk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1629217548; 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=BN220fNLeskNVEiJv1BlKclqNnFGL8SHHG906m+IUdI=; b=ath2zYM38b/suWudKkzGehTWtlX69IGKwsXX4r226uD0FTJ69ybxZ/Zsfepq1yLqntvEyS/pLcs2mgtXqQKdp88rwo/jY9iIEcfIxIJ1bIdYYWl+b7zAA2y8/GOoszmaRDCZF5M8IZRbClS0InAIZtWWzVlqt6d1+Fd6z/wcKWY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.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 [216.205.24.124]) by mx.zohomail.com with SMTPS id 1629217548752618.4003700567206; Tue, 17 Aug 2021 09:25:48 -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-197-qW-vCvd4POiexz-maDaYyg-1; Tue, 17 Aug 2021 12:25:46 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 6CA59190B2A0; Tue, 17 Aug 2021 16:25:40 +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 F36AF6A8FC; Tue, 17 Aug 2021 16:25:37 +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 BEE86181A2A6; Tue, 17 Aug 2021 16:25:33 +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 17HGPW3M020182 for ; Tue, 17 Aug 2021 12:25:32 -0400 Received: by smtp.corp.redhat.com (Postfix) id 2B77F421F; Tue, 17 Aug 2021 16:25:32 +0000 (UTC) Received: from speedmetal.redhat.com (unknown [10.40.208.33]) by smtp.corp.redhat.com (Postfix) with ESMTP id 8918418B42 for ; Tue, 17 Aug 2021 16:25:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1629217547; 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=BN220fNLeskNVEiJv1BlKclqNnFGL8SHHG906m+IUdI=; b=V8jlengFWfGXyDTlwEbPqVqICKur86I+AkIBgFv43wBUEoYlthx+O+1YISwrW8GpoSCajp jlOaenEJ6oP9sAO9TF73Pq0p6vdIW2g0kDL/ClYJILyIN8/3WoCUs9+gIndq6yWbnQzz5Z 8uPOn3Z3uCPXo3aAO5F9N60fVVhpZJ8= X-MC-Unique: qW-vCvd4POiexz-maDaYyg-1 From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH v2 01/23] qemu: capabilities: Remove virQEMUCapsSetList Date: Tue, 17 Aug 2021 18:25:02 +0200 Message-Id: <111fc018bed5a0f27cf04b1c5c52ea1b4de95696.1629217367.git.pkrempa@redhat.com> 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.79 on 10.5.11.15 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: 1629217550592100001 Content-Type: text/plain; charset="utf-8" Unused since 90540a37bee647d4f94d263a3ba1b39f2407880d Signed-off-by: Peter Krempa Reviewed-by: J=C3=A1n Tomko --- src/qemu/qemu_capabilities.c | 13 ------------- src/qemu/qemu_capabilities.h | 2 -- 2 files changed, 15 deletions(-) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index 9558938866..537c460286 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -2043,19 +2043,6 @@ virQEMUCapsSet(virQEMUCaps *qemuCaps, } -void -virQEMUCapsSetList(virQEMUCaps *qemuCaps, ...) -{ - va_list list; - int flag; - - va_start(list, qemuCaps); - while ((flag =3D va_arg(list, int)) < QEMU_CAPS_LAST) - virQEMUCapsSet(qemuCaps, flag); - va_end(list); -} - - void virQEMUCapsClear(virQEMUCaps *qemuCaps, virQEMUCapsFlags flag) diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h index 2b1bb57a49..511379db18 100644 --- a/src/qemu/qemu_capabilities.h +++ b/src/qemu/qemu_capabilities.h @@ -631,8 +631,6 @@ virQEMUCaps *virQEMUCapsNewBinary(const char *binary); void virQEMUCapsSet(virQEMUCaps *qemuCaps, virQEMUCapsFlags flag) ATTRIBUTE_NONNULL(1); -void virQEMUCapsSetList(virQEMUCaps *qemuCaps, ...) ATTRIBUTE_NONNULL(1); - void virQEMUCapsClear(virQEMUCaps *qemuCaps, virQEMUCapsFlags flag) ATTRIBUTE_NONNULL(1); --=20 2.31.1 From nobody Thu May 2 19:58:24 2024 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=1629217549; cv=none; d=zohomail.com; s=zohoarc; b=SF6+3n4I3xIWOB48p3gwgGnvyp8mc2tuldT6Hwq/ZlfB2gMFD/jd+3+6yEpe+DbhOQY1BUQFxNxLay0eabvCoFa3v57P0QZs+FhZWeSzeySc614fVwC868EFywxASsj/tP80ajgh1Q6P19BNobA+jqXy5lnJkJRTep1Bl+/DQz4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1629217549; 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=NBA0SLlkBQicR1jY6R0XIlkDZLUgLPr3hqHtbiuFCUg=; b=ACcNrCWPO1fwU86sN702uWbd3Fpb0uEcCCqTfUy07sSs3gRjoJa67amaK03PC0/tDN+0BsfREQ4MaKMV3Uqk25IUFTX63RlUmjpChPaKRbfUaRJ1ZLFbGROO7EF8RXgQ0/YU/6OYxsSlKDypayCrswMfx5Ur+J+yeff4KOLJJnM= 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 162921754980361.773732268846516; Tue, 17 Aug 2021 09:25:49 -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-224-kA1hBLWQMemabtJ6bY3ZAw-1; Tue, 17 Aug 2021 12:25:46 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id C41AD190B2AA; Tue, 17 Aug 2021 16:25:40 +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 3DD155D6A8; Tue, 17 Aug 2021 16:25:40 +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 F3ADF4BB7B; Tue, 17 Aug 2021 16:25:38 +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 17HGPXLg020188 for ; Tue, 17 Aug 2021 12:25:33 -0400 Received: by smtp.corp.redhat.com (Postfix) id 34EF7421F; Tue, 17 Aug 2021 16:25:33 +0000 (UTC) Received: from speedmetal.redhat.com (unknown [10.40.208.33]) by smtp.corp.redhat.com (Postfix) with ESMTP id 8CECC1899A for ; Tue, 17 Aug 2021 16:25:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1629217548; 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=NBA0SLlkBQicR1jY6R0XIlkDZLUgLPr3hqHtbiuFCUg=; b=NFjHkGCqG2M8iu0Wf486vdPGZ2MTs+q20/mOXr+iYpLbvxYCOwN5O5692r6K7+mfjn0MTO EIxIazEoZ3TZGCVTg59VNKbZpdU/PrFPyuD9VDbF0tmlgvb5/5hSMpK8zA+6uVgFfevONx iR38bxcajmH5wSpyLa6TjCNIPCYZT4Q= X-MC-Unique: kA1hBLWQMemabtJ6bY3ZAw-1 From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH v2 02/23] qemuxml2argvtest: Add 'ARG_END' from higher level macros Date: Tue, 17 Aug 2021 18:25:03 +0200 Message-Id: <9671009d11414cc31ac688e93bd4b73776632087.1629217367.git.pkrempa@redhat.com> 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.79 on 10.5.11.15 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: 1629217550761100003 Content-Type: text/plain; charset="utf-8" Signed-off-by: Peter Krempa Reviewed-by: J=C3=A1n Tomko --- tests/qemuxml2argvtest.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index 2754a8a780..85973a2298 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -943,7 +943,7 @@ mymain(void) }; \ info.qapiSchemaCache =3D qapiSchemaCache; \ if (testQemuInfoSetArgs(&info, capscache, capslatest, \ - __VA_ARGS__, ARG_END) < 0) \ + __VA_ARGS__) < 0) \ ret =3D -1; \ testInfoSetPaths(&info, _suffix); \ if (virTestRun("QEMU XML-2-ARGV " _name _suffix, \ @@ -956,7 +956,8 @@ mymain(void) DO_TEST_INTERNAL(name, "." arch "-" ver, \ ARG_CAPS_ARCH, arch, \ ARG_CAPS_VER, ver, \ - __VA_ARGS__) + __VA_ARGS__, \ + ARG_END) # define DO_TEST_CAPS_ARCH_LATEST_FULL(name, arch, ...) \ DO_TEST_CAPS_INTERNAL(name, arch, "latest", __VA_ARGS__) @@ -1009,7 +1010,7 @@ mymain(void) # define DO_TEST_FULL(name, ...) \ DO_TEST_INTERNAL(name, "", \ - __VA_ARGS__, QEMU_CAPS_LAST) + __VA_ARGS__, QEMU_CAPS_LAST, ARG_END) /* All the following macros require an explicit QEMU_CAPS_* list * at the end of the argument list, or the NONE placeholder. --=20 2.31.1 From nobody Thu May 2 19:58:24 2024 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=1629217564; cv=none; d=zohomail.com; s=zohoarc; b=RrIQBhZJd859mvYVJ+bwR4jGAlmKOVpq3o3Hq5ZTZN0Ruw8KWoHUzWX3ipA3z1La9W4vewDuwyIOYv5ziLwXwUktmFgKYiK/0y9nTl3xpVSwSo3af5EoPen4ivtA5gLWvDkpmxovr8H/FK+Ai/dFqLLyMsRoiG01zNIppwL8B1k= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1629217564; 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=tDd7OjzVdN0n9+bU2oS6nXOiY5QWJO8JUsASvR1szC4=; b=HXfpTqOEAvkCb9APvHK+zeEucRkFwPLehR6emfxHNTi2Sh9521CulfVfWj/G2wkYQNa8icpuDdWsmt69Kh05Dc7Mih8CsI0USdq+gWz2DYjGlIAjgxlKK4zh16kFWTiUi7QlRO0+k1HGDld/RD9Wo7LdtRs+KS0I/eZ4ZBOER6M= 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 1629217564860537.389519302654; Tue, 17 Aug 2021 09:26:04 -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-590-8X9TtTHcMY21ua8JLjFs9Q-1; Tue, 17 Aug 2021 12:26:02 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 35F26190B2A0; Tue, 17 Aug 2021 16:25:57 +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 162C25C1D5; Tue, 17 Aug 2021 16:25:57 +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 D82DE4A700; Tue, 17 Aug 2021 16:25:56 +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 17HGPYnv020193 for ; Tue, 17 Aug 2021 12:25:34 -0400 Received: by smtp.corp.redhat.com (Postfix) id 43FFE1899A; Tue, 17 Aug 2021 16:25:34 +0000 (UTC) Received: from speedmetal.redhat.com (unknown [10.40.208.33]) by smtp.corp.redhat.com (Postfix) with ESMTP id A22A5421F for ; Tue, 17 Aug 2021 16:25:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1629217563; 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=tDd7OjzVdN0n9+bU2oS6nXOiY5QWJO8JUsASvR1szC4=; b=cKtaN+disTBMkHbZmEgkk8x9OxBnHtudkj8ypkQ5PlrQqcocO9mmDJLaAB1p4YDJtcniPP KIxGqXQs98wYNLy3SqtrapX0lhxcEihsvIUfBLnlG8KBfhq3ib62LC+qDlgGfXlJoBOFo1 luqIHdSEerjuFvNp8rnIwjh2A2cdIw8= X-MC-Unique: 8X9TtTHcMY21ua8JLjFs9Q-1 From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH v2 03/23] qemuxml2argvtest: Fix broken invocation of "pseries-spaprvio-invalid" Date: Tue, 17 Aug 2021 18:25:04 +0200 Message-Id: <53283f79b91e3e960c633506fe82a994c9cc2a33.1629217367.git.pkrempa@redhat.com> 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.79 on 10.5.11.16 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: 1629217566769100001 Content-Type: text/plain; charset="utf-8" The string "ppc64" is passed in place of capability flags. We were lucky that the pointer was always more than QEMU_CAPS_LAST. Signed-off-by: Peter Krempa Reviewed-by: J=C3=A1n Tomko --- tests/qemuxml2argvtest.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index 85973a2298..5977f77b86 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -2412,7 +2412,7 @@ mymain(void) DO_TEST("pseries-console-virtio", QEMU_CAPS_DEVICE_SPAPR_PCI_HOST_BRIDGE); DO_TEST_PARSE_ERROR("pseries-serial-invalid-machine", NONE); - DO_TEST_PARSE_ERROR("pseries-spaprvio-invalid", "ppc64"); + DO_TEST_PARSE_ERROR("pseries-spaprvio-invalid", NONE); DO_TEST("mach-virt-serial-native", QEMU_CAPS_DEVICE_PL011); --=20 2.31.1 From nobody Thu May 2 19:58:24 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) client-ip=170.10.129.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.129.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=1629217566; cv=none; d=zohomail.com; s=zohoarc; b=cp1gg7YG5wN3wFJiUNrHMCdug8+KC8d7ZS2ST56VfLW10yjduBOoy7PzHCEnovKOAWIhPDdqL5w6Bm2X16GjcMW1zzWKVcQcf0MOxN1BaahQEX2cTVmALfVSoXK+aPiBrTNs2li2zXc1AWpDjtgKqGKzKtYNR3vOcfWtGcmURFU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1629217566; 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=mo01QzwZrJiQD+C8qYIv8Ciw/rQoThUsHSJTkJ0ly24=; b=P17j8kcF/UhELK1CmyX46DG2yGlPJwV1d3HmZY7vShFRgzp1UELFtCBF74t5SB4rkXthX6y5C7js/gcUHISnq/VPjhibA8Nu/F9onhMMMHLfZCKRdLbzmROcuHviJGFbiDOBO7ujcLxcQoopAGsztxa0aOB9W4e504kWDQ3tl8A= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.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.129.124]) by mx.zohomail.com with SMTPS id 1629217566252945.0686788768908; Tue, 17 Aug 2021 09:26:06 -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-5-oLczZQfDM_ihsgMqiGGCJQ-1; Tue, 17 Aug 2021 12:26:03 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id EFD37100CF70; Tue, 17 Aug 2021 16:25:57 +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 D40DC68D99; Tue, 17 Aug 2021 16:25:57 +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 A603B181A2AA; Tue, 17 Aug 2021 16:25:57 +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 17HGPZWC020217 for ; Tue, 17 Aug 2021 12:25:35 -0400 Received: by smtp.corp.redhat.com (Postfix) id 6808F421F; Tue, 17 Aug 2021 16:25:35 +0000 (UTC) Received: from speedmetal.redhat.com (unknown [10.40.208.33]) by smtp.corp.redhat.com (Postfix) with ESMTP id BE68818B42 for ; Tue, 17 Aug 2021 16:25:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1629217565; 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=mo01QzwZrJiQD+C8qYIv8Ciw/rQoThUsHSJTkJ0ly24=; b=Bea8BEV8jEcFhwFQi199yM+3dAd7ZDyxvyXbWhH3mUtTdNK1Pnuo79s5S9kJulx33A4OWu 7UrP+RPoKIhbShlsGO5secqFY7yZQ65MzxxOKIffETN2MDNDb9jNjzHAIY5xmVfFYGrb8Q J1X3iWn+RSnlp4tDCviPMvIg+taubuM= X-MC-Unique: oLczZQfDM_ihsgMqiGGCJQ-1 From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH v2 04/23] qemuxml2argvtest: Fix broken invocation of "aarch64-tpm-wrong-model" Date: Tue, 17 Aug 2021 18:25:05 +0200 Message-Id: <47d39f3030d314c00fa47f3e7684751a82b27fc0.1629217367.git.pkrempa@redhat.com> 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.79 on 10.5.11.16 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: 1629217567068100003 Content-Type: text/plain; charset="utf-8" The string "aarch64" is passed in place of capability flags. We were lucky that the pointer was always more than QEMU_CAPS_LAST. Signed-off-by: Peter Krempa Reviewed-by: J=C3=A1n Tomko --- tests/qemuxml2argvtest.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index 5977f77b86..6a3fa4c152 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -2571,7 +2571,7 @@ mymain(void) DO_TEST_CAPS_LATEST("tpm-emulator-tpm2-pstate"); DO_TEST_CAPS_LATEST_PPC64("tpm-emulator-spapr"); DO_TEST_CAPS_ARCH_LATEST("aarch64-tpm", "aarch64"); - DO_TEST_PARSE_ERROR("aarch64-tpm-wrong-model", "aarch64"); + DO_TEST_PARSE_ERROR("aarch64-tpm-wrong-model", NONE); DO_TEST_PARSE_ERROR("pci-domain-invalid", NONE); DO_TEST_PARSE_ERROR("pci-bus-invalid", NONE); --=20 2.31.1 From nobody Thu May 2 19:58:24 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) client-ip=216.205.24.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 216.205.24.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=1629217566; cv=none; d=zohomail.com; s=zohoarc; b=R0B6K7XRW6saJnrhLPIWRNw85n9/gwRV08oUTyaAoULTq7HorN2R1yoUiVSuzglyaSneIZR0vsaYTldN1QAwvzewcVD8Gr9JbDhspXOcUn1ZnK6SgcnDT603J7V7WaIR9EuLaeTAHiQpNlnVX31iRafs58fzVtF3cjZUdQO2SVA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1629217566; 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=9epfcXTzHvhsp6edOfvfMbrnvXYwKwngHbMLS8H8pjE=; b=BA81xR650Hwi0wdC9/OKQq8aHxgXiI9Z71dFZTq8IIaKpas+GW+wYWFYx1euaETtcVviAoHy8+UUkfuX/+PY+GZUbCgXLmgu7t7tA8KiLgML7Lh+kqGfv62274gL4+WMf7/Cet6h3hAmKTTI/OZVKInjiKRdxE+v71uhMh8pxw0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.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 [216.205.24.124]) by mx.zohomail.com with SMTPS id 1629217566544107.55986296463539; Tue, 17 Aug 2021 09:26:06 -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-57-uNemVXqpMO20Reowlp5YoQ-1; Tue, 17 Aug 2021 12:26:02 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 34649100CF6E; Tue, 17 Aug 2021 16:25:57 +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 1A6D56E6E1; Tue, 17 Aug 2021 16:25:57 +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 D8F23181A2A9; Tue, 17 Aug 2021 16:25:56 +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 17HGPai5020224 for ; Tue, 17 Aug 2021 12:25:36 -0400 Received: by smtp.corp.redhat.com (Postfix) id 77063421F; Tue, 17 Aug 2021 16:25:36 +0000 (UTC) Received: from speedmetal.redhat.com (unknown [10.40.208.33]) by smtp.corp.redhat.com (Postfix) with ESMTP id D48F7620DE for ; Tue, 17 Aug 2021 16:25:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1629217565; 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=9epfcXTzHvhsp6edOfvfMbrnvXYwKwngHbMLS8H8pjE=; b=NihqGmEFEREVSbiEli3fGPUjI9QBqZZyzzZREQorpOxNsWne3UQQcntbW64cQwhuk/ERBv 7drjJ+Zx4lUe2xm6ndi3JYsj5RrwDmyyF8mzpedyEz95EzxJYw8qqkqFyD4ZZrHD5cv+DA c4A9WCN5Bmuz8PlPnv8XHOrkRxiHA7k= X-MC-Unique: uNemVXqpMO20Reowlp5YoQ-1 From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH v2 05/23] testQemuInfoSetArgs: Always allocate 'info->qemuCaps' Date: Tue, 17 Aug 2021 18:25:06 +0200 Message-Id: <5ea3ed7863adac48234e3c14658053fec6cbee30.1629217367.git.pkrempa@redhat.com> 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.79 on 10.5.11.11 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: 1629217567157100004 Content-Type: text/plain; charset="utf-8" Modify the logic so that 'info->qemuCaps' is populated, but empty even when ARG_QEMU_CAPS was not used. The function still retains the interlocking of fake caps with real caps. A lot of the internal code expects qemuCaps to be populated and many tests work this around by using ARG_QEMU_CAPS with no caps. Signed-off-by: Peter Krempa Reviewed-by: J=C3=A1n Tomko --- tests/testutilsqemu.c | 44 ++++++++++++++++++++----------------------- 1 file changed, 20 insertions(+), 24 deletions(-) diff --git a/tests/testutilsqemu.c b/tests/testutilsqemu.c index 9a0666724a..32119e30c2 100644 --- a/tests/testutilsqemu.c +++ b/tests/testutilsqemu.c @@ -684,7 +684,8 @@ testQemuInfoSetArgs(struct testQemuInfo *info, { va_list argptr; testQemuInfoArgName argname; - virQEMUCaps *qemuCaps =3D NULL; + g_autoptr(virQEMUCaps) fakeCaps =3D virQEMUCapsNew(); + bool fakeCapsUsed =3D false; int gic =3D GIC_NONE; char *capsarch =3D NULL; char *capsver =3D NULL; @@ -692,16 +693,18 @@ testQemuInfoSetArgs(struct testQemuInfo *info, int flag; int ret =3D -1; + if (!fakeCaps) + abort(); + va_start(argptr, capslatest); argname =3D va_arg(argptr, testQemuInfoArgName); while (argname !=3D ARG_END) { switch (argname) { case ARG_QEMU_CAPS: - if (qemuCaps || !(qemuCaps =3D virQEMUCapsNew())) - goto cleanup; + fakeCapsUsed =3D true; while ((flag =3D va_arg(argptr, int)) < QEMU_CAPS_LAST) - virQEMUCapsSet(qemuCaps, flag); + virQEMUCapsSet(fakeCaps, flag); /* Some tests are run with NONE capabilities, which is just * another name for QEMU_CAPS_LAST. If that is the case the @@ -764,16 +767,16 @@ testQemuInfoSetArgs(struct testQemuInfo *info, goto cleanup; } - if (qemuCaps && (capsarch || capsver)) { - fprintf(stderr, "ARG_QEMU_CAPS can not be combined with ARG_CAPS_A= RCH " - "or ARG_CAPS_VER\n"); - goto cleanup; - } - - if (!qemuCaps && capsarch && capsver) { + if (capsarch && capsver) { bool stripmachinealiases =3D false; virQEMUCaps *cachedcaps =3D NULL; + if (fakeCapsUsed) { + fprintf(stderr, "ARG_QEMU_CAPS can not be combined with ARG_CA= PS_ARCH " + "or ARG_CAPS_VER\n"); + goto cleanup; + } + info->arch =3D virArchFromString(capsarch); if (STREQ(capsver, "latest")) { @@ -785,40 +788,33 @@ testQemuInfoSetArgs(struct testQemuInfo *info, } if (!g_hash_table_lookup_extended(capscache, capsfile, NULL, (void= **) &cachedcaps)) { - if (!(qemuCaps =3D qemuTestParseCapabilitiesArch(info->arch, c= apsfile))) + if (!(cachedcaps =3D qemuTestParseCapabilitiesArch(info->arch,= capsfile))) goto cleanup; - cachedcaps =3D qemuCaps; - - g_hash_table_insert(capscache, g_strdup(capsfile), g_steal_poi= nter(&qemuCaps)); + g_hash_table_insert(capscache, g_strdup(capsfile), cachedcaps); } - if (!(qemuCaps =3D virQEMUCapsNewCopy(cachedcaps))) + if (!(info->qemuCaps =3D virQEMUCapsNewCopy(cachedcaps))) goto cleanup; if (stripmachinealiases) - virQEMUCapsStripMachineAliases(qemuCaps); + virQEMUCapsStripMachineAliases(info->qemuCaps); info->flags |=3D FLAG_REAL_CAPS; /* provide path to the replies file for schema testing */ capsfile[strlen(capsfile) - 3] =3D '\0'; info->schemafile =3D g_strdup_printf("%sreplies", capsfile); + } else { + info->qemuCaps =3D g_steal_pointer(&fakeCaps); } - if (!qemuCaps) { - fprintf(stderr, "No qemuCaps generated\n"); - goto cleanup; - } - info->qemuCaps =3D g_steal_pointer(&qemuCaps); - if (gic !=3D GIC_NONE && testQemuCapsSetGIC(info->qemuCaps, gic) < 0) goto cleanup; ret =3D 0; cleanup: - virObjectUnref(qemuCaps); va_end(argptr); return ret; --=20 2.31.1 From nobody Thu May 2 19:58:24 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) client-ip=216.205.24.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 216.205.24.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=1629217569; cv=none; d=zohomail.com; s=zohoarc; b=CNx8jOT5CYoYmbxcn/RyE5Dpjwov6TwSK4BZMMw9/5iJKVQ4lIncAQV9rUCB5vQ+7iwsbtJqh8y4yyXOIOd6zKjv9YnezbQROppvPYjaZrzhjJ1y6k7+71/Iu1HqEaH3pdob9zp5EVj6ml/ybmcYFSB5wEuwl8YnUpKGJ4CDAdc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1629217569; 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=5DvdEJD5Nzza5K232ekOiH6o5spC7e8EKM31V2Idw+I=; b=minXjQSaPKEEycQq9hzIDT9BnsDbTfOsgO7zltoeDtE9fySlp+1iWu572d+zndZJUteyKK5fykh+5ZBxPVYiXMKYNt1HD4HKyoEH/zzdkzx2W+EonZrsHH5Ri9NQVUmh+cRh4D3Ni8LBg/vYSfwyn2uvlnL/no/eR5gTxi01zR8= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.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 [216.205.24.124]) by mx.zohomail.com with SMTPS id 1629217569426640.9327374815053; Tue, 17 Aug 2021 09:26:09 -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-337-xDrX04y5M9u6itPKvx5d9w-1; Tue, 17 Aug 2021 12:26:05 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 21CCE802922; Tue, 17 Aug 2021 16:26:00 +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 0170C51C48; Tue, 17 Aug 2021 16:26:00 +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 C30714A707; Tue, 17 Aug 2021 16:25:59 +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 17HGPbxW020230 for ; Tue, 17 Aug 2021 12:25:37 -0400 Received: by smtp.corp.redhat.com (Postfix) id 8994C421F; Tue, 17 Aug 2021 16:25:37 +0000 (UTC) Received: from speedmetal.redhat.com (unknown [10.40.208.33]) by smtp.corp.redhat.com (Postfix) with ESMTP id D952F620DE for ; Tue, 17 Aug 2021 16:25:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1629217568; 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=5DvdEJD5Nzza5K232ekOiH6o5spC7e8EKM31V2Idw+I=; b=N+/n4oSeRPc1fm/XiaBVQ/nfQk2GIMnC+ySNPA7OuWs4O9edkGwDA3sUgW7VKM1bwR6Wnc tvEnw2/vBekuO72x8rPTJhwznnr3rkvHOLmoxpwIasNXYkt25HTf0I4weyOIj14godJurL 6LqHsGsl6fjbXSLC+BWTqTg9nSkLlo8= X-MC-Unique: xDrX04y5M9u6itPKvx5d9w-1 From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH v2 06/23] qemustatusxml2xmltest: Remove hack for qemuCaps allocation Date: Tue, 17 Aug 2021 18:25:07 +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.79 on 10.5.11.12 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: 1629217571328100001 Content-Type: text/plain; charset="utf-8" Since qemuCaps are now always allocated we don't need the hack. Signed-off-by: Peter Krempa Reviewed-by: J=C3=A1n Tomko --- tests/qemustatusxml2xmltest.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/tests/qemustatusxml2xmltest.c b/tests/qemustatusxml2xmltest.c index 63fbaa0ddb..ac007405a6 100644 --- a/tests/qemustatusxml2xmltest.c +++ b/tests/qemustatusxml2xmltest.c @@ -110,9 +110,7 @@ mymain(void) static struct testQemuInfo info =3D { \ .name =3D _name, \ }; \ - if (testQemuInfoSetArgs(&info, capscache, capslatest, \ - ARG_QEMU_CAPS, QEMU_CAPS_LAST, \ - ARG_END) < 0 || \ + if (testQemuInfoSetArgs(&info, capscache, capslatest, ARG_END) < 0= || \ qemuTestCapsCacheInsert(driver.qemuCapsCache, info.qemuCaps) <= 0) { \ VIR_TEST_DEBUG("Failed to generate status test data for '%s'",= _name); \ return -1; \ --=20 2.31.1 From nobody Thu May 2 19:58:24 2024 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=1629217573; cv=none; d=zohomail.com; s=zohoarc; b=D1gQ24CjebIvZ9CaKxGbmd6WnbSG/2OIzNTtU//05Ha3ldwM25xEb/apzwrFc1JJBNluz9he11Osov4zuNcIpGjKkGyC4jBJ2jiWm1KKC/wVZeLH3jfknBN0JbSaUqsMbENNE6nYnRfGJaKBV5R5ntbsaLNBaawKvGOeNWe2dSU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1629217573; 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=oF4T7TYvEVHJxC+R6Doid+xueKrIOCX8L0pvgsvGrZk=; b=R9RPIAYVlSr4XhmiWF716dXhEOWX1QH5fKaqHZRa5R3Yevo8x6Ez+kCvOigZsAalXmuVsSrKWiBh/LERaLy+zhFzj4X5LrD/fkTIfgWXCjpFtVdZkqNuoqbDYsiZqV3jRd/kmtMqxYjuRDnwVmivjf5MTFyMe1qR/CsVR7O0L/g= 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 1629217573584402.80952355640716; Tue, 17 Aug 2021 09:26:13 -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-164-fsEYidq8O_qyvhxGO6EkHw-1; Tue, 17 Aug 2021 12:26:10 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id D4815190B2AC; Tue, 17 Aug 2021 16:26:02 +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 B6B8568D9A; Tue, 17 Aug 2021 16:26: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 862D24A70D; Tue, 17 Aug 2021 16:26:02 +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 17HGPcal020243 for ; Tue, 17 Aug 2021 12:25:38 -0400 Received: by smtp.corp.redhat.com (Postfix) id 9FEC6421F; Tue, 17 Aug 2021 16:25:38 +0000 (UTC) Received: from speedmetal.redhat.com (unknown [10.40.208.33]) by smtp.corp.redhat.com (Postfix) with ESMTP id 053D219C87 for ; Tue, 17 Aug 2021 16:25:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1629217572; 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=oF4T7TYvEVHJxC+R6Doid+xueKrIOCX8L0pvgsvGrZk=; b=TdJzYt+8p4wgNuBWBdnSWcEnMgouaj1q0sr8JhmmE16Hljc82XQGRcanT5COfwA7F3qJOu N4mUO8hf/kiysfpkzOvXVAQPzZTsWHhQlTh+v0Sb/kT3L7oKAAjB9sDgJ4Cm39T/9U2xnR YZ4JPkKxlwCvxzEWSfdbqap7GxPSckM= X-MC-Unique: fsEYidq8O_qyvhxGO6EkHw-1 From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH v2 07/23] qemuxml2argvtest: Add QEMU_CAPS_LAST in places where ARG_QEMU_CAPS is used Date: Tue, 17 Aug 2021 18:25:08 +0200 Message-Id: <0d6fd03a362b94b2bda430213c81af2f11c0736c.1629217367.git.pkrempa@redhat.com> 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.79 on 10.5.11.16 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: 1629217574036100001 Content-Type: text/plain; charset="utf-8" The 'DO_TEST_FULL' macro was ending the argument list which was being started in other macros. Move it so that 'ARG_QEMU_CAPS' and 'QEMU_CAPS_LAST' are always used in the same macro. Signed-off-by: Peter Krempa Reviewed-by: J=C3=A1n Tomko --- tests/qemuxml2argvtest.c | 40 ++++++++++++++++++---------------------- 1 file changed, 18 insertions(+), 22 deletions(-) diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index 6a3fa4c152..6162ebf3bb 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -1010,29 +1010,29 @@ mymain(void) # define DO_TEST_FULL(name, ...) \ DO_TEST_INTERNAL(name, "", \ - __VA_ARGS__, QEMU_CAPS_LAST, ARG_END) + __VA_ARGS__, ARG_END) /* All the following macros require an explicit QEMU_CAPS_* list * at the end of the argument list, or the NONE placeholder. * */ # define DO_TEST(name, ...) \ DO_TEST_FULL(name, \ - ARG_QEMU_CAPS, __VA_ARGS__) + ARG_QEMU_CAPS, __VA_ARGS__, QEMU_CAPS_LAST) # define DO_TEST_GIC(name, gic, ...) \ DO_TEST_FULL(name, \ ARG_GIC, gic, \ - ARG_QEMU_CAPS, __VA_ARGS__) + ARG_QEMU_CAPS, __VA_ARGS__, QEMU_CAPS_LAST) # define DO_TEST_FAILURE(name, ...) \ DO_TEST_FULL(name, \ ARG_FLAGS, FLAG_EXPECT_FAILURE, \ - ARG_QEMU_CAPS, __VA_ARGS__) + ARG_QEMU_CAPS, __VA_ARGS__, QEMU_CAPS_LAST) # define DO_TEST_PARSE_ERROR(name, ...) \ DO_TEST_FULL(name, \ ARG_FLAGS, FLAG_EXPECT_PARSE_ERROR | FLAG_EXPECT_FAILURE,= \ - ARG_QEMU_CAPS, __VA_ARGS__) + ARG_QEMU_CAPS, __VA_ARGS__, QEMU_CAPS_LAST) # define NONE QEMU_CAPS_LAST @@ -2016,26 +2016,23 @@ mymain(void) DO_TEST_FULL("restore-v2", ARG_MIGRATE_FROM, "exec:cat", - ARG_MIGRATE_FD, 7, - ARG_QEMU_CAPS, NONE); + ARG_MIGRATE_FD, 7); DO_TEST_FULL("restore-v2-fd", ARG_MIGRATE_FROM, "stdio", - ARG_MIGRATE_FD, 7, - ARG_QEMU_CAPS, NONE); + ARG_MIGRATE_FD, 7); DO_TEST_FULL("restore-v2-fd", ARG_MIGRATE_FROM, "fd:7", - ARG_MIGRATE_FD, 7, - ARG_QEMU_CAPS, NONE); + ARG_MIGRATE_FD, 7); DO_TEST_FULL("migrate", - ARG_MIGRATE_FROM, "tcp:10.0.0.1:5000", - ARG_QEMU_CAPS, NONE); + ARG_MIGRATE_FROM, "tcp:10.0.0.1:5000"); DO_TEST_FULL("migrate-numa-unaligned", ARG_MIGRATE_FROM, "stdio", ARG_MIGRATE_FD, 7, ARG_QEMU_CAPS, QEMU_CAPS_NUMA, - QEMU_CAPS_OBJECT_MEMORY_RAM); + QEMU_CAPS_OBJECT_MEMORY_RAM, + QEMU_CAPS_LAST); DO_TEST_CAPS_VER("qemu-ns", "4.0.0"); DO_TEST_CAPS_LATEST("qemu-ns"); @@ -2080,11 +2077,9 @@ mymain(void) DO_TEST("cpu-host-model", NONE); DO_TEST("cpu-host-model-vendor", NONE); DO_TEST_FULL("cpu-host-model-fallback", - ARG_FLAGS, FLAG_SKIP_LEGACY_CPUS, - ARG_QEMU_CAPS, NONE); + ARG_FLAGS, FLAG_SKIP_LEGACY_CPUS); DO_TEST_FULL("cpu-host-model-nofallback", - ARG_FLAGS, FLAG_SKIP_LEGACY_CPUS | FLAG_EXPECT_FAILURE, - ARG_QEMU_CAPS, NONE); + ARG_FLAGS, FLAG_SKIP_LEGACY_CPUS | FLAG_EXPECT_FAILURE); DO_TEST("cpu-host-passthrough", QEMU_CAPS_KVM); DO_TEST_FAILURE("cpu-qemu-host-passthrough", QEMU_CAPS_KVM); @@ -3111,7 +3106,8 @@ mymain(void) QEMU_CAPS_KVM, QEMU_CAPS_DEVICE_PC_DIMM, QEMU_CAPS_NUMA, QEMU_CAPS_DEVICE_SPAPR_PCI_HOST_BRIDGE, QEMU_CAPS_OBJECT_MEMORY_RAM, - QEMU_CAPS_OBJECT_MEMORY_FILE); + QEMU_CAPS_OBJECT_MEMORY_FILE, + QEMU_CAPS_LAST); DO_TEST_CAPS_LATEST("memory-hotplug-nvdimm"); DO_TEST_CAPS_LATEST("memory-hotplug-nvdimm-access"); DO_TEST_CAPS_VER("memory-hotplug-nvdimm-label", "5.2.0"); @@ -3248,7 +3244,8 @@ mymain(void) ARG_QEMU_CAPS, QEMU_CAPS_DEVICE_SPAPR_PCI_HOST_BRIDGE, QEMU_CAPS_NEC_USB_XHCI, - QEMU_CAPS_DEVICE_QEMU_XHCI); + QEMU_CAPS_DEVICE_QEMU_XHCI, + QEMU_CAPS_LAST); DO_TEST_PARSE_ERROR("ppc64-tpmproxy-double", QEMU_CAPS_DEVICE_SPAPR_PCI_HOST_BRIDGE, @@ -3285,8 +3282,7 @@ mymain(void) */ DO_TEST_FULL("missing-machine", ARG_FLAGS, FLAG_EXPECT_FAILURE, - ARG_PARSEFLAGS, VIR_DOMAIN_DEF_PARSE_SKIP_VALIDATE, - ARG_QEMU_CAPS, NONE); + ARG_PARSEFLAGS, VIR_DOMAIN_DEF_PARSE_SKIP_VALIDATE); DO_TEST("name-escape", QEMU_CAPS_NAME_DEBUG_THREADS, --=20 2.31.1 From nobody Thu May 2 19:58:24 2024 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=1629217574; cv=none; d=zohomail.com; s=zohoarc; b=PDiJobpsaBDC0zqoJ98eYg83/PDH2v6Fh+VPCZ83c1FeaVM1bbzk9yItehdrR8z2eWfW54XXhIyLms3IrFjqR3lWZhLIEBw9Ir9TvLfBAYcE/iyDtKBI6EecguSLiWj14wnQt1beWTCic0afh8rK4SykwHhbN/D6fGH+hJK3IZY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1629217574; 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=v/K25mHuWusquqBOAS4SP9uRagcogiCD9PT64n5lzY8=; b=grVfZaJ/W6cKeDE387b7YAtUQYkuruqpq3gs9Va81O6403nB58PxW1FPcOy5GZKE+tfUmzhmWx2tXQaFVkCTK8xZ+QLBL/+DExIbpun2w1pOdvocsd1b2GCe6FFsNaojDgdmVRpOaWDJELrYvgeekqXd65dIzX9EUb5o8QnpwjQ= 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 1629217574501888.6053289926629; Tue, 17 Aug 2021 09:26:14 -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-528-rWbFSX-QOuC4GCVBQOnuVA-1; Tue, 17 Aug 2021 12:26:11 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id DD4051008069; Tue, 17 Aug 2021 16:26:00 +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 C06E16E6E7; Tue, 17 Aug 2021 16:26:00 +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 89C6B181A2AD; Tue, 17 Aug 2021 16:26:00 +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 17HGPdBc020256 for ; Tue, 17 Aug 2021 12:25:39 -0400 Received: by smtp.corp.redhat.com (Postfix) id AA166421F; Tue, 17 Aug 2021 16:25:39 +0000 (UTC) Received: from speedmetal.redhat.com (unknown [10.40.208.33]) by smtp.corp.redhat.com (Postfix) with ESMTP id 0DD60620DE for ; Tue, 17 Aug 2021 16:25:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1629217573; 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=v/K25mHuWusquqBOAS4SP9uRagcogiCD9PT64n5lzY8=; b=BBl4FBDm23BL4b8vVnvbNyi8kl1Xiu9RpIoWwk07CrCUiSn1Tv9WukqlhO+zPb1To4rrgz zW2I4FcoIy/uM6fGgSPPD4Xgk64JOWnQYYjLNMMLwDHby9z48wOAZzvM4d51s/KAatKEx+ QXuXtnhyU34zfPdA2fGIEkCoATTieqA= X-MC-Unique: rWbFSX-QOuC4GCVBQOnuVA-1 From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH v2 08/23] qemuxml2argvtest: Rename DO_TEST_INTERNAL to DO_TEST_FULL and fix users Date: Tue, 17 Aug 2021 18:25:09 +0200 Message-Id: <4d32d44cd3dcb294e2138f70123bbf658f7d1a7c.1629217367.git.pkrempa@redhat.com> 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.79 on 10.5.11.11 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: 1629217576145100003 Content-Type: text/plain; charset="utf-8" 'DO_TEST_FULL' isn't a useful wrapper any more. Use the better name for the main macro and replace all uses. Signed-off-by: Peter Krempa Reviewed-by: J=C3=A1n Tomko --- tests/qemuxml2argvtest.c | 83 +++++++++++++++++++++------------------- 1 file changed, 43 insertions(+), 40 deletions(-) diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index 6162ebf3bb..6869eb6d86 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -936,7 +936,7 @@ mymain(void) * the test cases should be forked using DO_TEST_CAPS_VER with the appropr= iate * version. */ -# define DO_TEST_INTERNAL(_name, _suffix, ...) \ +# define DO_TEST_FULL(_name, _suffix, ...) \ do { \ static struct testQemuInfo info =3D { \ .name =3D _name, \ @@ -953,11 +953,11 @@ mymain(void) } while (0) # define DO_TEST_CAPS_INTERNAL(name, arch, ver, ...) \ - DO_TEST_INTERNAL(name, "." arch "-" ver, \ - ARG_CAPS_ARCH, arch, \ - ARG_CAPS_VER, ver, \ - __VA_ARGS__, \ - ARG_END) + DO_TEST_FULL(name, "." arch "-" ver, \ + ARG_CAPS_ARCH, arch, \ + ARG_CAPS_VER, ver, \ + __VA_ARGS__, \ + ARG_END) # define DO_TEST_CAPS_ARCH_LATEST_FULL(name, arch, ...) \ DO_TEST_CAPS_INTERNAL(name, arch, "latest", __VA_ARGS__) @@ -1008,31 +1008,26 @@ mymain(void) # define DO_TEST_CAPS_VER_PARSE_ERROR(name, ver) \ DO_TEST_CAPS_ARCH_VER_PARSE_ERROR(name, "x86_64", ver) -# define DO_TEST_FULL(name, ...) \ - DO_TEST_INTERNAL(name, "", \ - __VA_ARGS__, ARG_END) - /* All the following macros require an explicit QEMU_CAPS_* list * at the end of the argument list, or the NONE placeholder. * */ # define DO_TEST(name, ...) \ - DO_TEST_FULL(name, \ - ARG_QEMU_CAPS, __VA_ARGS__, QEMU_CAPS_LAST) + DO_TEST_FULL(name, "", ARG_QEMU_CAPS, __VA_ARGS__, QEMU_CAPS_LAST, ARG= _END) # define DO_TEST_GIC(name, gic, ...) \ - DO_TEST_FULL(name, \ + DO_TEST_FULL(name, "", \ ARG_GIC, gic, \ - ARG_QEMU_CAPS, __VA_ARGS__, QEMU_CAPS_LAST) + ARG_QEMU_CAPS, __VA_ARGS__, QEMU_CAPS_LAST, ARG_END) # define DO_TEST_FAILURE(name, ...) \ - DO_TEST_FULL(name, \ + DO_TEST_FULL(name, "", \ ARG_FLAGS, FLAG_EXPECT_FAILURE, \ - ARG_QEMU_CAPS, __VA_ARGS__, QEMU_CAPS_LAST) + ARG_QEMU_CAPS, __VA_ARGS__, QEMU_CAPS_LAST, ARG_END) # define DO_TEST_PARSE_ERROR(name, ...) \ - DO_TEST_FULL(name, \ + DO_TEST_FULL(name, "", \ ARG_FLAGS, FLAG_EXPECT_PARSE_ERROR | FLAG_EXPECT_FAILURE,= \ - ARG_QEMU_CAPS, __VA_ARGS__, QEMU_CAPS_LAST) + ARG_QEMU_CAPS, __VA_ARGS__, QEMU_CAPS_LAST, ARG_END) # define NONE QEMU_CAPS_LAST @@ -2014,25 +2009,28 @@ mymain(void) DO_TEST_CAPS_ARCH_LATEST_PARSE_ERROR("hostdev-subsys-mdev-vfio-ap-boot= -fail", "s390x"); - DO_TEST_FULL("restore-v2", + DO_TEST_FULL("restore-v2", "", ARG_MIGRATE_FROM, "exec:cat", - ARG_MIGRATE_FD, 7); - DO_TEST_FULL("restore-v2-fd", + ARG_MIGRATE_FD, 7, + ARG_END); + DO_TEST_FULL("restore-v2-fd", "", ARG_MIGRATE_FROM, "stdio", - ARG_MIGRATE_FD, 7); - DO_TEST_FULL("restore-v2-fd", + ARG_MIGRATE_FD, 7, + ARG_END); + DO_TEST_FULL("restore-v2-fd", "", ARG_MIGRATE_FROM, "fd:7", - ARG_MIGRATE_FD, 7); - DO_TEST_FULL("migrate", - ARG_MIGRATE_FROM, "tcp:10.0.0.1:5000"); + ARG_MIGRATE_FD, 7, ARG_END); + DO_TEST_FULL("migrate", "", + ARG_MIGRATE_FROM, "tcp:10.0.0.1:5000", ARG_END); - DO_TEST_FULL("migrate-numa-unaligned", + DO_TEST_FULL("migrate-numa-unaligned", "", ARG_MIGRATE_FROM, "stdio", ARG_MIGRATE_FD, 7, ARG_QEMU_CAPS, QEMU_CAPS_NUMA, QEMU_CAPS_OBJECT_MEMORY_RAM, - QEMU_CAPS_LAST); + QEMU_CAPS_LAST, + ARG_END); DO_TEST_CAPS_VER("qemu-ns", "4.0.0"); DO_TEST_CAPS_LATEST("qemu-ns"); @@ -2076,10 +2074,11 @@ mymain(void) DO_TEST("cpu-numa-memshared", QEMU_CAPS_OBJECT_MEMORY_FILE); DO_TEST("cpu-host-model", NONE); DO_TEST("cpu-host-model-vendor", NONE); - DO_TEST_FULL("cpu-host-model-fallback", - ARG_FLAGS, FLAG_SKIP_LEGACY_CPUS); - DO_TEST_FULL("cpu-host-model-nofallback", - ARG_FLAGS, FLAG_SKIP_LEGACY_CPUS | FLAG_EXPECT_FAILURE); + DO_TEST_FULL("cpu-host-model-fallback", "", + ARG_FLAGS, FLAG_SKIP_LEGACY_CPUS, ARG_END); + DO_TEST_FULL("cpu-host-model-nofallback", "", + ARG_FLAGS, FLAG_SKIP_LEGACY_CPUS | FLAG_EXPECT_FAILURE, + ARG_END); DO_TEST("cpu-host-passthrough", QEMU_CAPS_KVM); DO_TEST_FAILURE("cpu-qemu-host-passthrough", QEMU_CAPS_KVM); @@ -3100,14 +3099,15 @@ mymain(void) DO_TEST("memory-hotplug-ppc64-nonuma", QEMU_CAPS_KVM, QEMU_CAPS_DEVICE= _PC_DIMM, QEMU_CAPS_NUMA, QEMU_CAPS_DEVICE_SPAPR_PCI_HOST_BRIDGE, QEMU_CAPS_OBJECT_MEMORY_RAM, QEMU_CAPS_OBJECT_MEMORY_FILE); - DO_TEST_FULL("memory-hotplug-ppc64-nonuma-abi-update", + DO_TEST_FULL("memory-hotplug-ppc64-nonuma-abi-update", "", ARG_PARSEFLAGS, VIR_DOMAIN_DEF_PARSE_ABI_UPDATE, ARG_QEMU_CAPS, QEMU_CAPS_KVM, QEMU_CAPS_DEVICE_PC_DIMM, QEMU_CAPS_NUMA, QEMU_CAPS_DEVICE_SPAPR_PCI_HOST_BRIDGE, QEMU_CAPS_OBJECT_MEMORY_RAM, QEMU_CAPS_OBJECT_MEMORY_FILE, - QEMU_CAPS_LAST); + QEMU_CAPS_LAST, + ARG_END); DO_TEST_CAPS_LATEST("memory-hotplug-nvdimm"); DO_TEST_CAPS_LATEST("memory-hotplug-nvdimm-access"); DO_TEST_CAPS_VER("memory-hotplug-nvdimm-label", "5.2.0"); @@ -3121,13 +3121,14 @@ mymain(void) DO_TEST("memory-hotplug-nvdimm-ppc64", QEMU_CAPS_DEVICE_SPAPR_PCI_HOST= _BRIDGE, QEMU_CAPS_OBJECT_MEMORY_FILE, QEMU_CAPS_DEVICE_NVDIMM); - DO_TEST_FULL("memory-hotplug-nvdimm-ppc64-abi-update", + DO_TEST_FULL("memory-hotplug-nvdimm-ppc64-abi-update", "", ARG_PARSEFLAGS, VIR_DOMAIN_DEF_PARSE_ABI_UPDATE, ARG_QEMU_CAPS, QEMU_CAPS_DEVICE_SPAPR_PCI_HOST_BRIDGE, QEMU_CAPS_OBJECT_MEMORY_FILE, QEMU_CAPS_DEVICE_NVDIMM, - QEMU_CAPS_LAST); + QEMU_CAPS_LAST, + ARG_END); DO_TEST_CAPS_VER("memory-hotplug-virtio-pmem", "5.2.0"); DO_TEST_CAPS_LATEST("memory-hotplug-virtio-pmem"); @@ -3239,13 +3240,14 @@ mymain(void) DO_TEST("ppc64-usb-controller-legacy", QEMU_CAPS_DEVICE_SPAPR_PCI_HOST_BRIDGE, QEMU_CAPS_PIIX3_USB_UHCI); - DO_TEST_FULL("ppc64-usb-controller-qemu-xhci", + DO_TEST_FULL("ppc64-usb-controller-qemu-xhci", "", ARG_PARSEFLAGS, VIR_DOMAIN_DEF_PARSE_ABI_UPDATE, ARG_QEMU_CAPS, QEMU_CAPS_DEVICE_SPAPR_PCI_HOST_BRIDGE, QEMU_CAPS_NEC_USB_XHCI, QEMU_CAPS_DEVICE_QEMU_XHCI, - QEMU_CAPS_LAST); + QEMU_CAPS_LAST, + ARG_END); DO_TEST_PARSE_ERROR("ppc64-tpmproxy-double", QEMU_CAPS_DEVICE_SPAPR_PCI_HOST_BRIDGE, @@ -3280,9 +3282,10 @@ mymain(void) * the wrong binary for the arch. We expect to get a failure about * bad arch later when creating the pretend command. */ - DO_TEST_FULL("missing-machine", + DO_TEST_FULL("missing-machine", "", ARG_FLAGS, FLAG_EXPECT_FAILURE, - ARG_PARSEFLAGS, VIR_DOMAIN_DEF_PARSE_SKIP_VALIDATE); + ARG_PARSEFLAGS, VIR_DOMAIN_DEF_PARSE_SKIP_VALIDATE, + ARG_END); DO_TEST("name-escape", QEMU_CAPS_NAME_DEBUG_THREADS, --=20 2.31.1 From nobody Thu May 2 19:58:24 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) client-ip=216.205.24.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 216.205.24.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=1629217577; cv=none; d=zohomail.com; s=zohoarc; b=YjHHN4MBHUHK5SXKoRq7rP6THlJq2qJWBXPvWrkmY+4I7jZL630lMCF2vLvkCIyhIIMQJEDsZk8nATmbmXYJOcrXNVHPLuE9NK3h2cFaiJ7N50/984f9inti9QKv9JtDHJI+mPOixoT7zrRQI1nAFwI7rj3O2dEe5NkgGCZ3ODo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1629217577; 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=kk6Fm2HdKHo+JNqnma7QRqTuzS+kNGgEMv3gPQk3OjU=; b=ZiLHNX9KJrq8GdPosNQqTe0quFR2V5cyAzNKWE0g7QZ3/DfOUYCubdvBuQ0gxR4vXTm3IWCAnjhmDJaiuATfqDydiauGPkl3S4O3fwKsFCxyjlXZvLAEFZ2UYZz8pkQ5Ukv6VCoX2Pjoq44GQBao30Pner2+fI4+L/LMjHJ7xlQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.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 [216.205.24.124]) by mx.zohomail.com with SMTPS id 1629217577829305.97161507560793; Tue, 17 Aug 2021 09:26:17 -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-225-6Vw-PMeAOuO3Si4T9tkOUw-1; Tue, 17 Aug 2021 12:26:15 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 395AC100806C; Tue, 17 Aug 2021 16:26:03 +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 0EFE96A91C; Tue, 17 Aug 2021 16:26:03 +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 C81B2181A2E4; Tue, 17 Aug 2021 16:26:02 +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 17HGPf7M020271 for ; Tue, 17 Aug 2021 12:25:41 -0400 Received: by smtp.corp.redhat.com (Postfix) id 04C97421F; Tue, 17 Aug 2021 16:25:41 +0000 (UTC) Received: from speedmetal.redhat.com (unknown [10.40.208.33]) by smtp.corp.redhat.com (Postfix) with ESMTP id 22B58620DE for ; Tue, 17 Aug 2021 16:25:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1629217576; 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=kk6Fm2HdKHo+JNqnma7QRqTuzS+kNGgEMv3gPQk3OjU=; b=PCnUWhoOe5u2g6yMSue3t1mwHMj/LP3wEbsTr3MkMB7c5q9v0y4z8h1zmBIdrBpxaOE/EY fKnE9QeVMD7aTWIvySj8oFxlpxzNEM5kFfgbYjEPLGfdEl9TtnBw1Vy5slWtKYu8VmqQhL qcuzFcVe9AmKCXNIoAJsvcrSiif8nho= X-MC-Unique: 6Vw-PMeAOuO3Si4T9tkOUw-1 From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH v2 09/23] qemuxml2argvtest: Add 'DO_TEST_NOCAPS' to replace 'DO_TEST("blah", NONE); ' Date: Tue, 17 Aug 2021 18:25:10 +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.79 on 10.5.11.15 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: 1629217578720100010 Content-Type: text/plain; charset="utf-8" Add a explicit version of our test invocation macro for tests which use no capabilities. This reduces the usage of the somewhat anonymous 'NONE' macro and will lead to simplification of the code later. Signed-off-by: Peter Krempa Reviewed-by: J=C3=A1n Tomko --- tests/qemuxml2argvtest.c | 350 ++++++++++++++++++++------------------- 1 file changed, 176 insertions(+), 174 deletions(-) diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index 6869eb6d86..bb2534ffc9 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -1013,6 +1013,8 @@ mymain(void) * */ # define DO_TEST(name, ...) \ DO_TEST_FULL(name, "", ARG_QEMU_CAPS, __VA_ARGS__, QEMU_CAPS_LAST, ARG= _END) +# define DO_TEST_NOCAPS(name) \ + DO_TEST_FULL(name, "", ARG_END) # define DO_TEST_GIC(name, gic, ...) \ DO_TEST_FULL(name, "", \ @@ -1045,7 +1047,7 @@ mymain(void) g_unsetenv("QEMU_AUDIO_DRV"); g_unsetenv("SDL_AUDIODRIVER"); - DO_TEST("minimal", NONE); + DO_TEST_NOCAPS("minimal"); DO_TEST("minimal-sandbox", QEMU_CAPS_SECCOMP_BLACKLIST); DO_TEST_PARSE_ERROR("minimal-no-memory", NONE); @@ -1054,11 +1056,11 @@ mymain(void) DO_TEST_CAPS_LATEST("genid"); DO_TEST_CAPS_LATEST("genid-auto"); - DO_TEST("machine-aliases1", NONE); + DO_TEST_NOCAPS("machine-aliases1"); DO_TEST("machine-aliases2", QEMU_CAPS_KVM); - DO_TEST("machine-core-on", NONE); + DO_TEST_NOCAPS("machine-core-on"); driver.config->dumpGuestCore =3D true; - DO_TEST("machine-core-off", NONE); + DO_TEST_NOCAPS("machine-core-off"); driver.config->dumpGuestCore =3D false; DO_TEST("machine-smm-opt", QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE, @@ -1068,24 +1070,24 @@ mymain(void) QEMU_CAPS_VIRTIO_SCSI); DO_TEST("machine-vmport-opt", QEMU_CAPS_MACHINE_VMPORT_OPT); - DO_TEST("default-kvm-host-arch", NONE); - DO_TEST("default-qemu-host-arch", NONE); - DO_TEST("x86-kvm-32-on-64", NONE); - DO_TEST("boot-cdrom", NONE); - DO_TEST("boot-network", NONE); - DO_TEST("boot-floppy", NONE); + DO_TEST_NOCAPS("default-kvm-host-arch"); + DO_TEST_NOCAPS("default-qemu-host-arch"); + DO_TEST_NOCAPS("x86-kvm-32-on-64"); + DO_TEST_NOCAPS("boot-cdrom"); + DO_TEST_NOCAPS("boot-network"); + DO_TEST_NOCAPS("boot-floppy"); DO_TEST("boot-floppy-q35", QEMU_CAPS_DEVICE_IOH3420, QEMU_CAPS_ICH9_AHCI); - DO_TEST("boot-multi", NONE); - DO_TEST("boot-menu-enable", NONE); + DO_TEST_NOCAPS("boot-multi"); + DO_TEST_NOCAPS("boot-menu-enable"); DO_TEST("boot-menu-enable-with-timeout", QEMU_CAPS_SPLASH_TIMEOUT); DO_TEST_PARSE_ERROR("boot-menu-enable-with-timeout", NONE); DO_TEST_PARSE_ERROR("boot-menu-enable-with-timeout-invalid", QEMU_CAPS_SPLASH_TIMEOUT); - DO_TEST("boot-menu-disable", NONE); - DO_TEST("boot-menu-disable-drive", NONE); + DO_TEST_NOCAPS("boot-menu-disable"); + DO_TEST_NOCAPS("boot-menu-disable-drive"); DO_TEST_PARSE_ERROR("boot-dev+order", QEMU_CAPS_VIRTIO_BLK_SCSI); DO_TEST("boot-order", @@ -1097,15 +1099,15 @@ mymain(void) QEMU_CAPS_VIRTIO_BLK_SCSI); /* Simplest possible