From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id CE484C34E for ; Wed, 1 Jul 2015 04:55:08 +0200 (CEST) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga101.jf.intel.com with ESMTP; 30 Jun 2015 19:55:08 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.15,382,1432623600"; d="scan'208";a="516933720" Received: from shvmail01.sh.intel.com ([10.239.29.42]) by FMSMGA003.fm.intel.com with ESMTP; 30 Jun 2015 19:55:06 -0700 Received: from shecgisg003.sh.intel.com (shecgisg003.sh.intel.com [10.239.29.90]) by shvmail01.sh.intel.com with ESMTP id t612t5G9021135; Wed, 1 Jul 2015 10:55:05 +0800 Received: from shecgisg003.sh.intel.com (localhost [127.0.0.1]) by shecgisg003.sh.intel.com (8.13.6/8.13.6/SuSE Linux 0.8) with ESMTP id t612t3Oc016916; Wed, 1 Jul 2015 10:55:05 +0800 Received: (from huilongx@localhost) by shecgisg003.sh.intel.com (8.13.6/8.13.6/Submit) id t612t31R016912; Wed, 1 Jul 2015 10:55:03 +0800 From: "huilongx,xu" To: dts@dpdk.org Date: Wed, 1 Jul 2015 10:55:01 +0800 Message-Id: <1435719301-16879-1-git-send-email-huilongx.xu@intel.com> X-Mailer: git-send-email 1.7.4.1 Subject: [dts] fix case test_whitelist_add_remove_mac_address failed for fovtille NIC 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: , X-List-Received-Date: Wed, 01 Jul 2015 02:55:09 -0000 From: huilong xu Signed-off-by: huilong xu --- tests/TestSuite_whitelist.py | 22 ++++++++++++---------- 1 files changed, 12 insertions(+), 10 deletions(-) diff --git a/tests/TestSuite_whitelist.py b/tests/TestSuite_whitelist.py index 480589c..3e87b81 100644 --- a/tests/TestSuite_whitelist.py +++ b/tests/TestSuite_whitelist.py @@ -58,6 +58,7 @@ class TestWhitelist(TestCase): self.pmdout = PmdOutput(self.dut) self.pmdout.start_testpmd("Default", "--portmask=%s" % portMask) self.dut.send_expect("set verbose 1", "testpmd> ") + self.dut.send_expect("start", "testpmd> ") # get dest address from self.target port out = self.dut.send_expect("show port info %d" % self.dutPorts[0], "testpmd> ") @@ -97,15 +98,16 @@ class TestWhitelist(TestCase): # initialise first port without promiscuous mode fake_mac_addr = "01:01:01:00:00:00" portid = self.dutPorts[0] + txportid = self.dutPorts[1] self.dut.send_expect("set promisc %d off" % portid, "testpmd> ") - out = self.dut.send_expect("show port stats %d" % portid, "testpmd> ") - pre_rxpkt = dts.regexp(out, "RX-packets: ([0-9]+)") + out = self.dut.send_expect("show port stats %d" % txportid, "testpmd> ") + pre_rxpkt = dts.regexp(out, "TX-packets: ([0-9]+)") # send one packet with the portid MAC address self.whitelist_send_packet(portid, self.dest) - out = self.dut.send_expect("show port stats %d" % portid, "testpmd> ") - cur_rxpkt = dts.regexp(out, "RX-packets: ([0-9]+)") + out = self.dut.send_expect("show port stats %d" % txportid, "testpmd> ") + cur_rxpkt = dts.regexp(out, "TX-packets: ([0-9]+)") # check the packet increase self.verify(int(cur_rxpkt) == int(pre_rxpkt) + self.frames_to_send, "Packet has not been received on default address") @@ -114,8 +116,8 @@ class TestWhitelist(TestCase): self.whitelist_send_packet(portid, fake_mac_addr) pre_rxpkt = cur_rxpkt - out = self.dut.send_expect("show port stats %d" % portid, "testpmd> ") - cur_rxpkt = dts.regexp(out, "RX-packets: ([0-9]+)") + out = self.dut.send_expect("show port stats %d" % txportid, "testpmd> ") + cur_rxpkt = dts.regexp(out, "TX-packets: ([0-9]+)") # check the packet DO NOT increase self.verify(int(cur_rxpkt) == int(pre_rxpkt), @@ -127,8 +129,8 @@ class TestWhitelist(TestCase): self.whitelist_send_packet(portid, fake_mac_addr) pre_rxpkt = cur_rxpkt - out = self.dut.send_expect("show port stats %d" % portid, "testpmd> ") - cur_rxpkt = dts.regexp(out, "RX-packets: ([0-9]+)") + out = self.dut.send_expect("show port stats %d" % txportid, "testpmd> ") + cur_rxpkt = dts.regexp(out, "TX-packets: ([0-9]+)") # check the packet increase self.verify(int(cur_rxpkt) == int(pre_rxpkt) + self.frames_to_send, @@ -141,8 +143,8 @@ class TestWhitelist(TestCase): self.whitelist_send_packet(portid, fake_mac_addr) pre_rxpkt = cur_rxpkt - out = self.dut.send_expect("show port stats %d" % portid, "testpmd> ") - cur_rxpkt = dts.regexp(out, "RX-packets: ([0-9]+)") + out = self.dut.send_expect("show port stats %d" % txportid, "testpmd> ") + cur_rxpkt = dts.regexp(out, "TX-packets: ([0-9]+)") # check the packet increase self.verify(int(cur_rxpkt) == int(pre_rxpkt), -- 1.7.4.4