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 84ACCA0583; Fri, 20 Mar 2020 08:56:50 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 675E02BBE; Fri, 20 Mar 2020 08:56:50 +0100 (CET) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id B58F5F94 for ; Fri, 20 Mar 2020 08:56:48 +0100 (CET) IronPort-SDR: GhZknaXTnFNVZeHWXFLok9hnjNr3j34wvYJvAuU64vxnzKlo1kjxzQO0HXqJ5WuOz2M3FPeUn5 VTANm+fCBBMg== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Mar 2020 00:56:47 -0700 IronPort-SDR: Joi5Jc/ng6D9U8kf2sw6M+4dNw9dNZjuO8in973W3HqZjj9xbYUQRmeQoNeUPn6Trl+7dKd+Dq JrxoINci2LpA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.72,283,1580803200"; d="scan'208";a="444887295" Received: from fmsmsx107.amr.corp.intel.com ([10.18.124.205]) by fmsmga005.fm.intel.com with ESMTP; 20 Mar 2020 00:56:47 -0700 Received: from fmsmsx163.amr.corp.intel.com (10.18.125.72) by fmsmsx107.amr.corp.intel.com (10.18.124.205) with Microsoft SMTP Server (TLS) id 14.3.439.0; Fri, 20 Mar 2020 00:56:47 -0700 Received: from shsmsx108.ccr.corp.intel.com (10.239.4.97) by fmsmsx163.amr.corp.intel.com (10.18.125.72) with Microsoft SMTP Server (TLS) id 14.3.439.0; Fri, 20 Mar 2020 00:56:46 -0700 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.43]) by SHSMSX108.ccr.corp.intel.com ([169.254.8.235]) with mapi id 14.03.0439.000; Fri, 20 Mar 2020 15:56:46 +0800 From: "Tu, Lijuan" To: "Zeng, XiaoxiaoX" , "dts@dpdk.org" CC: "Zeng, XiaoxiaoX" Thread-Topic: [dts] [PATCH V1]tests/shutdown_api: fix can't create vf Thread-Index: AQHV/P9lfM/Iv6UdkEmbBOrQ6u0yWKhRH4oQ Date: Fri, 20 Mar 2020 07:56:45 +0000 Message-ID: <8CE3E05A3F976642AAB0F4675D0AD20E0BBEFA13@SHSMSX101.ccr.corp.intel.com> References: <1584520109-130808-1-git-send-email-xiaoxiaox.zeng@intel.com> In-Reply-To: <1584520109-130808-1-git-send-email-xiaoxiaox.zeng@intel.com> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.2.0.6 dlp-reaction: no-action x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dts] [PATCH V1]tests/shutdown_api: fix can't create vf 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" Hi xiaoxiao, Framework has provide API " setup_modules_linux " to implement what you wan= t, so you can call it directly: self.dut.setup_modules_linux(self.target, 'igb_uio', '') thanks > -----Original Message----- > From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of Zeng Xiaoxiao > Sent: Wednesday, March 18, 2020 4:28 PM > To: dts@dpdk.org > Cc: Zeng, XiaoxiaoX > Subject: [dts] [PATCH V1]tests/shutdown_api: fix can't create vf >=20 > *.need insmod igb_uio when drivername is vfio-pci. > *.destroy vm after vf case finish. >=20 > Signed-off-by: Zeng Xiaoxiao > --- > tests/TestSuite_shutdown_api.py | 7 ++++++- > 1 file changed, 6 insertions(+), 1 deletion(-) >=20 > diff --git a/tests/TestSuite_shutdown_api.py > b/tests/TestSuite_shutdown_api.py index 11d451b..ffee0f2 100644 > --- a/tests/TestSuite_shutdown_api.py > +++ b/tests/TestSuite_shutdown_api.py > @@ -260,6 +260,8 @@ class TestShutdownApi(TestCase): > self.vf_assign_method =3D 'vfio-pci' > self.dut.send_expect('modprobe vfio-pci', '#') >=20 > + self.dut.send_expect('modprobe uio', '#') > + self.dut.send_expect("insmod ./" + self.target + > + "/kmod/igb_uio.ko", "#", 60) > self.bind_nic_driver(self.dut_ports[:1], driver=3D"igb_uio") > self.used_dut_port =3D self.dut_ports[0] > tester_port =3D self.tester.get_local_port(self.used_dut_port) > @@ -296,6 +298,7 @@ class TestShutdownApi(TestCase): >=20 > self.vm_env_done =3D True > self.dut_testpmd.quit() > + self.bind_nic_driver(self.dut_ports[:1], driver=3Dself.vf_driver= ) >=20 > def destroy_vm_env(self): > if not self.vm_env_done: > @@ -539,6 +542,7 @@ class TestShutdownApi(TestCase): > self.dut_testpmd.quit() > time.sleep(3) > self.vm0_dut.kill_all() > + self.destroy_vm_env() >=20 > def test_enable_disablejumbo(self): > """ > @@ -764,5 +768,6 @@ class TestShutdownApi(TestCase): > """ > Run after each test suite. > """ > + if self.vm_env_done: > + self.destroy_vm_env() > self.dut.kill_all() > - self.destroy_vm_env() > -- > 1.8.3.1