From nobody Fri May 3 14:17:16 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 153546601366352.00834757350708; Tue, 28 Aug 2018 07:20:13 -0700 (PDT) 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 mx1.redhat.com (Postfix) with ESMTPS id 768CD88316; Tue, 28 Aug 2018 14:20:10 +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 CFB4CA0A99; Tue, 28 Aug 2018 14:20:08 +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 B7BE34BB75; Tue, 28 Aug 2018 14:20:06 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w7SEK461029067 for ; Tue, 28 Aug 2018 10:20:04 -0400 Received: by smtp.corp.redhat.com (Postfix) id 8B318202704E; Tue, 28 Aug 2018 14:20:04 +0000 (UTC) Received: from virval.usersys.redhat.com (unknown [10.43.2.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 67CD52026D6B for ; Tue, 28 Aug 2018 14:20:01 +0000 (UTC) Received: by virval.usersys.redhat.com (Postfix, from userid 500) id 764C91038E3; Tue, 28 Aug 2018 16:20:00 +0200 (CEST) From: Jiri Denemark To: libvir-list@redhat.com Date: Tue, 28 Aug 2018 16:17:30 +0200 Message-Id: X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH] tests: Properly reset mocked CPU model 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: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Tue, 28 Aug 2018 14:20:12 +0000 (UTC) X-ZohoMail: RDMRC_0 RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" When switching the host architecture to something for which we do not have any host CPU model defined, the mocked virQEMUCapsProbeHostCPUForEmulator would just return the previous CPU model resulting in strange combinations, such as "core2duo" host CPU model in QEMU capabilities for "AArch64" architecture. It currently doesn't break any test case, but we should fix it anyway to avoid future surprises which would be quite hard to debug. Signed-off-by: Jiri Denemark Reviewed-by: Erik Skultety --- tests/testutilsqemu.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/testutilsqemu.c b/tests/testutilsqemu.c index 8438613f28..52ea6bf655 100644 --- a/tests/testutilsqemu.c +++ b/tests/testutilsqemu.c @@ -575,6 +575,8 @@ qemuTestSetHostCPU(virCapsPtr caps, setenv("VIR_TEST_MOCK_FAKE_HOST_CPU", cpu->model, 1); else unsetenv("VIR_TEST_MOCK_FAKE_HOST_CPU"); + } else { + unsetenv("VIR_TEST_MOCK_FAKE_HOST_CPU"); } caps->host.cpu =3D cpu; } --=20 2.18.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list