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 1B3DAA052B; Wed, 29 Jul 2020 09:34:17 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id C96331023; Wed, 29 Jul 2020 09:34:16 +0200 (CEST) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by dpdk.org (Postfix) with ESMTP id 9AF3CF04 for ; Wed, 29 Jul 2020 09:34:15 +0200 (CEST) IronPort-SDR: GAmA1kK/ynuJfvsr72IOA4IyER1+TopEvOeobqT9FUnSyOUfIxMJxB/ruRhbviYYGZg8YBJKVz 6AgfNjzT51LA== X-IronPort-AV: E=McAfee;i="6000,8403,9696"; a="138901991" X-IronPort-AV: E=Sophos;i="5.75,409,1589266800"; d="scan'208";a="138901991" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Jul 2020 00:34:14 -0700 IronPort-SDR: RFWO43HOZSECCvpXWncJq6r3k1L2FqrVojYjiNTFVVOIFuqUs+msO2AXzUDZ9YIasWrWipZ/MN hmsix5YwOekQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,409,1589266800"; d="scan'208";a="304140746" Received: from unknown (HELO localhost.localdomain.sh.intel.com) ([10.240.182.150]) by orsmga002.jf.intel.com with ESMTP; 29 Jul 2020 00:34:13 -0700 From: xizhan4x To: dts@dpdk.org Cc: xizhan4x Date: Wed, 29 Jul 2020 15:34:56 +0800 Message-Id: <1596008096-3377-1-git-send-email-xix.zhang@intel.com> X-Mailer: git-send-email 1.8.3.1 Subject: [dts] [PATCH V1] tests/TestSuite_mac_filter:Fixed multicast_filter failure of a due to the previous case stop test_pmd 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" Fixed multicast_filter failure of a due to the previous case stop test_pmd Signed-off-by: xizhan4x --- tests/TestSuite_mac_filter.py | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/tests/TestSuite_mac_filter.py b/tests/TestSuite_mac_filter.py index b762c91..e491711 100644 --- a/tests/TestSuite_mac_filter.py +++ b/tests/TestSuite_mac_filter.py @@ -55,8 +55,14 @@ class TestMacFilter(TestCase): self.dutPorts = self.dut.get_ports() # Verify that enough ports are available self.verify(len(self.dutPorts) >= 1, "Insufficient ports") - portMask = utils.create_mask(self.dutPorts[:1]) + + def set_up(self): + """ + Run before each test case. + Nothing to do. + """ + portMask = utils.create_mask(self.dutPorts[:1]) self.pmdout = PmdOutput(self.dut) self.pmdout.start_testpmd("Default", "--portmask=%s" % portMask) self.dut.send_expect("set verbose 1", "testpmd> ") @@ -75,12 +81,6 @@ class TestMacFilter(TestCase): self.max_mac_addr = utils.regexp(out, "Maximum number of MAC addresses: ([0-9]+)") - def set_up(self): - """ - Run before each test case. - Nothing to do. - """ - pass def whitelist_send_packet(self, portid, destMac="00:11:22:33:44:55", count=-1): """ @@ -144,6 +144,7 @@ class TestMacFilter(TestCase): self.verify("received" not in out, "Packet has been received on a new MAC address that has been removed from the port") self.dut.send_expect("stop", "testpmd> ") + self.dut.send_expect("quit", "# ", 30) def test_invalid_addresses(self): """ @@ -179,6 +180,8 @@ class TestMacFilter(TestCase): i = i + 1 self.verify("No space left on device" in out, "added 1 address more than max MAC addresses") + self.dut.send_expect("stop", "testpmd> ") + self.dut.send_expect("quit", "# ", 30) def test_multicast_filter(self): """ @@ -206,6 +209,7 @@ class TestMacFilter(TestCase): "Packet has been received when it should have ignored the broadcast") self.dut.send_expect("stop", "testpmd> ") + self.dut.send_expect("quit", "# ", 30) def tear_down(self): """ -- 1.8.3.1