* [dts] [DTS][PATCH 1/3] ieee1588: fix sutie for framework update
@ 2015-05-26 10:05 Jingguo Fu
2015-05-26 10:05 ` [dts] [DTS][PATCH 2/3] jumbo frame: " Jingguo Fu
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Jingguo Fu @ 2015-05-26 10:05 UTC (permalink / raw)
To: dts; +Cc: Jingguo Fu
Signed-off-by: Jingguo Fu <jingguox.fu@intel.com>
---
tests/TestSuite_ieee1588.py | 17 +++++------------
1 file changed, 5 insertions(+), 12 deletions(-)
diff --git a/tests/TestSuite_ieee1588.py b/tests/TestSuite_ieee1588.py
index bf48188..6ee95e4 100644
--- a/tests/TestSuite_ieee1588.py
+++ b/tests/TestSuite_ieee1588.py
@@ -36,22 +36,16 @@ Test support of IEEE1588 Precise Time Protocol.
import dts
import time
-
-
from test_case import TestCase
from pmd_output import PmdOutput
-
class TestIeee1588(TestCase):
def set_up_all(self):
"""
Run at the start of each test suite.
-
-
IEEE1588 Prerequisites
"""
-
dutPorts = self.dut.get_ports()
self.verify(len(dutPorts) > 0, "No ports found for " + self.nic)
@@ -64,7 +58,7 @@ class TestIeee1588(TestCase):
self.dut.build_install_dpdk(self.target)
self.pmdout = PmdOutput(self.dut)
- self.pmdout.start_testpmd("all")
+ self.pmdout.start_testpmd("Default")
def set_up(self):
"""
@@ -76,10 +70,11 @@ class TestIeee1588(TestCase):
"""
IEEE1588 Enable test case.
"""
-
self.dut.send_expect("set fwd ieee1588", "testpmd> ")
- self.dut.send_expect("start", ">", 5) # Waiting for 'testpmd> ' Fails due to log messages, "Received non PTP packet", in the output
- time.sleep(1) # Allow the output from the "start" command to finish before looking for a regexp in expect
+ # Waiting for 'testpmd> ' Fails due to log messages, "Received non PTP packet", in the output
+ self.dut.send_expect("start", ">", 5)
+ # Allow the output from the "start" command to finish before looking for a regexp in expect
+ time.sleep(1)
# use the first port on that self.nic
dutPorts = self.dut.get_ports()
@@ -92,7 +87,6 @@ class TestIeee1588(TestCase):
# this is the output of sniff
# [<Ether dst=01:1b:19:00:00:00 src=00:00:00:00:00:00 type=0x88f7 |<Raw load='\x00\x02' |>>]
-
self.tester.scapy_foreground()
self.tester.scapy_append('nutmac="01:1b:19:00:00:00"')
self.tester.scapy_append('sendp([Ether(dst=nutmac,type=0x88f7)/"\\x00\\x02"], iface="%s")' % itf)
@@ -120,7 +114,6 @@ class TestIeee1588(TestCase):
"""
IEEE1588 Disable test case.
"""
-
self.dut.send_expect("stop", "testpmd> ")
time.sleep(3)
--
2.1.0
^ permalink raw reply [flat|nested] 4+ messages in thread
* [dts] [DTS][PATCH 2/3] jumbo frame: fix sutie for framework update
2015-05-26 10:05 [dts] [DTS][PATCH 1/3] ieee1588: fix sutie for framework update Jingguo Fu
@ 2015-05-26 10:05 ` Jingguo Fu
2015-05-26 10:05 ` [dts] [DTS][PATCH 3/3] whitelist: " Jingguo Fu
2015-06-01 8:59 ` [dts] [DTS][PATCH 1/3] ieee1588: " Liu, Yong
2 siblings, 0 replies; 4+ messages in thread
From: Jingguo Fu @ 2015-05-26 10:05 UTC (permalink / raw)
To: dts; +Cc: Jingguo Fu
Signed-off-by: Jingguo Fu <jingguox.fu@intel.com>
---
tests/TestSuite_jumboframes.py | 30 ++++++------------------------
1 file changed, 6 insertions(+), 24 deletions(-)
diff --git a/tests/TestSuite_jumboframes.py b/tests/TestSuite_jumboframes.py
index 83b3427..3add9ea 100644
--- a/tests/TestSuite_jumboframes.py
+++ b/tests/TestSuite_jumboframes.py
@@ -96,11 +96,9 @@ class TestJumboframes(TestCase):
if received:
self.verify(p0tx_pkts == p1rx_pkts and p0tx_bytes == pktsize and p1rx_bytes == pktsize,
"packet pass assert error")
-
else:
self.verify(p0tx_pkts == p1rx_pkts and (p1rx_err == 1 or p1rx_pkts == 0),
"packet drop assert error")
-
return out
#
@@ -112,13 +110,12 @@ class TestJumboframes(TestCase):
"""
Prerequisite steps for each test suit.
"""
-
self.dut_ports = self.dut.get_ports()
self.verify(len(self.dut_ports) >= 2, "Insufficient ports")
self.rx_port = self.dut_ports[0]
self.tx_port = self.dut_ports[1]
- cores = self.dut.get_core_list('1S/2C/2T')
+ cores = self.dut.get_core_list("1S/2C/1T")
self.coremask = dts.create_mask(cores)
self.port_mask = dts.create_mask([self.rx_port, self.tx_port])
@@ -139,10 +136,7 @@ class TestJumboframes(TestCase):
This case aims to test transmitting normal size packet without jumbo
frame on testpmd app.
"""
-
- self.dut.kill_all()
-
- self.pmdout.start_testpmd("all", "--max-pkt-len=%d" % (ETHER_STANDARD_MTU))
+ self.pmdout.start_testpmd("Default", "--max-pkt-len=%d" % (ETHER_STANDARD_MTU))
self.dut.send_expect("start", "testpmd> ")
self.jumboframes_send_packet(ETHER_STANDARD_MTU - 1)
@@ -156,10 +150,7 @@ class TestJumboframes(TestCase):
This case aims to test transmitting jumbo frame packet on testpmd without
jumbo frame support.
"""
-
- self.dut.kill_all()
-
- self.pmdout.start_testpmd("all", "--max-pkt-len=%d" % (ETHER_STANDARD_MTU))
+ self.pmdout.start_testpmd("Default", "--max-pkt-len=%d" % (ETHER_STANDARD_MTU))
self.dut.send_expect("start", "testpmd> ")
self.jumboframes_send_packet(ETHER_STANDARD_MTU + 1, False)
@@ -172,10 +163,7 @@ class TestJumboframes(TestCase):
When jumbo frame supported, this case is to verify that the normal size
packet forwrding should be support correct.
"""
-
- self.dut.kill_all()
-
- self.pmdout.start_testpmd("all", "--max-pkt-len=%s" % (ETHER_JUMBO_FRAME_MTU))
+ self.pmdout.start_testpmd("Default", "--max-pkt-len=%s" % (ETHER_JUMBO_FRAME_MTU))
self.dut.send_expect("start", "testpmd> ")
self.jumboframes_send_packet(1517)
@@ -189,10 +177,7 @@ class TestJumboframes(TestCase):
When jumbo frame supported, this case is to verify that jumbo frame
packet can be forwarded correct.
"""
-
- self.dut.kill_all()
-
- self.pmdout.start_testpmd("all", "--max-pkt-len=%s" % (ETHER_JUMBO_FRAME_MTU))
+ self.pmdout.start_testpmd("Default", "--max-pkt-len=%s" % (ETHER_JUMBO_FRAME_MTU))
self.dut.send_expect("start", "testpmd> ")
self.jumboframes_send_packet(ETHER_STANDARD_MTU + 1)
@@ -207,10 +192,7 @@ class TestJumboframes(TestCase):
When the jubmo frame MTU set as 9000, this case is to verify that the
packet which the length bigger than MTU can not be forwarded.
"""
-
- self.dut.kill_all()
-
- self.pmdout.start_testpmd("1S/2C/1T", "--max-pkt-len=%s" % (ETHER_JUMBO_FRAME_MTU))
+ self.pmdout.start_testpmd("Default", "--max-pkt-len=%s" % (ETHER_JUMBO_FRAME_MTU))
self.dut.send_expect("start", "testpmd> ")
self.jumboframes_send_packet(ETHER_JUMBO_FRAME_MTU + 1, False)
--
2.1.0
^ permalink raw reply [flat|nested] 4+ messages in thread
* [dts] [DTS][PATCH 3/3] whitelist: fix sutie for framework update
2015-05-26 10:05 [dts] [DTS][PATCH 1/3] ieee1588: fix sutie for framework update Jingguo Fu
2015-05-26 10:05 ` [dts] [DTS][PATCH 2/3] jumbo frame: " Jingguo Fu
@ 2015-05-26 10:05 ` Jingguo Fu
2015-06-01 8:59 ` [dts] [DTS][PATCH 1/3] ieee1588: " Liu, Yong
2 siblings, 0 replies; 4+ messages in thread
From: Jingguo Fu @ 2015-05-26 10:05 UTC (permalink / raw)
To: dts; +Cc: Jingguo Fu
Signed-off-by: Jingguo Fu <jingguox.fu@intel.com>
---
tests/TestSuite_whitelist.py | 16 ++--------------
1 file changed, 2 insertions(+), 14 deletions(-)
diff --git a/tests/TestSuite_whitelist.py b/tests/TestSuite_whitelist.py
index aedae40..480589c 100644
--- a/tests/TestSuite_whitelist.py
+++ b/tests/TestSuite_whitelist.py
@@ -36,12 +36,9 @@ Test the support of Whitelist Features by Poll Mode Drivers
import dts
import time
-
-
from test_case import TestCase
from pmd_output import PmdOutput
-
class TestWhitelist(TestCase):
def set_up_all(self):
@@ -51,19 +48,15 @@ class TestWhitelist(TestCase):
Two Ports
testpmd can normally started
"""
-
self.frames_to_send = 1
-
# Based on h/w type, choose how many ports to use
self.dutPorts = self.dut.get_ports()
-
# Verify that enough ports are available
self.verify(len(self.dutPorts) >= 1, "Insufficient ports")
-
portMask = dts.create_mask(self.dutPorts[:2])
self.pmdout = PmdOutput(self.dut)
- self.pmdout.start_testpmd("1S/2C/1T", "--portmask=%s" % portMask)
+ self.pmdout.start_testpmd("Default", "--portmask=%s" % portMask)
self.dut.send_expect("set verbose 1", "testpmd> ")
# get dest address from self.target port
@@ -89,15 +82,11 @@ class TestWhitelist(TestCase):
"""
Send 1 packet to portid.
"""
-
itf = self.tester.get_interface(self.tester.get_local_port(portid))
-
self.tester.scapy_foreground()
self.tester.scapy_append('sendp([Ether(dst="%s", src="52:00:00:00:00:00")], iface="%s", count=%d)' % (destMac,
- itf,
- self.frames_to_send))
+ itf, self.frames_to_send))
self.tester.scapy_execute()
-
time.sleep(5)
def test_whitelist_add_remove_mac_address(self):
@@ -168,7 +157,6 @@ class TestWhitelist(TestCase):
Add Same MAC twice will be failed
Add more than MAX number will be failed
"""
-
portid = self.dutPorts[0]
fake_mac_addr = "00:00:00:00:00:00"
--
2.1.0
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [dts] [DTS][PATCH 1/3] ieee1588: fix sutie for framework update
2015-05-26 10:05 [dts] [DTS][PATCH 1/3] ieee1588: fix sutie for framework update Jingguo Fu
2015-05-26 10:05 ` [dts] [DTS][PATCH 2/3] jumbo frame: " Jingguo Fu
2015-05-26 10:05 ` [dts] [DTS][PATCH 3/3] whitelist: " Jingguo Fu
@ 2015-06-01 8:59 ` Liu, Yong
2 siblings, 0 replies; 4+ messages in thread
From: Liu, Yong @ 2015-06-01 8:59 UTC (permalink / raw)
To: Fu, JingguoX, dts; +Cc: Fu, JingguoX
Thanks, applied in 1.1 branch. Please take care of spell, should be "suite" not "sutie".
> -----Original Message-----
> From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of Jingguo Fu
> Sent: Tuesday, May 26, 2015 6:06 PM
> To: dts@dpdk.org
> Cc: Fu, JingguoX
> Subject: [dts] [DTS][PATCH 1/3] ieee1588: fix sutie for framework update
>
> Signed-off-by: Jingguo Fu <jingguox.fu@intel.com>
> ---
> tests/TestSuite_ieee1588.py | 17 +++++------------
> 1 file changed, 5 insertions(+), 12 deletions(-)
>
> diff --git a/tests/TestSuite_ieee1588.py b/tests/TestSuite_ieee1588.py
> index bf48188..6ee95e4 100644
> --- a/tests/TestSuite_ieee1588.py
> +++ b/tests/TestSuite_ieee1588.py
> @@ -36,22 +36,16 @@ Test support of IEEE1588 Precise Time Protocol.
>
> import dts
> import time
> -
> -
> from test_case import TestCase
> from pmd_output import PmdOutput
>
> -
> class TestIeee1588(TestCase):
>
> def set_up_all(self):
> """
> Run at the start of each test suite.
> -
> -
> IEEE1588 Prerequisites
> """
> -
> dutPorts = self.dut.get_ports()
> self.verify(len(dutPorts) > 0, "No ports found for " + self.nic)
>
> @@ -64,7 +58,7 @@ class TestIeee1588(TestCase):
> self.dut.build_install_dpdk(self.target)
>
> self.pmdout = PmdOutput(self.dut)
> - self.pmdout.start_testpmd("all")
> + self.pmdout.start_testpmd("Default")
>
> def set_up(self):
> """
> @@ -76,10 +70,11 @@ class TestIeee1588(TestCase):
> """
> IEEE1588 Enable test case.
> """
> -
> self.dut.send_expect("set fwd ieee1588", "testpmd> ")
> - self.dut.send_expect("start", ">", 5) # Waiting for 'testpmd> '
> Fails due to log messages, "Received non PTP packet", in the output
> - time.sleep(1) # Allow the output from the "start" command to
> finish before looking for a regexp in expect
> + # Waiting for 'testpmd> ' Fails due to log messages, "Received
> non PTP packet", in the output
> + self.dut.send_expect("start", ">", 5)
> + # Allow the output from the "start" command to finish before
> looking for a regexp in expect
> + time.sleep(1)
>
> # use the first port on that self.nic
> dutPorts = self.dut.get_ports()
> @@ -92,7 +87,6 @@ class TestIeee1588(TestCase):
>
> # this is the output of sniff
> # [<Ether dst=01:1b:19:00:00:00 src=00:00:00:00:00:00
> type=0x88f7 |<Raw load='\x00\x02' |>>]
> -
> self.tester.scapy_foreground()
> self.tester.scapy_append('nutmac="01:1b:19:00:00:00"')
>
> self.tester.scapy_append('sendp([Ether(dst=nutmac,type=0x88f7)/"\\x00\\x02
> "], iface="%s")' % itf)
> @@ -120,7 +114,6 @@ class TestIeee1588(TestCase):
> """
> IEEE1588 Disable test case.
> """
> -
> self.dut.send_expect("stop", "testpmd> ")
> time.sleep(3)
>
> --
> 2.1.0
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-06-01 8:59 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-26 10:05 [dts] [DTS][PATCH 1/3] ieee1588: fix sutie for framework update Jingguo Fu
2015-05-26 10:05 ` [dts] [DTS][PATCH 2/3] jumbo frame: " Jingguo Fu
2015-05-26 10:05 ` [dts] [DTS][PATCH 3/3] whitelist: " Jingguo Fu
2015-06-01 8:59 ` [dts] [DTS][PATCH 1/3] ieee1588: " 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).