* [dts][PATCH V3 1/3] test_plans/vlan_ethertype_config: highlight check tpid point in test plan
@ 2022-09-05 14:48 Weiyuan Li
2022-09-05 14:48 ` [dts][PATCH V3 2/3] tests/vlan: modify script to match the " Weiyuan Li
2022-09-05 14:48 ` [dts][PATCH V3 3/3] tests/vlan_ethertype_config: modify case name to match " Weiyuan Li
0 siblings, 2 replies; 4+ messages in thread
From: Weiyuan Li @ 2022-09-05 14:48 UTC (permalink / raw)
To: dts, qi.fu; +Cc: Weiyuan Li
Highlight check tpid point in test plan.
Signed-off-by: Weiyuan Li <weiyuanx.li@intel.com>
---
test_plans/vlan_ethertype_config_test_plan.rst | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/test_plans/vlan_ethertype_config_test_plan.rst b/test_plans/vlan_ethertype_config_test_plan.rst
index 836bfa3f..80a6ee28 100644
--- a/test_plans/vlan_ethertype_config_test_plan.rst
+++ b/test_plans/vlan_ethertype_config_test_plan.rst
@@ -52,15 +52,19 @@ Test Case 2: test VLAN filtering on/off
testpmd> vlan set filter on 0
testpmd> start
-2. Send 1 packet with the VLAN Tag 16 on port ``A``,
+2. Send 1 packet with VLAN TPID 0xA100 and VLAN Tag 16 on port ``A``,
Verify that the VLAN packet cannot be received in port ``B``.
3. Disable vlan filtering on port ``0``::
testpmd> vlan set filter off 0
-4. Send 1 packet with the VLAN Tag 16 on port ``A``,
- Verify that the VLAN packet can be received in port ``B``.
+4. Change VLAN TPIDs to 0xA100 on port ``0``::
+
+ testpmd> vlan set outer tpid 0xA100 0
+
+5. Send 1 packet with VLAN TPID 0xA100 and VLAN Tag 16 on port ``A``,
+ Verify that the VLAN packet can be received in port ``B`` and TPID is 0xA100
Test Case 3: test adding VLAN Tag Identifier with changing VLAN TPID
====================================================================
--
2.27.0
^ permalink raw reply [flat|nested] 4+ messages in thread
* [dts][PATCH V3 2/3] tests/vlan: modify script to match the test plan
2022-09-05 14:48 [dts][PATCH V3 1/3] test_plans/vlan_ethertype_config: highlight check tpid point in test plan Weiyuan Li
@ 2022-09-05 14:48 ` Weiyuan Li
2022-09-05 14:48 ` [dts][PATCH V3 3/3] tests/vlan_ethertype_config: modify case name to match " Weiyuan Li
1 sibling, 0 replies; 4+ messages in thread
From: Weiyuan Li @ 2022-09-05 14:48 UTC (permalink / raw)
To: dts, qi.fu; +Cc: Weiyuan Li
Modify script use tx_first to send pkts match the test plan.
Signed-off-by: Weiyuan Li <weiyuanx.li@intel.com>
---
tests/TestSuite_vlan.py | 22 +++++++++++++++++-----
1 file changed, 17 insertions(+), 5 deletions(-)
diff --git a/tests/TestSuite_vlan.py b/tests/TestSuite_vlan.py
index b2889ae2..27e9a30c 100644
--- a/tests/TestSuite_vlan.py
+++ b/tests/TestSuite_vlan.py
@@ -31,6 +31,10 @@ class TestVlan(TestCase):
# Based on h/w type, choose how many ports to use
ports = self.dut.get_ports()
+ self.dut_ports = self.dut.get_ports(self.nic)
+ self.used_dut_port_0 = self.dut_ports[0]
+ self.tester_intf_0 = self.tester.get_interface(self.used_dut_port_0)
+
# Verify that enough ports are available
self.verify(len(ports) >= 1, "Insufficient ports")
@@ -159,11 +163,19 @@ class TestVlan(TestCase):
)
self.dut.send_expect("port start all", "testpmd> ")
- self.dut.send_expect("start", "testpmd> ")
- self.vlan_send_packet(-1)
-
- out = self.get_tcpdump_package()
- self.verify(self.vlan in out, "Vlan not found:" + str(out))
+ filter = [{"layer": "ether", "config": {"dst": "not ff:ff:ff:ff:ff:ff"}}]
+ inst = self.tester.tcpdump_sniff_packets(
+ intf=self.tester_intf_0,
+ filters=filter,
+ )
+ self.dut.send_expect("set nbport 1", "testpmd> ")
+ self.dut.send_expect("start tx_first", "testpmd> ")
+ pkts = self.tester.load_tcpdump_sniff_packets(inst)
+ self.verify(len(pkts) > 0, f"no packets received.")
+ self.verify(
+ self.vlan == pkts[0].vlan,
+ f"Vlan id {self.vlan} is not found in the packet.",
+ )
self.dut.send_expect("stop", "testpmd> ")
self.dut.send_expect("port stop all", "testpmd> ")
self.dut.send_expect("tx_vlan reset %s" % dutTxPortId, "testpmd> ", 30)
--
2.27.0
^ permalink raw reply [flat|nested] 4+ messages in thread
* [dts][PATCH V3 3/3] tests/vlan_ethertype_config: modify case name to match test plan
2022-09-05 14:48 [dts][PATCH V3 1/3] test_plans/vlan_ethertype_config: highlight check tpid point in test plan Weiyuan Li
2022-09-05 14:48 ` [dts][PATCH V3 2/3] tests/vlan: modify script to match the " Weiyuan Li
@ 2022-09-05 14:48 ` Weiyuan Li
2022-09-06 8:02 ` lijuan.tu
1 sibling, 1 reply; 4+ messages in thread
From: Weiyuan Li @ 2022-09-05 14:48 UTC (permalink / raw)
To: dts, qi.fu; +Cc: Weiyuan Li
Modify test case name to match test plan.
Signed-off-by: Weiyuan Li <weiyuanx.li@intel.com>
---
tests/TestSuite_vlan_ethertype_config.py | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/tests/TestSuite_vlan_ethertype_config.py b/tests/TestSuite_vlan_ethertype_config.py
index 409adf2a..b641d928 100644
--- a/tests/TestSuite_vlan_ethertype_config.py
+++ b/tests/TestSuite_vlan_ethertype_config.py
@@ -202,7 +202,7 @@ class TestVlanEthertypeConfig(TestCase):
)
self.check_vlan_packets(rx_vlan, tpid, self.rxItf)
- def test_vlan_add_vlan_tag(self):
+ def test_add_vlan_tag_identifier_with_change_vlan_tpid(self):
"""
test adding VLAN Tag Identifier with changing VLAN TPID
"""
@@ -235,7 +235,7 @@ class TestVlanEthertypeConfig(TestCase):
self.dut.send_expect("stop", "testpmd> ", 30)
- def test_vlan_strip(self):
+ def test_vlan_header_strip_with_change_vlan_tpid(self):
"""
Test Case 4: test VLAN header striping with changing VLAN TPID
"""
@@ -265,7 +265,7 @@ class TestVlanEthertypeConfig(TestCase):
)
self.check_vlan_packets(rx_vlan, tpid, self.rxItf)
- def test_vlan_enable_vlan_insertion(self):
+ def test_vlan_header_insert_with_change_vlan_tpid(self):
"""
Test Case 5: test VLAN header inserting with changing VLAN TPID
"""
--
2.27.0
^ permalink raw reply [flat|nested] 4+ messages in thread
* [dts][PATCH V3 3/3] tests/vlan_ethertype_config: modify case name to match test plan
2022-09-05 14:48 ` [dts][PATCH V3 3/3] tests/vlan_ethertype_config: modify case name to match " Weiyuan Li
@ 2022-09-06 8:02 ` lijuan.tu
0 siblings, 0 replies; 4+ messages in thread
From: lijuan.tu @ 2022-09-06 8:02 UTC (permalink / raw)
To: dts, qi.fu, Weiyuan Li; +Cc: Weiyuan Li
On Mon, 5 Sep 2022 22:48:52 +0800, Weiyuan Li <weiyuanx.li@intel.com> wrote:
> Modify test case name to match test plan.
>
> Signed-off-by: Weiyuan Li <weiyuanx.li@intel.com>
Acked-by: Lijuan Tu <lijuan.tu@intel.com>
Series applied, thanks
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-09-06 8:02 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-05 14:48 [dts][PATCH V3 1/3] test_plans/vlan_ethertype_config: highlight check tpid point in test plan Weiyuan Li
2022-09-05 14:48 ` [dts][PATCH V3 2/3] tests/vlan: modify script to match the " Weiyuan Li
2022-09-05 14:48 ` [dts][PATCH V3 3/3] tests/vlan_ethertype_config: modify case name to match " Weiyuan Li
2022-09-06 8:02 ` lijuan.tu
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).