From nobody Fri Apr 26 16:14:50 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 207.211.31.81 as permitted sender) client-ip=207.211.31.81; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.81 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=1578507622; cv=none; d=zohomail.com; s=zohoarc; b=CtJH3uV3m6fesNFq6qOGd20Yf2WwwIFjzPdYGkzq0+2nWDkMUUsE9KnjsA5w4GP/M7jp0yTpw/0oLJqGpdxqHf2NyYCJBnAlWZ7fWrRo4BZfC82uAnvWjSerf27v/gvSxnNV9/jxDlsCZ8Z8Y0WJ43vSnI9kQ/fDo1AHRdukoc8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1578507622; h=Content-Type:Content-Transfer-Encoding:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=+r7rfFuX/HrOP6kNDITFyg0lQrtc8jWXnzyEH0vFPG4=; b=JR3l2HadHq/5F8WQjW9dxi1u3wqWklis8mnf5TZ8xp0Kb9Rhias+whOglOM1fqo7/aMDQHar3guU4JQ5yMCnn9A0BPsUtwQnZdBi47CMJOHlZdlJDBWg6NewxU5/vOA6/PZYSAoKz2iPL5W0d8uIYH/UpP7BNUxVGJInhzk1gNA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.81 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-1.mimecast.com (us-smtp-2.mimecast.com [207.211.31.81]) by mx.zohomail.com with SMTPS id 1578507622163366.9162638241147; Wed, 8 Jan 2020 10:20:22 -0800 (PST) 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-195-hpeXIsBWNSa92xpGuI6NKg-1; Wed, 08 Jan 2020 13:20:19 -0500 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 24136DB21; Wed, 8 Jan 2020 18:20:12 +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 D92EE60CD0; Wed, 8 Jan 2020 18:20:11 +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 122CE18089CD; Wed, 8 Jan 2020 18:20:10 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 008IK87N019305 for ; Wed, 8 Jan 2020 13:20:08 -0500 Received: by smtp.corp.redhat.com (Postfix) id 817FE86C67; Wed, 8 Jan 2020 18:20:08 +0000 (UTC) Received: from domokun.gsslab.fab.redhat.com (dhcp-46.gsslab.fab.redhat.com [10.33.9.46]) by smtp.corp.redhat.com (Postfix) with ESMTP id E5F5386C5F; Wed, 8 Jan 2020 18:20:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1578507621; 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:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=+r7rfFuX/HrOP6kNDITFyg0lQrtc8jWXnzyEH0vFPG4=; b=ivi3SinRloFZQ/Vjcv4ZCWZDErsCgQHrFa1KvJfLFBiV2+bjWmNWr178YEVXhPNHWGCdV5 OAWBz/2RB7TQt0yuxrUU7ojL0k4W/34b4FyiS4VeNakC3ap31a80VN/YNDisVjIuE31QHF S3qobTpgCc67LzCcMKs+n4YU7P4/9JY= From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= To: libvir-list@redhat.com Date: Wed, 8 Jan 2020 18:20:02 +0000 Message-Id: <20200108182002.1199650-1-berrange@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH] tests: avoid probing host CPU from bhyve test 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 X-MC-Unique: hpeXIsBWNSa92xpGuI6NKg-1 X-Mimecast-Spam-Score: 0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) bhyveargv2xmlmock calls virBhyveCapsBuild which in turn calls virCPUProbeHost, probing the real host CPU. This causes a test failure if the host CPU happens to contain the 'arch-capabilities' feature as it triggers a call to virHostCPUGetMSR() which fails on FreeBSD. Fortunately we already have convenient code for mocking the host CPU probing. Signed-off-by: Daniel P. Berrang=C3=A9 Reviewed-by: Michal Privoznik --- tests/bhyveargv2xmlmock.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/bhyveargv2xmlmock.c b/tests/bhyveargv2xmlmock.c index 1f08bebb7b..8120be29c1 100644 --- a/tests/bhyveargv2xmlmock.c +++ b/tests/bhyveargv2xmlmock.c @@ -2,7 +2,9 @@ =20 #include "virnetdev.h" #include "internal.h" +#include "testutilshostcpus.h" #include "util/viruuid.h" +#include "cpu/cpu.h" =20 #define VIR_FROM_THIS VIR_FROM_BHYVE =20 @@ -25,3 +27,9 @@ virUUIDGenerate(unsigned char *uuid) return -1; return 0; } + +virCPUDefPtr +virCPUProbeHost(virArch arch) +{ + return testUtilsHostCpusGetDefForArch(arch); +} --=20 2.24.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list