From nobody Fri Apr 26 00:02:27 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; dkim=fail; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1565885092; cv=none; d=zoho.com; s=zohoarc; b=BTKiO3bnkpCW/m8XsmwlinfEZ3frG9rjEZWLq34ExA48w3j9NJ0A+dRb48jklgmdjCyV6+4ZI6+2So9HYHyfAtN9zgHUEgdToe95gWEcGpJO5VIDhDC8Qp1ZrQWPwhsSiL1YxA26I0iTOs72e1e7zyyISmLMmReMXaAlX0fexEE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1565885092; 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:ARC-Authentication-Results; bh=1XErOmmmrbxTbgmhn7khtFx/fyAb/oF8hc35FCcmvs8=; b=QeKHbmczgo+oTYhIvl2O+Gy8L5v235AIER363l1ZKwPa7I21m3iEvtJcyoJjiDDgUcH+U7USp8JapHCCrahVb1obvHnu9VSeegAICmlheGsU7X0UpUi943xl7rBQMlHkbxrcIW+f4BPVi2PLqwal34AkF6dzLAvdMhSMDiiofsQ= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1565885092853613.1103547856476; Thu, 15 Aug 2019 09:04:52 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 54006307D96D; Thu, 15 Aug 2019 16:04:51 +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 0FCCD17CD0; Thu, 15 Aug 2019 16:04:48 +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 7DB1C1806B00; Thu, 15 Aug 2019 16:04:46 +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 x7FG4iad011791 for ; Thu, 15 Aug 2019 12:04:44 -0400 Received: by smtp.corp.redhat.com (Postfix) id 79D6D10018F9; Thu, 15 Aug 2019 16:04:44 +0000 (UTC) Received: from mx1.redhat.com (ext-mx02.extmail.prod.ext.phx2.redhat.com [10.5.110.26]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 7499E100195C for ; Thu, 15 Aug 2019 16:04:41 +0000 (UTC) Received: from mail-wm1-f67.google.com (mail-wm1-f67.google.com [209.85.128.67]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id DC13A2AFB for ; Thu, 15 Aug 2019 16:04:39 +0000 (UTC) Received: by mail-wm1-f67.google.com with SMTP id o4so1699816wmh.2 for ; Thu, 15 Aug 2019 09:04:39 -0700 (PDT) Received: from archlap.localdomain ([185.32.231.210]) by smtp.gmail.com with ESMTPSA id c21sm1323666wml.48.2019.08.15.09.04.28 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Aug 2019 09:04:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=qHDxWOz+gw/ie3T9SmQOrk3OStlxXJmmBI5F/3gky7w=; b=WXqTcQeT2NFnKjn7O3LAHdTQ/gMkHNf8iVCRyOMJYMwom8bLLb543ydANfwlwPo2oL zuQeIqjrWd5sMMtBlq3XRYCt6JskaXxfUcyIKpY3QW1chzRnz/hFnc2npGog9Ug7tDpy 5ZeaqZL66j5bwJoFPjxA2sTWkXcFuDp4aRsN3mbioQaphrS14e+m8xxf4dEw1KvRwOtH 5Px5mzXjDx+jKvssmkTrZL79Y5k0gc03JeVXmIl78B0VZg7OQNu1Hxu5JC/2PCYzxZdy r0pBtOEPHDdQW+dEY0k/PEg3Dvg4Hey3eKbeuU1W7ECu78BpNV9DLDamBEp7/ln4/Ho0 kUag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=qHDxWOz+gw/ie3T9SmQOrk3OStlxXJmmBI5F/3gky7w=; b=iyp44jkMOKzV8Bl4+2FU35qWO6p95hBxc1BcwdVCGawj7UF/2lK1+ao7FurizwdVoC QKVL3wvDywdSFMAbpvpicKPNZSJ1mMnLpIvk/d2pHZVsKgldap3H0EB61r0rAWy+tr0G AEs6Nj6pUIcLKAbY4UkFrgrMmVaBTHxrXEUwUyPOTNRjm2B51Z4Vjmjtq7V3ETY8Kpfy iVXyXQpBB8YWvAzCRBwhPTLeDZIIwCiRQ2/rSm5mepKjpTMhBIvw1mWBHYyLYXkk6xRQ ailNCQWTYzgvELOpLdwPSDl7DALwtd2ZxLtwPyv7S9PiGCtIy7ojoJq/FWqQshOd4H9J N1zQ== X-Gm-Message-State: APjAAAVHBvtpxcs9UqaPsQgu4C4TVVgsuWtAe+lxbttXeeu51r0fKnAc NKXcDM6CZxpcWzgPQqlH8FnCpKdeyD8= X-Google-Smtp-Source: APXvYqwD3y14OUlvSfd8lrO5kXkU88iLHKcwPI6OL+gT9gl3wPt6LE5AFnKVkl6OXiUeXluY1V2QRw== X-Received: by 2002:a7b:c745:: with SMTP id w5mr3405178wmk.21.1565885078162; Thu, 15 Aug 2019 09:04:38 -0700 (PDT) From: Ilias Stamatis To: libvir-list@redhat.com Date: Thu, 15 Aug 2019 19:04:21 +0300 Message-Id: <20190815160421.2265-1-stamatis.iliass@gmail.com> MIME-Version: 1.0 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Thu, 15 Aug 2019 16:04:40 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Thu, 15 Aug 2019 16:04:40 +0000 (UTC) for IP:'209.85.128.67' DOMAIN:'mail-wm1-f67.google.com' HELO:'mail-wm1-f67.google.com' FROM:'stamatis.iliass@gmail.com' RCPT:'' X-RedHat-Spam-Score: -0.279 (DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_PASS) 209.85.128.67 mail-wm1-f67.google.com 209.85.128.67 mail-wm1-f67.google.com X-Scanned-By: MIMEDefang 2.78 on 10.5.110.26 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH] test_driver: implement virConnectCompareCPU 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: , 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.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.48]); Thu, 15 Aug 2019 16:04:52 +0000 (UTC) X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" Signed-off-by: Ilias Stamatis --- Probably we need to extend the host CPU's capabilities as well along with this patch. Currently virCPUx86Compare reports "unknown host CPU". src/test/test_driver.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/src/test/test_driver.c b/src/test/test_driver.c index c39eef2d4b..b1037f4eab 100755 --- a/src/test/test_driver.c +++ b/src/test/test_driver.c @@ -1529,6 +1529,26 @@ static int testConnectGetMaxVcpus(virConnectPtr conn= ATTRIBUTE_UNUSED, return 32; } + +static int +testConnectCompareCPU(virConnectPtr conn, + const char *xmlDesc, + unsigned int flags) +{ + testDriverPtr privconn =3D conn->privateData; + bool failIncompatible =3D !!(flags & VIR_CONNECT_COMPARE_CPU_FAIL_INCO= MPATIBLE); + int ret =3D VIR_CPU_COMPARE_ERROR; + + virCheckFlags(VIR_CONNECT_COMPARE_CPU_FAIL_INCOMPATIBLE, + VIR_CPU_COMPARE_ERROR); + + ret =3D virCPUCompareXML(privconn->caps->host.arch, privconn->caps->ho= st.cpu, + xmlDesc, failIncompatible); + + return ret; +} + + static char * testConnectBaselineCPU(virConnectPtr conn ATTRIBUTE_UNUSED, const char **xmlCPUs, @@ -9510,6 +9530,7 @@ static virHypervisorDriver testHypervisorDriver =3D { .domainRevertToSnapshot =3D testDomainRevertToSnapshot, /* 1.1.4 */ .domainSnapshotDelete =3D testDomainSnapshotDelete, /* 1.1.4 */ + .connectCompareCPU =3D testConnectCompareCPU, /* 5.7.0 */ .connectBaselineCPU =3D testConnectBaselineCPU, /* 1.2.0 */ .domainCheckpointCreateXML =3D testDomainCheckpointCreateXML, /* 5.6.0= */ .domainCheckpointGetXMLDesc =3D testDomainCheckpointGetXMLDesc, /* 5.6= .0 */ -- 2.22.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list