test suite reviews and discussions
 help / color / mirror / Atom feed
* [dts][PATCH V1 1/2] tests/userspace_ethtool: remove duplicate vlan test case.
@ 2022-02-11  2:28 Weiyuan Li
  2022-02-11  2:28 ` [dts][PATCH V1 2/2] test_plans/userspace_ethtool: " Weiyuan Li
  2022-02-11  5:50 ` [dts][PATCH V1 1/2] tests/userspace_ethtool: " Tu, Lijuan
  0 siblings, 2 replies; 3+ messages in thread
From: Weiyuan Li @ 2022-02-11  2:28 UTC (permalink / raw)
  To: dts, lijuan.tu; +Cc: Weiyuan Li

This vlan test case is repeated.
Remove the test case.

Signed-off-by: Weiyuan Li <weiyuanx.li@intel.com>
---
 tests/TestSuite_userspace_ethtool.py | 68 ++++------------------------
 1 file changed, 9 insertions(+), 59 deletions(-)

diff --git a/tests/TestSuite_userspace_ethtool.py b/tests/TestSuite_userspace_ethtool.py
index 4f104dca..9e3bbc19 100755
--- a/tests/TestSuite_userspace_ethtool.py
+++ b/tests/TestSuite_userspace_ethtool.py
@@ -322,7 +322,7 @@ class TestUserspaceEthtool(TestCase):
             intf = self.tester.get_interface(tester_port)
             ori_rx_pkts, ori_tx_pkts = self.strip_portstats(port)
             pkt.send_pkt(self.tester, tx_port=intf, count=4)
-            time.sleep(1)
+            time.sleep(3)
             rx_pkts, tx_pkts = self.strip_portstats(port)
             self.verify((rx_pkts == (ori_rx_pkts + 4)), "Failed to record Rx/Tx packets")
 
@@ -402,7 +402,7 @@ class TestUserspaceEthtool(TestCase):
             intf = netdev.get_interface_name()
             ethtool_eeprom = "ethtool_eeprom_%d.bin" % index
             # dump eeprom by linux ethtool
-            self.dut.send_expect("ethtool --eeprom-dump %s raw on > %s" % (intf, ethtool_eeprom), "# ")
+            self.dut.send_expect("ethtool --eeprom-dump %s raw on > %s" % (intf, ethtool_eeprom), "# ", 180)
             # wait for file ready
             time.sleep(2)
             # dpdk userspcae tools dump eeprom file size different with kernel ethtool dump
@@ -429,6 +429,7 @@ class TestUserspaceEthtool(TestCase):
             ori_rx_pkts, ori_tx_pkts = self.strip_portstats(port)
             _, rx_max, _, tx_max = self.strip_ringparam(index)
             self.dut.send_expect("ringparam %d %d %d" % (index, tx_max, rx_max), "EthApp>")
+            time.sleep(3)
             rx_ring, _, tx_ring, _ = self.strip_ringparam(index)
             self.verify(rx_ring == rx_max, "Userspace tool failed to set Rx ring parameter")
             self.verify(tx_ring == tx_max, "Userspace tool failed to set Tx ring parameter")
@@ -438,68 +439,13 @@ class TestUserspaceEthtool(TestCase):
                     'Fail to Open port{}'.format(index))
 
             intf = self.tester.get_interface(tester_port)
+            time.sleep(3)
             pkt.send_pkt(self.tester, tx_port=intf, count=4)
+            time.sleep(3)
             rx_pkts, tx_pkts = self.strip_portstats(index)
             self.verify(rx_pkts == ori_rx_pkts + 4, "Failed to forward after ring parameter changed")
             self.dut.send_expect("quit", "# ")
 
