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 23843A32A2 for ; Fri, 25 Oct 2019 05:01:49 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id E0C101E8F9; Fri, 25 Oct 2019 05:01:48 +0200 (CEST) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id A09211DFE1 for ; Fri, 25 Oct 2019 05:01:47 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 24 Oct 2019 20:01:46 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.68,227,1569308400"; d="scan'208";a="210287015" Received: from unknown (HELO dpdk-wenjielx-dtspatch135.sh.intel.com) ([10.240.176.135]) by fmsmga001.fm.intel.com with ESMTP; 24 Oct 2019 20:01:45 -0700 From: "zhang,yan" To: dts@dpdk.org Cc: "zhang,yan" Date: Fri, 25 Oct 2019 11:06:57 +0800 Message-Id: <1571972817-152818-1-git-send-email-yanx.a.zhang@intel.com> X-Mailer: git-send-email 1.9.3 Subject: [dts] [PATCH V2] tests/TestSuite_vf_jumboframe:Optimize the code to exit testpmd 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" Optimize the code to exit testpmd. Signed-off-by: zhang,yan --- tests/TestSuite_vf_jumboframe.py | 20 +++----------------- 1 file changed, 3 insertions(+), 17 deletions(-) diff --git a/tests/TestSuite_vf_jumboframe.py b/tests/TestSuite_vf_jumboframe.py index dd728d9..f88f914 100644 --- a/tests/TestSuite_vf_jumboframe.py +++ b/tests/TestSuite_vf_jumboframe.py @@ -174,7 +174,7 @@ class TestVfJumboFrame(TestCase): pkt = Packet(pkt_type='UDP', pkt_len=pktsize) pkt.config_layer('ether', {'dst': mac}) - pkt.send_pkt(self.tester, tx_port=self.tester_intf) + pkt.send_pkt(self.tester, tx_port=self.tester_intf, timeout=30) time.sleep(1) @@ -219,9 +219,6 @@ class TestVfJumboFrame(TestCase): self.jumboframes_send_packet(ETHER_STANDARD_MTU - 1) self.jumboframes_send_packet(ETHER_STANDARD_MTU) - self.vm_testpmd.execute_cmd("stop") - self.vm_testpmd.quit() - def test_vf_normal_withjumbo(self): """ When jumbo frame supported, this case is to verify that the normal size @@ -240,9 +237,6 @@ class TestVfJumboFrame(TestCase): self.jumboframes_send_packet(ETHER_STANDARD_MTU - 1) self.jumboframes_send_packet(ETHER_STANDARD_MTU) - self.vm_testpmd.execute_cmd("stop") - self.vm_testpmd.quit() - def test_vf_jumbo_nojumbo(self): """ This case aims to test transmitting jumbo frame packet on testpmd without @@ -269,9 +263,6 @@ class TestVfJumboFrame(TestCase): else: self.jumboframes_send_packet(ETHER_STANDARD_MTU + 1, False) - self.vm_testpmd.execute_cmd("stop") - self.vm_testpmd.quit() - def test_vf_jumbo_withjumbo(self): """ When jumbo frame supported, this case is to verify that jumbo frame @@ -291,9 +282,6 @@ class TestVfJumboFrame(TestCase): self.jumboframes_send_packet(ETHER_JUMBO_FRAME_MTU - 1) self.jumboframes_send_packet(ETHER_JUMBO_FRAME_MTU) - self.vm_testpmd.execute_cmd("stop") - self.vm_testpmd.quit() - def test_vf_jumbo_overjumbo(self): """ When the jubmo frame MTU set as 9000, this case is to verify that the @@ -315,14 +303,12 @@ class TestVfJumboFrame(TestCase): else: self.jumboframes_send_packet(ETHER_JUMBO_FRAME_MTU + 1, False) - self.vm_testpmd.execute_cmd("stop") - self.vm_testpmd.quit() - def tear_down(self): """ Run after each test case. """ - pass + self.vm_testpmd.execute_cmd("stop") + self.vm_testpmd.quit() def tear_down_all(self): """ -- 2.17.2