From nobody Wed Apr 24 11:03:43 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) client-ip=63.128.21.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 63.128.21.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=1617706895; cv=none; d=zohomail.com; s=zohoarc; b=H14cMXn4tERW77X5VaziE/jHl+ytRuwfmfBf1Znahqdwoc06p0epF3YDS7XyzjePmWAGPu64lukc4pGjihELQCrzuBs1z3kjpn8bgWXMAooJr2gsylWS8RRVWVH3D31X3pDs25f/tfCLacVc6XkMApPdJahV8+MWLWTDd+K3cnE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1617706895; 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=jiUGZJk1fbUlFTL1fJJE7H+egN+0eXg/1l6N8Lm8WUs=; b=n3lAnvCYJY5qfTd8iNRKdVjh8ogqqQwH6s1/zX9I/zZyNzMdDk55XTkpZm1Y/fKMw4xhFFn3q2thQ0v1IeE5+ohPxYqFtiykzTAGwM0yOxbzTimJgTH5Ui221782MntnHjL1yZvinLbGeRlbCyheT24quVFvKsj+cjnIwb6ADpY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.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 [63.128.21.124]) by mx.zohomail.com with SMTPS id 1617706895849183.81210428316308; Tue, 6 Apr 2021 04:01:35 -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-556-3jeE6qWXNj-Zi7Xq0G541Q-1; Tue, 06 Apr 2021 07:01:30 -0400 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 38F6D84B9A1; Tue, 6 Apr 2021 11:01:25 +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 DF61D60C17; Tue, 6 Apr 2021 11:01:23 +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 4C54B1809C84; Tue, 6 Apr 2021 11:01:20 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 136B1IUL025821 for ; Tue, 6 Apr 2021 07:01:18 -0400 Received: by smtp.corp.redhat.com (Postfix) id 2163F71928; Tue, 6 Apr 2021 11:01:18 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-114-172.ams2.redhat.com [10.36.114.172]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3018D6B8F8; Tue, 6 Apr 2021 11:01:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1617706893; 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=jiUGZJk1fbUlFTL1fJJE7H+egN+0eXg/1l6N8Lm8WUs=; b=iGxboyV9FMASjKbldfb4U07yaA+DbvptTu5eKWinrXzofbLoB5ZUncjZU2wPS6oyBNB1wB k1ABQQ1jjQOchRLKT3jxWBnwmf9KjN5lxqtBHw6RhA5TKlgoVnUJJuB9XiBi7GF+iy7hXi oXa8EVRUvyYFg1dGWH6SyLCV3GZWEag= X-MC-Unique: 3jeE6qWXNj-Zi7Xq0G541Q-1 From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= To: libvir-list@redhat.com Subject: [libvirt PATCH] tests: add warning that qemucapsprobe prefers native host/guest arch Date: Tue, 6 Apr 2021 12:01:07 +0100 Message-Id: <20210406110107.234447-1-berrange@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 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.12 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-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Generally we want the QEMU capabilities data in git to report KVM related features, and thus we strongly prefer that the capabilities are generated on a native host. Signed-off-by: Daniel P. Berrang=C3=A9 Reviewed-by: Andrea Bolognani --- tests/qemucapsprobe.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/tests/qemucapsprobe.c b/tests/qemucapsprobe.c index 26ea9ff5ed..e4d09468bd 100644 --- a/tests/qemucapsprobe.c +++ b/tests/qemucapsprobe.c @@ -46,6 +46,7 @@ main(int argc, char **argv) { virThread thread; virQEMUCapsPtr caps; + virArch guest, host; const char *mock =3D VIR_TEST_MOCK("qemucapsprobe"); =20 if (!virFileIsExecutable(mock)) { @@ -80,6 +81,17 @@ main(int argc, char **argv) -1, -1, NULL, 0, NULL))) return EXIT_FAILURE; =20 + host =3D virArchFromHost(); + guest =3D virQEMUCapsGetArch(caps); + + if (host !=3D guest) + fprintf(stderr, + "WARNING: guest architecture '%s' does not match host '%s'= .\n" + "WARNING: When generating capabilities for the libvirt tes= t\n" + "WARNING: suite, it is strongly desired to generate capabi= lities\n" + "WARNING: on the native host to capture KVM related featur= es.\n", + virArchToString(guest), virArchToString(host)); + virObjectUnref(caps); =20 return EXIT_SUCCESS; --=20 2.30.2