From patchwork Mon Aug 2 05:23:04 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Ling, WeiX" X-Patchwork-Id: 96508 Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 1D606A0A0C; Mon, 2 Aug 2021 07:30:39 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D1E4740143; Mon, 2 Aug 2021 07:30:38 +0200 (CEST) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by mails.dpdk.org (Postfix) with ESMTP id AACC240140 for ; Mon, 2 Aug 2021 07:30:36 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10063"; a="200590804" X-IronPort-AV: E=Sophos;i="5.84,287,1620716400"; d="scan'208";a="200590804" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Aug 2021 22:30:35 -0700 X-IronPort-AV: E=Sophos;i="5.84,287,1620716400"; d="scan'208";a="520278012" Received: from unknown (HELO localhost.localdomain) ([10.240.183.222]) by fmsmga002-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Aug 2021 22:30:34 -0700 From: Wei Ling To: dts@dpdk.org Cc: Wei Ling Date: Mon, 2 Aug 2021 13:23:04 +0800 Message-Id: <20210802052304.2520157-1-weix.ling@intel.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Subject: [dts] [PATCH V1] tests/virtio_event_idx_interrupt: ues bind_dev paramter to replace restore_interfaces X-BeenThere: dts@dpdk.org X-Mailman-Version: 2.1.29 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" Add bind_dev parameter to replace restore_interfaces in start_vm method to decide bind the NIC port to dpdk in vm or not. Signed-off-by: Wei Ling --- tests/TestSuite_virtio_event_idx_interrupt.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tests/TestSuite_virtio_event_idx_interrupt.py b/tests/TestSuite_virtio_event_idx_interrupt.py index 37634f05..9aeaabf8 100644 --- a/tests/TestSuite_virtio_event_idx_interrupt.py +++ b/tests/TestSuite_virtio_event_idx_interrupt.py @@ -134,7 +134,7 @@ class TestVirtioIdxInterrupt(TestCase): self.vhost.send_expect(command_line, "testpmd> ", 30) self.vhost.send_expect("start", "testpmd> ", 30) - def start_vms(self, packed=False, mode=False): + def start_vms(self, packed=False, mode=False, bind_dev=False): """ start qemus """ @@ -155,12 +155,11 @@ class TestVirtioIdxInterrupt(TestCase): vm_params['opt_settings'] = opt_args self.vm.set_vm_device(**vm_params) try: - self.vm_dut = self.vm.start() + self.vm_dut = self.vm.start(bind_dev=bind_dev) if self.vm_dut is None: raise Exception("Set up VM ENV failed") except Exception as e: self.logger.error("ERROR: Failure for %s" % str(e)) - self.vm_dut.restore_interfaces() def config_virito_net_in_vm(self): """