From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id DB499A04A4; Wed, 27 May 2020 10:59:11 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id D22801D62C; Wed, 27 May 2020 10:59:11 +0200 (CEST) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id 6AC701D5A9 for ; Wed, 27 May 2020 10:59:10 +0200 (CEST) IronPort-SDR: SGKqbU+W9CJ6ZjmlWpvgu/H/tXDaSPeuODMaXY421+YGXgsosQeGSQ9hZ2WLSa4B8OmS2G0dSb KWCyxuI0RtBA== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 May 2020 01:59:08 -0700 IronPort-SDR: 4cPt48f/Pzasff8aXHUjmbcJDkUuT9CkA2B/GN6ZISIPXjdlsET2U+oaeYGIhPBIT/lWv8l2tm DoWcO/Fd2nXg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,440,1583222400"; d="scan'208";a="302029039" Received: from unknown (HELO dpdk-wenjielx-dtspatch135.sh.intel.com) ([10.240.183.135]) by fmsmga002.fm.intel.com with ESMTP; 27 May 2020 01:59:07 -0700 From: xizhan4x To: dts@dpdk.org Cc: xizhan4x Date: Wed, 27 May 2020 17:05:01 +0800 Message-Id: <1590570301-110587-1-git-send-email-xix.zhang@intel.com> X-Mailer: git-send-email 1.9.3 Subject: [dts] [PATCH V1] framework/project_dpdk:Modify the verification mode of load vfio PCI X-BeenThere: dts@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: test suite reviews and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dts-bounces@dpdk.org Sender: "dts" Ubuntu 20.04 vfio-pci is a builtin module ,Modify the verification mode of load vfio PCI Signed-off-by: xizhan4x --- framework/project_dpdk.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/framework/project_dpdk.py b/framework/project_dpdk.py index a1c0e20..6fd5d4a 100644 --- a/framework/project_dpdk.py +++ b/framework/project_dpdk.py @@ -106,8 +106,11 @@ class DPDKdut(Dut): self.send_expect("rmmod vfio", "#", 70) self.send_expect("modprobe vfio", "#", 70) self.send_expect("modprobe vfio-pci", "#", 70) - out = self.send_expect("lsmod | grep vfio_iommu_type1", "#") - assert ("vfio_iommu_type1" in out), "Failed to setup vfio-pci" + out = self.send_expect("lsmod | grep vfio_iommu_type1", "#") + if not out: + out = self.send_expect("ls /sys/module |grep vfio_pci", "#") + assert ("vfio_pci" in out), "Failed to insmod vfio_pci" + if drivermode == "noiommu": self.send_expect("echo 1 > /sys/module/vfio/parameters/enable_unsafe_noiommu_mode", "#", 70) -- 2.17.2