* [dts] fix case test_whitelist_add_remove_mac_address failed for fovtille NIC
@ 2015-07-01 2:55 huilongx,xu
2015-07-03 6:23 ` Liu, Yong
0 siblings, 1 reply; 2+ messages in thread
From: huilongx,xu @ 2015-07-01 2:55 UTC (permalink / raw)
To: dts
From: huilong xu <huilongx.xu@intel.com>
Signed-off-by: huilong xu <huilongx.xu@intel.com>
---
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [dts] fix case test_whitelist_add_remove_mac_address failed for fovtille NIC
2015-07-01 2:55 [dts] fix case test_whitelist_add_remove_mac_address failed for fovtille NIC huilongx,xu
@ 2015-07-03 6:23 ` Liu, Yong
0 siblings, 0 replies; 2+ messages in thread
From: Liu, Yong @ 2015-07-03 6:23 UTC (permalink / raw)
To: Xu, HuilongX, dts
Applied, thanks.
> -----Original Message-----
> From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of huilongx,xu
> Sent: Wednesday, July 01, 2015 10:55 AM
> To: dts@dpdk.org
> Subject: [dts] fix case test_whitelist_add_remove_mac_address failed for
> fovtille NIC
>
> From: huilong xu <huilongx.xu@intel.com>
>
>
> Signed-off-by: huilong xu <huilongx.xu@intel.com>
> ---
> 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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-07-03 6:24 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-07-01 2:55 [dts] fix case test_whitelist_add_remove_mac_address failed for fovtille NIC huilongx,xu
2015-07-03 6:23 ` Liu, Yong
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).