From nobody Mon Sep 16 19:10:00 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=1693923920; cv=none; d=zohomail.com; s=zohoarc; b=Rw01+/VdOd4weJVkTNCODyTgJYoe3OXuEavuts7JDrXe+J39maI4qWjQivh8j/60yln4hX8dWp3BxHCWoWE9W0XqMDRNZguBBb617wIYcIzMBPIo2cZ1dcjnROnQAohyvW/VlofTNFanDyCKd0DSfleSc1f8DhM22+PWON0i1lI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1693923920; 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=i9fR7Vrz7TAjz6UrcC/JhTg2QRVr4GFOMYiUOeEM/GY=; b=K27YJWtwxJup81omOC58KdRWX5gRXokjg001WsurQqhiR5c0RhpwFpR5BDsZCRMZHGs0QH1PogldzP6eumNLxvhVJn+1tMr94Vj7JPaV7+r+HmhWC+IX7irshSI1Os98ZT7JRj1qietvrdzwSbd8mmuf0dImKBbk+lna6sPYmQE= 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 1693923920325147.90206586512295; Tue, 5 Sep 2023 07:25:20 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-237-Nsoe514LNealraxoQOmffA-1; Tue, 05 Sep 2023 10:24:59 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 03EE81E441DB; Tue, 5 Sep 2023 14:24:29 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id E174F2026D76; Tue, 5 Sep 2023 14:24:28 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id A81001946595; Tue, 5 Sep 2023 14:24:28 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 2B9DD1946589 for ; Tue, 5 Sep 2023 14:24:27 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 19FB01121319; Tue, 5 Sep 2023 14:24:27 +0000 (UTC) Received: from speedmetal.lan (unknown [10.45.242.18]) by smtp.corp.redhat.com (Postfix) with ESMTP id 87F6A1005B8E for ; Tue, 5 Sep 2023 14:24:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1693923919; 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=i9fR7Vrz7TAjz6UrcC/JhTg2QRVr4GFOMYiUOeEM/GY=; b=DTXRWTdlmKMz1yACya6abKR7QgdJzHvETDugvKwLLv8nNCTTzdvTpsjdhjtVwMHtv/toL9 B2SWLNs7R10R3ZqMW6MS+bbdPbMpwuJipBsV419flGBE/wlPOCYvxFekkAoa0d4hVanXGP nkEwZYpfOfQtxWiqSUk8DJFGNMqsC7M= X-MC-Unique: Nsoe514LNealraxoQOmffA-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 04/51] qemuxml2argvtest: Clean up host CPU if overriden Date: Tue, 5 Sep 2023 16:23:31 +0200 Message-ID: <8d55d6cc13dbb363c8a2566a9817e4360ba740ab.1693923601.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.3 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 3.1 on 10.11.54.4 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: 1693923921948100003 Content-Type: text/plain; charset="utf-8" If a test uses ARG_CAPS_HOST_CPU_MODEL feature we override the global host cpu model to the selected CPU but don't clear it afterwards. This can trip up fake caps tests following a test which uses this feature. This does not happen with real caps, because unless overriden, the host cpu from capabilities is always populated as the host cpu. Clear the CPU on cleanup. Signed-off-by: Peter Krempa --- tests/qemuxml2argvtest.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index 5d23c552c5..32affb16c0 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -713,6 +713,9 @@ testCompareXMLToArgv(const void *data) ret =3D 0; cleanup: + /* clear overriden host cpu */ + if (info->args.capsHostCPUModel) + qemuTestSetHostCPU(&driver, driver.hostarch, NULL); virDomainChrSourceDefClear(&monitor_chr); virObjectUnref(vm); virIdentitySetCurrent(NULL); --=20 2.41.0