From nobody Mon Feb 9 12:29:39 2026 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=1641462379; cv=none; d=zohomail.com; s=zohoarc; b=jKSR2kwbxevoNN4/SBZ5MTSnHjH4p6OLWSh4El35zRlj3k5wMRy9FKXz/hL/AcoIwC5cM2HVjRz+6EO4yywyuu9wdoQCryomCZKz0TZIssZPDX3jr3+FL9fSdqUpx5/PN/sb7WOxNy0NlxiPu9LcpiLWhxCmSFHIMcnLE2yPE2A= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1641462379; 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=2t8Aw5ewtu58eR5FBA78WkmtBWIbbId6E4wEpbnnKVA=; b=YVra0hzoLoVrhQ1WCfZga67voLwchcQrxRpnDWnjSAvTsgRElvabxpZgpqNwcrUcaLYLeTutaZEfRjKPXMO1AnbtKRSokPaMieXo7kDs6v7koyJgJiyXllQjYbrfqRgKP30H3Gnd5TcaiyR+epXqIIWsf7vO5RpeleOk+bAnwT4= 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 1641462379934324.3134236844646; Thu, 6 Jan 2022 01:46:19 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-201-7cVn3ryoMjKw9CMpnnES2A-1; Thu, 06 Jan 2022 04:46:10 -0500 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 67732100CCD0; Thu, 6 Jan 2022 09:46:04 +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 DB0768462B; Thu, 6 Jan 2022 09:46: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 A86AB4A7C8; Thu, 6 Jan 2022 09:46:03 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 2069k2Op005779 for ; Thu, 6 Jan 2022 04:46:02 -0500 Received: by smtp.corp.redhat.com (Postfix) id 3186B7CAD2; Thu, 6 Jan 2022 09:46:02 +0000 (UTC) Received: from speedmetal.lan (unknown [10.40.208.34]) by smtp.corp.redhat.com (Postfix) with ESMTP id 953577D473 for ; Thu, 6 Jan 2022 09:46:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1641462378; 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=2t8Aw5ewtu58eR5FBA78WkmtBWIbbId6E4wEpbnnKVA=; b=HyG6yHkG1B/Y5paKffTKWoNS0YnV1kBGKFCs6J4/jLoyBb+9b6CVp+0ZmwBxt3Va+msAne fKwAITZz4KZHz9lJ48pq4QFvx8U2z6HQNoxg1F8ulhy2yJdQtc2J7IZ8oEyHJiuwYBnIqk gdOSWDcTUGGgaZmHLrwZPJsXVFh4roo= X-MC-Unique: 7cVn3ryoMjKw9CMpnnES2A-1 From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 16/21] qemuxml2argvtest: Don't insert capabilities into cache twice Date: Thu, 6 Jan 2022 10:44:15 +0100 Message-Id: <46b7a12b767b5032ec9a1917277f12de77fac315.1641461748.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 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 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: 1641462380292100007 Content-Type: text/plain; charset="utf-8" Fake capabilities are inserted twice, as in a few tests the architecture is not present in the XML (testing filling in of the architecture). Since we already know which architecture will be picked we don't need to be adding the capabilities twice. This doesn't impact the tests as they use the same approach to determine the default arch. Signed-off-by: Peter Krempa --- tests/qemuxml2argvtest.c | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index b5e10bb4f0..127f050058 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -760,11 +760,11 @@ testCompareXMLToArgv(const void *data) ctxt->node =3D root; - if ((archstr =3D virXPathString("string(./os/type[1]/@arch)", ctxt))) { - if ((arch =3D virArchFromString(archstr)) =3D=3D VIR_ARCH_NONE) { - arch =3D virArchFromHost(); - } - } + if ((archstr =3D virXPathString("string(./os/type[1]/@arch)", ctxt))) + arch =3D virArchFromString(archstr); + + if (arch =3D=3D VIR_ARCH_NONE) + arch =3D virArchFromHost(); if (!(info->flags & FLAG_REAL_CAPS)) { if (testUpdateQEMUCaps(info, arch, driver.caps) < 0) @@ -823,13 +823,6 @@ testCompareXMLToArgv(const void *data) if (qemuProcessPrepareMonitorChr(&monitor_chr, priv->libDir) < 0) goto cleanup; - if (!(info->flags & FLAG_REAL_CAPS)) { - if (testUpdateQEMUCaps(info, vm->def->os.arch, driver.caps) < 0) - goto cleanup; - if (qemuTestCapsCacheInsert(driver.qemuCapsCache, info->qemuCaps) = < 0) - goto cleanup; - } - virResetLastError(); if (!(cmd =3D testCompareXMLToArgvCreateArgs(&driver, vm, migrateURI, = info, --=20 2.31.1