From nobody Sun Feb 8 18:32:30 2026 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=1621243029; cv=none; d=zohomail.com; s=zohoarc; b=Sypmyxj/08R4Lfm04/DkoqNLKMP8eo/Y+HKOUEsPuTBYZlnObsdYnWexsCftFpp/I70BVjWWrZ3vuvWrmDzqxphWSgdoGit6Qy14/UyWtzM7QCpRhYrcO9LaEP1SDnbLJ9Y+HYSuQmcX9dMZ8YbOBAgjA85AA6eRhZg30+3imnQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1621243029; 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=e8hLWF8rP+yBJuCBB8yfhe2HvAeL/d6dhsxNHr0CfKk=; b=EAuwl1rfOK8xt4V325BcApFfujBeGP3dOfK8/X2a/2IvOGZ/+ThrP1uOJtTwRaXS93KkChk1bJZHxp/H8KrXy/KAixF085RReQwsavYfCIrAVvWij21fI3fTdTPi3oOtYD4Mm09baX48cAvKsEiekUkWVisEBdGpmU+zG6pZ3VY= 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) header.from= 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 162124302923292.58283542228264; Mon, 17 May 2021 02:17: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-561-ovF2JUq6NyiJA2fEc_-5sw-1; Mon, 17 May 2021 05:17:06 -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 D7371107ACE3; Mon, 17 May 2021 09:16:59 +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 B03E4100AE43; Mon, 17 May 2021 09:16:59 +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 7F600180B465; Mon, 17 May 2021 09:16:59 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 14H9GbqI029661 for ; Mon, 17 May 2021 05:16:37 -0400 Received: by smtp.corp.redhat.com (Postfix) id C53121007625; Mon, 17 May 2021 09:16:37 +0000 (UTC) Received: from speedmetal.lan (unknown [10.40.208.52]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3264C10023AB for ; Mon, 17 May 2021 09:16:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1621243028; 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=e8hLWF8rP+yBJuCBB8yfhe2HvAeL/d6dhsxNHr0CfKk=; b=SCSYs83NqVlzeNHnuzyTGafSIRSEjZC+VJqMA9CiWgCrweIgyMEgbALwexmLGAbKuyhGsU RIFVBDXdBy25MqKP4QKb9ov66q6X1mFLedJC2w4SAztBxj3q1lLDSlpoCp/aCwSTYlZbp/ UTUGIRIAYtsjZyoWjee+8QHVyWw551I= X-MC-Unique: ovF2JUq6NyiJA2fEc_-5sw-1 From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 1/4] testQemuInfoSetArgs: Strip default machine alias only for 'latest' test cases Date: Mon, 17 May 2021 11:16:32 +0200 Message-Id: <50d2cde289d0e2bf0eb19bbd6b4046ae8f92bef8.1621242770.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 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) Content-Type: text/plain; charset="utf-8" For the real-capabilities test cases testing 'latest' capabilities we strip off the alias from 'pc' to the appropriate versioned machine type to prevent update to all tests when bumping qemu capabilities. Recenly we also started caching the capabilities to prevent re-parsing the XML all the time. The commit adding the caching kept the alias stripping prior to cache insertion, thus the cache contains the stripped alias. This leads to problem when a test case is added where the 'latest' equals to the selected version. Move the machine alias stripping after we create a local copy thus stripping it only for 'latest' tests. Signed-off-by: Peter Krempa --- tests/testutilsqemu.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/testutilsqemu.c b/tests/testutilsqemu.c index 1a3eae2c07..1444abc401 100644 --- a/tests/testutilsqemu.c +++ b/tests/testutilsqemu.c @@ -790,9 +790,6 @@ testQemuInfoSetArgs(struct testQemuInfo *info, if (!(qemuCaps =3D qemuTestParseCapabilitiesArch(info->arch, c= apsfile))) goto cleanup; - if (stripmachinealiases) - virQEMUCapsStripMachineAliases(qemuCaps); - cachedcaps =3D qemuCaps; g_hash_table_insert(capscache, g_strdup(capsfile), g_steal_poi= nter(&qemuCaps)); @@ -801,6 +798,9 @@ testQemuInfoSetArgs(struct testQemuInfo *info, if (!(qemuCaps =3D virQEMUCapsNewCopy(cachedcaps))) goto cleanup; + if (stripmachinealiases) + virQEMUCapsStripMachineAliases(qemuCaps); + info->flags |=3D FLAG_REAL_CAPS; /* provide path to the replies file for schema testing */ --=20 2.30.2