-    def test_ethtool_vlan(self):
-        """
-        Test ethtool app vlan add and delete
-        """
-        main_file = "examples/ethtool/ethtool-app/main.c"
-        # enable vlan filter
-        self.dut.send_expect("sed -i -e '/cfg_port.txmode.mq_mode = ETH_MQ_TX_NONE;$/a\\cfg_port.rxmode.offloads|=DEV_RX_OFFLOAD_VLAN_FILTER;' %s" % main_file, "# ")
-
-        # build sample app
-        self.build_ethtool()
-
-        self.dut.send_expect(self.cmd, "EthApp>", 60)
-        for index in range(len(self.ports)):
-            port = self.ports[index]
-            dst_mac =  self.dut.get_mac_address(port)
-            # generate random vlan
-            vlan = random.randrange(0, 4095)
-            # add vlan on port, record original statistic
-            self.dut.send_expect("vlan %d add %d" % (index, vlan), "EthApp>")
-            ori_rx_pkts, ori_tx_pkts = self.strip_portstats(port)
-
-            # send correct vlan packet to port
-            pkt = Packet(pkt_type='VLAN_UDP')
-            pkt.config_layer('ether', {'dst': dst_mac})
-            pkt.config_layer('vlan', {'vlan': vlan})
-            tester_port = self.tester.get_local_port(port)
-            intf = self.tester.get_interface(tester_port)
-            self.verify(self.ethapp_check_link_status(index, 'Up') == True,
-                    'Fail to Open port{}'.format(index))
-
-            pkt.send_pkt(self.tester, tx_port=intf, count=4)
-            rx_pkts, tx_pkts = self.strip_portstats(port)
-            self.verify(rx_pkts == ori_rx_pkts + 4, "Failed to Rx vlan packet")
-            self.verify(tx_pkts == ori_tx_pkts + 4, "Failed to Tx vlan packet")
-
-            # send incorrect vlan packet to port
-            wrong_vlan = (vlan + 1) % 4096
-            pkt.config_layer('vlan', {'vlan': wrong_vlan})
-            pkt.send_pkt(self.tester, tx_port=intf, count=4)
-            time.sleep(2)
-            rx_pkts_wrong, tx_pkts_wrong = self.strip_portstats(port)
-            self.verify(tx_pkts_wrong == rx_pkts, "Failed to filter Rx vlan packet")
-
-            # remove vlan
-            self.dut.send_expect("vlan %d del %d" % (index, vlan), "EthApp>")
-            # send same packet and make sure not received
-            pkt.config_layer('vlan', {'vlan': vlan})
-            pkt.send_pkt(self.tester, tx_port=intf, count=4)
-            time.sleep(2)
-            rx_pkts_del, tx_pkts_del = self.strip_portstats(port)
-            self.verify(tx_pkts_del == rx_pkts, "Failed to remove Rx vlan filter")
-
-        self.dut.send_expect("quit", "# ")
-        self.dut.send_expect("sed -i -e '/cfg_port.rxmode.offloads|=DEV_RX_OFFLOAD_VLAN_FILTER;$/d' %s" % main_file, "# ")
-        # build sample app
-        self.build_ethtool()
-
     def test_mac_address(self):
         """
         Test ethtool app mac function
@@ -561,7 +507,9 @@ class TestUserspaceEthtool(TestCase):
             pkt = Packet(pkt_type='UDP')
             tester_port = self.tester.get_local_port(port)
             intf = self.tester.get_interface(tester_port)
+            time.sleep(3)
             pkt.send_pkt(self.tester, tx_port=intf, count=4)
+            time.sleep(3)
             rx_pkts, tx_pkts = self.strip_portstats(index)
             self.verify(rx_pkts == ori_rx_pkts, "Failed to stop port")
             # restart port and check packet can normally forwarded
@@ -570,7 +518,9 @@ class TestUserspaceEthtool(TestCase):
                          'Fail to Open port{}'.format(index))
             # wait few time for port ready
             rx_pkts, tx_pkts = self.strip_portstats(index)
+            time.sleep(3)
             pkt.send_pkt(self.tester, tx_port=intf, count=4)
+            time.sleep(3)
             rx_pkts_open, tx_pkts_open = self.strip_portstats(index)
             self.verify(rx_pkts_open == rx_pkts + 4, "Failed to reopen port rx")
             self.verify(tx_pkts_open == tx_pkts + 4, "Failed to reopen port tx")
-- 
2.27.0


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [dts][PATCH V1 2/2] test_plans/userspace_ethtool: remove duplicate vlan test case.
  2022-02-11  2:28 [dts][PATCH V1 1/2] tests/userspace_ethtool: remove duplicate vlan test case Weiyuan Li
@ 2022-02-11  2:28 ` Weiyuan Li
  2022-02-11  5:50 ` [dts][PATCH V1 1/2] tests/userspace_ethtool: " Tu, Lijuan
  1 sibling, 0 replies; 3+ messages in thread
From: Weiyuan Li @ 2022-02-11  2:28 UTC (permalink / raw)
  To: dts, lijuan.tu; +Cc: Weiyuan Li

Sync remove duplicate test plans.

Signed-off-by: Weiyuan Li <weiyuanx.li@intel.com>
---
 test_plans/userspace_ethtool_test_plan.rst | 35 ----------------------
 1 file changed, 35 deletions(-)

diff --git a/test_plans/userspace_ethtool_test_plan.rst b/test_plans/userspace_ethtool_test_plan.rst
index 790e25e8..ab3fbc8f 100644
--- a/test_plans/userspace_ethtool_test_plan.rst
+++ b/test_plans/userspace_ethtool_test_plan.rst
@@ -159,41 +159,6 @@ send packet by scapy on Tester::
    check tx/rx packets
    EthApp>  portstats 0
 
-Test Case: Vlan test
-====================
-
-enable vlan filter flag in main.c of dpdk's ethtool::
-
-    sed -i -e '/cfg_port.txmode.mq_mode = ETH_MQ_TX_NONE;$/a\\cfg_port.rxmode.offloads|=DEV_RX_OFFLOAD_VLAN_FILTER;' examples/ethtool/ethtool-app/main.c
-
-re-compile examples/ethtool::
-
-    meson configure -Dexamples=ethtool x86_64-native-linuxapp-gcc
-    ninja -C x86_64-native-linuxapp-gcc
-
-Add vlan 0 to port 0 and vlan 1 to port1, send packet without vlan to port0,1
-Verify port0 and port1 received vlan packets::
-
-    EthApp> vlan 0 add 0
-    VLAN vid 0 added
-
-    EthApp> vlan 1 add 1
-    VLAN vid 1 added
-
-Send packet with vlan0,1 to port0&1. Verify port0 and port1 received vlan
-packets
-
-Send packet with vlan1,0 to port0&1. Verify port0 and port1 can not receive
-vlan packets
-
-Remove vlan 0,1 from port0&1, send packet with vlan0,1 to port0,1. Verify
-port0 and port1 can not receive vlan packet::
-
-    EthApp> vlan 0 del 0
-    VLAN vid 0 removed
-    EthApp> vlan 1 del 1
-    VLAN vid 1 removed
-
 Test Case: Mac address test
 ===========================
 Use "macaddr" command to dump port mac address and then check that dumped
-- 
2.27.0


^ permalink raw reply	[flat|nested] 3+ messages in thread

* RE: [dts][PATCH V1 1/2] tests/userspace_ethtool: remove duplicate vlan test case.
  2022-02-11  2:28 [dts][PATCH V1 1/2] tests/userspace_ethtool: remove duplicate vlan test case Weiyuan Li
  2022-02-11  2:28 ` [dts][PATCH V1 2/2] test_plans/userspace_ethtool: " Weiyuan Li
@ 2022-02-11  5:50 ` Tu, Lijuan
  1 sibling, 0 replies; 3+ messages in thread
From: Tu, Lijuan @ 2022-02-11  5:50 UTC (permalink / raw)
  To: Li, WeiyuanX, dts

It doesn't make sense to add so many time sleep.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-02-11  5:51 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-11  2:28 [dts][PATCH V1 1/2] tests/userspace_ethtool: remove duplicate vlan test case Weiyuan Li
2022-02-11  2:28 ` [dts][PATCH V1 2/2] test_plans/userspace_ethtool: " Weiyuan Li
2022-02-11  5:50 ` [dts][PATCH V1 1/2] tests/userspace_ethtool: " Tu, Lijuan

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