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 35205A0579; Wed, 18 Mar 2020 09:29:35 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id E818025D9; Wed, 18 Mar 2020 09:29:34 +0100 (CET) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id BD6381AFF for ; Wed, 18 Mar 2020 09:29:33 +0100 (CET) IronPort-SDR: tML3JUf1kGLbxPuCz9efoC0CDNEsmLvx0nVLVeCCCDcXlXfxiPXqC45iBsL67mxwWdLCZM+LPF TH4MCuXuFjww== 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; 18 Mar 2020 01:29:32 -0700 IronPort-SDR: UKNdMOuA4n6VapzyzHYxM+dk6CVPZ3a5fuKcGZdHdFNenqv3xW3zpDvxfpL+wpDnuNox9LnPYe Qk/3irkOgy1Q== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,566,1574150400"; d="scan'208";a="279665649" Received: from unknown (HELO dpdk-xiaoqimai-tester.sh.intel.com) ([10.240.183.156]) by fmsmga002.fm.intel.com with ESMTP; 18 Mar 2020 01:29:31 -0700 From: Zeng Xiaoxiao To: dts@dpdk.org Cc: Zeng Xiaoxiao Date: Wed, 18 Mar 2020 16:28:29 +0800 Message-Id: <1584520109-130808-1-git-send-email-xiaoxiaox.zeng@intel.com> X-Mailer: git-send-email 1.8.3.1 Subject: [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" *.need insmod igb_uio when drivername is vfio-pci. *.destroy vm after vf case finish. Signed-off-by: Zeng Xiaoxiao --- tests/TestSuite_shutdown_api.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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 = 'vfio-pci' self.dut.send_expect('modprobe vfio-pci', '#') + 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="igb_uio") self.used_dut_port = self.dut_ports[0] tester_port = self.tester.get_local_port(self.used_dut_port) @@ -296,6 +298,7 @@ class TestShutdownApi(TestCase): self.vm_env_done = True self.dut_testpmd.quit() + self.bind_nic_driver(self.dut_ports[:1], driver=self.vf_driver) 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() 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