test suite reviews and discussions
 help / color / mirror / Atom feed
* [dts]  test suite:fix some performance case bug
@ 2016-06-15  8:20 Ding Heng
  0 siblings, 0 replies; only message in thread
From: Ding Heng @ 2016-06-15  8:20 UTC (permalink / raw)
  To: dts; +Cc: Ding Heng

l2fwd: expected string should be "====" instead of "memory mapped"

tso: adjust the order of testpmd command to avoid different packet size
affect each other.

vxlan: no self.dut_port in this class, should be dut_port.

Signed-off-by: Ding Heng <hengx.ding@intel.com>

diff --git a/tests/TestSuite_l2fwd.py b/tests/TestSuite_l2fwd.py
index 10a86ca..383cb61 100644
--- a/tests/TestSuite_l2fwd.py
+++ b/tests/TestSuite_l2fwd.py
@@ -180,7 +180,8 @@ class TestL2fwd(TestCase):
                     (self.dut.get_memory_channels(), core_mask,
                      str(queues['queues']), port_mask)
 
-                self.dut.send_expect(command_line, "memory mapped", 60)
+                #self.dut.send_expect(command_line, "memory mapped", 60)
+                self.dut.send_expect(command_line, "========", 60)
 
                 info = "Executing l2fwd using %s queues, frame size %d and %s setup.\n" % \
                        (queues['queues'], frame_size, self.core_config)
diff --git a/tests/TestSuite_tso.py b/tests/TestSuite_tso.py
index 6e45fdc..b1d5b7a 100644
--- a/tests/TestSuite_tso.py
+++ b/tests/TestSuite_tso.py
@@ -309,19 +309,19 @@ class TestTSO(TestCase):
             self.dut.send_expect("csum parse_tunnel on %d" % self.dut_ports[1], "testpmd> ", 120)
             self.dut.send_expect("tso set 800 %d" % self.dut_ports[1], "testpmd> ", 120)
             self.dut.send_expect("set fwd csum", "testpmd> ", 120)
-            self.dut.send_expect("start", "testpmd> ")
             for frame_size in self.frame_sizes:
+                self.dut.send_expect("start", "testpmd> ")
                 wirespeed = self.wirespeed(self.nic, frame_size, 2)
 
                 # create pcap file
                 self.logger.info("Running with frame size %d " % frame_size)
                 payload_size = frame_size - self.headers_size
-		for _port in range(2):
-			mac = self.dut.get_mac_address(self.dut_ports[_port])
-                	self.tester.scapy_append('wrpcap("dst%d.pcap", [Ether(dst="%s",src="52:00:00:00:00:01")/IP(src="192.168.1.1",dst="192.168.1.2")/TCP(sport=1021,dport=1021)/("X"*%d)])' % (_port, mac, payload_size))
-        		tgen_input.append((self.tester.get_local_port(self.dut_ports[_port]),
-                           self.tester.get_local_port(self.dut_ports[1-_port]), "dst%d.pcap") % _port)
-                self.tester.scapy_execute()
+                for _port in range(2):
+                    mac = self.dut.get_mac_address(self.dut_ports[_port])
+                    self.tester.scapy_append('wrpcap("dst%d.pcap", [Ether(dst="%s",src="52:00:00:00:00:01")/IP(src="192.168.1.1",dst="192.168.1.2")/TCP(sport=1021,dport=1021)/("X"*%d)])' % (_port, mac, payload_size))
+                    tgen_input.append((self.tester.get_local_port(self.dut_ports[_port]),
+                                   self.tester.get_local_port(self.dut_ports[1-_port]), "dst%d.pcap" % _port))
+                    self.tester.scapy_execute()
 
                 # run traffic generator
                 _, pps = self.tester.traffic_generator_throughput(tgen_input)
@@ -330,14 +330,14 @@ class TestTSO(TestCase):
                 test_cycle['Mpps'][frame_size] = pps
                 test_cycle['pct'][frame_size] = pps * 100 / wirespeed
 
-            self.dut.send_expect("stop", "testpmd> ")
-            self.dut.send_expect("quit", "# ", 30)
-            time.sleep(5)
+                self.dut.send_expect("stop", "testpmd> ")
+                time.sleep(5)
 
-        for n in range(len(self.test_cycles)):
-            for frame_size in self.frame_sizes:
-                self.verify(self.test_cycles[n]['Mpps'][
-                            frame_size] > 0, "No traffic detected")
+            for n in range(len(self.test_cycles)):
+                for frame_size in self.frame_sizes:
+                    self.verify(self.test_cycles[n]['Mpps'][
+                        frame_size] > 0, "No traffic detected")
+            self.dut.send_expect("quit", "# ", 30)
 
         # Print results
         dts.results_table_add_header(self.table_header)
diff --git a/tests/TestSuite_vxlan.py b/tests/TestSuite_vxlan.py
index 4438bb0..30f5657 100644
--- a/tests/TestSuite_vxlan.py
+++ b/tests/TestSuite_vxlan.py
@@ -842,7 +842,7 @@ class TestVxlan(TestCase, IxiaPacketGenerator):
             self.enable_vxlan(dut_port)
 
         if tun_filter != 'None':
-            args = [self.dut_port, config.outer_mac_dst,
+            args = [dut_port, config.outer_mac_dst,
                     config.inner_mac_dst, config.inner_ip_dst,
                     config.inner_vlan, tun_filter,
                     config.vni, 0]
-- 
1.9.3

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2016-06-15  8:20 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-15  8:20 [dts] test suite:fix some performance case bug Ding Heng

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).