test suite reviews and discussions
 help / color / mirror / Atom feed
* [dts] [PATCH V1] tests/ddp_l2tpv3: adapted scapy tool running in python3
@ 2020-05-20  9:51 ChenBo
  2020-05-20  9:56 ` Chen, BoX C
  2020-05-29  8:41 ` Tu, Lijuan
  0 siblings, 2 replies; 3+ messages in thread
From: ChenBo @ 2020-05-20  9:51 UTC (permalink / raw)
  To: dts; +Cc: ChenBo

adapted scapy tool running in python3

Signed-off-by: ChenBo <box.c.chen@intel.com>
---
 tests/TestSuite_ddp_l2tpv3.py | 108 +++++++++++++++++-----------------
 1 file changed, 54 insertions(+), 54 deletions(-)

diff --git a/tests/TestSuite_ddp_l2tpv3.py b/tests/TestSuite_ddp_l2tpv3.py
index 552232b..da734f3 100644
--- a/tests/TestSuite_ddp_l2tpv3.py
+++ b/tests/TestSuite_ddp_l2tpv3.py
@@ -99,78 +99,78 @@ class TestDdpL2tpv3(TestCase):
         pkt = []
         if keyword is not 'def':
             if keyword is "l2tpv3oipv4":
-                pkt.append("Ether()/IP(proto=115)/Raw('\\x00\\x00\\x03\\xe9')")
-                pkt.append("Ether()/IP(proto=115)/Raw('\\x00\\x00\\x03\\fe9')")
+                pkt.append("Ether()/IP(proto=115)/Raw(b'\\x00\\x00\\x03\\xe9')")
+                pkt.append("Ether()/IP(proto=115)/Raw(b'\\x00\\x00\\x03\\fe9')")
             if keyword is "l2tpv3oipv4_dst":
-                pkt.append("Ether()/IP(dst=\"8.8.8.8\",proto=115)/Raw('\\x00\\x00\\x03\\xe9')")
-                pkt.append("Ether()/IP(dst=\"8.8.8.8\",proto=115)/Raw('\\x00\\x00\\x03\\xb9')")
-                pkt.append("Ether()/IP(dst=\"88.8.8.8\",proto=115)/Raw('\\x00\\x00\\x03\\xe9')")
+                pkt.append("Ether()/IP(dst=\"8.8.8.8\",proto=115)/Raw(b'\\x00\\x00\\x03\\xe9')")
+                pkt.append("Ether()/IP(dst=\"8.8.8.8\",proto=115)/Raw(b'\\x00\\x00\\x03\\xb9')")
+                pkt.append("Ether()/IP(dst=\"88.8.8.8\",proto=115)/Raw(b'\\x00\\x00\\x03\\xe9')")
             if keyword is "l2tpv3oipv4_src":
-                pkt.append("Ether()/IP(src=\"1.1.1.1\",proto=115)/Raw('\\x00\\x00\\x03\\xe9')")
-                pkt.append("Ether()/IP(src=\"1.1.1.1\",proto=115)/Raw('\\x00\\x00\\x03\\xa9')")
-                pkt.append("Ether()/IP(src=\"11.1.1.1\",proto=115)/Raw('\\x00\\x00\\x03\\xe9')")
+                pkt.append("Ether()/IP(src=\"1.1.1.1\",proto=115)/Raw(b'\\x00\\x00\\x03\\xe9')")
+                pkt.append("Ether()/IP(src=\"1.1.1.1\",proto=115)/Raw(b'\\x00\\x00\\x03\\xa9')")
+                pkt.append("Ether()/IP(src=\"11.1.1.1\",proto=115)/Raw(b'\\x00\\x00\\x03\\xe9')")
             if keyword is "l2tpv3oipv4_src_dst":
-                pkt.append("Ether()/IP(src=\"5.5.5.5\",dst=\"2.2.2.2\",proto=115)/Raw('\\x00\\x00\\x03\\xe9')")
-                pkt.append("Ether()/IP(src=\"5.5.5.5\",dst=\"2.2.2.2\",proto=115)/Raw('\\x00\\x00\\x03\\xf9')")
-                pkt.append("Ether()/IP(src=\"55.5.5.5\",dst=\"2.2.2.2\",proto=115)/Raw('\\x00\\x00\\x03\\xe9')")
-                pkt.append("Ether()/IP(src=\"5.5.5.5\",dst=\"22.2.2.2\",proto=115)/Raw('\\x00\\x00\\x03\\xe9')")
+                pkt.append("Ether()/IP(src=\"5.5.5.5\",dst=\"2.2.2.2\",proto=115)/Raw(b'\\x00\\x00\\x03\\xe9')")
+                pkt.append("Ether()/IP(src=\"5.5.5.5\",dst=\"2.2.2.2\",proto=115)/Raw(b'\\x00\\x00\\x03\\xf9')")
+                pkt.append("Ether()/IP(src=\"55.5.5.5\",dst=\"2.2.2.2\",proto=115)/Raw(b'\\x00\\x00\\x03\\xe9')")
+                pkt.append("Ether()/IP(src=\"5.5.5.5\",dst=\"22.2.2.2\",proto=115)/Raw(b'\\x00\\x00\\x03\\xe9')")
             if keyword is "l2tpv3oipv6":
-                pkt.append("Ether()/IPv6(nh=115)/Raw('\\x00\\x00\\x03\\xe9')")
-                pkt.append("Ether()/IPv6(nh=115)/Raw('\\x00\\x00\\x03\\xc9')")
+                pkt.append("Ether()/IPv6(nh=115)/Raw(b'\\x00\\x00\\x03\\xe9')")
+                pkt.append("Ether()/IPv6(nh=115)/Raw(b'\\x00\\x00\\x03\\xc9')")
             if keyword is "l2tpv3oipv6_dst":
-                pkt.append("Ether()/IPv6(dst=\"8:7:6:5:4:3:2:1\",nh=115)/Raw('\\x00\\x00\\x03\\xe9')")
-                pkt.append("Ether()/IPv6(dst=\"8:7:6:5:4:3:2:1\",nh=115)/Raw('\\x00\\x00\\x03\\xd9')")
-                pkt.append("Ether()/IPv6(dst=\"8888:7:6:5:4:3:2:1\",nh=115)/Raw('\\x00\\x00\\x03\\xe9')")
+                pkt.append("Ether()/IPv6(dst=\"8:7:6:5:4:3:2:1\",nh=115)/Raw(b'\\x00\\x00\\x03\\xe9')")
+                pkt.append("Ether()/IPv6(dst=\"8:7:6:5:4:3:2:1\",nh=115)/Raw(b'\\x00\\x00\\x03\\xd9')")
+                pkt.append("Ether()/IPv6(dst=\"8888:7:6:5:4:3:2:1\",nh=115)/Raw(b'\\x00\\x00\\x03\\xe9')")
             if keyword is "l2tpv3oipv6_src":
-                pkt.append("Ether()/IPv6(src=\"1:2:3:4:5:6:7:8\",nh=115)/Raw('\\x00\\x00\\x03\\xe9')")
-                pkt.append("Ether()/IPv6(src=\"1:2:3:4:5:6:7:8\",nh=115)/Raw('\\x00\\x00\\x03\\xf9')")
-                pkt.append("Ether()/IPv6(src=\"1111:2:3:4:5:6:7:8\",nh=115)/Raw('\\x00\\x00\\x03\\xe9')")
+                pkt.append("Ether()/IPv6(src=\"1:2:3:4:5:6:7:8\",nh=115)/Raw(b'\\x00\\x00\\x03\\xe9')")
+                pkt.append("Ether()/IPv6(src=\"1:2:3:4:5:6:7:8\",nh=115)/Raw(b'\\x00\\x00\\x03\\xf9')")
+                pkt.append("Ether()/IPv6(src=\"1111:2:3:4:5:6:7:8\",nh=115)/Raw(b'\\x00\\x00\\x03\\xe9')")
             if keyword is "l2tpv3oipv6_src_dst":
                 pkt.append(
-                    "Ether()/IPv6(src=\"2:3:4:5:6:7:8:9\",dst=\"6:5:4:3:2:1:8:9\",nh=115)/Raw('\\x00\\x00\\x03\\xe9')")
+                    "Ether()/IPv6(src=\"2:3:4:5:6:7:8:9\",dst=\"6:5:4:3:2:1:8:9\",nh=115)/Raw(b'\\x00\\x00\\x03\\xe9')")
                 pkt.append(
-                    "Ether()/IPv6(src=\"2:3:4:5:6:7:8:9\",dst=\"6:5:4:3:2:1:8:9\",nh=115)/Raw('\\x00\\x00\\x03\\xf9')")
+                    "Ether()/IPv6(src=\"2:3:4:5:6:7:8:9\",dst=\"6:5:4:3:2:1:8:9\",nh=115)/Raw(b'\\x00\\x00\\x03\\xf9')")
                 pkt.append(
-                    "Ether()/IPv6(src=\"2222:3:4:5:6:7:8:9\",dst=\"6:5:4:3:2:1:8:9\",nh=115)/Raw('\\x00\\x00\\x03\\xe9')")
+                    "Ether()/IPv6(src=\"2222:3:4:5:6:7:8:9\",dst=\"6:5:4:3:2:1:8:9\",nh=115)/Raw(b'\\x00\\x00\\x03\\xe9')")
                 pkt.append(
-                    "Ether()/IPv6(src=\"2:3:4:5:6:7:8:9\",dst=\"6666:5:4:3:2:1:8:9\",nh=115)/Raw('\\x00\\x00\\x03\\xe9')")
+                    "Ether()/IPv6(src=\"2:3:4:5:6:7:8:9\",dst=\"6666:5:4:3:2:1:8:9\",nh=115)/Raw(b'\\x00\\x00\\x03\\xe9')")
             if keyword is "l2tpv3_ipv4_ipv6":
-                pkt.append("Ether()/IP(proto=115)/Raw('\\x00\\x00\\x03\\xe9')")
-                pkt.append("Ether()/IP(proto=115)/Raw('\\x00\\x00\\x03\\xf9')")
-                pkt.append("Ether()/IPv6(nh=115)/Raw('\\x00\\x00\\x03\\xe9')")
-                pkt.append("Ether()/IPv6(nh=115)/Raw('\\x00\\x00\\x03\\xf9')")
+                pkt.append("Ether()/IP(proto=115)/Raw(b'\\x00\\x00\\x03\\xe9')")
+                pkt.append("Ether()/IP(proto=115)/Raw(b'\\x00\\x00\\x03\\xf9')")
+                pkt.append("Ether()/IPv6(nh=115)/Raw(b'\\x00\\x00\\x03\\xe9')")
+                pkt.append("Ether()/IPv6(nh=115)/Raw(b'\\x00\\x00\\x03\\xf9')")
             if keyword is "l2tpv3oip_v4src_v6src":
-                pkt.append("Ether()/IP(src=\"1.3.5.7\",proto=115)/Raw('\\x00\\x00\\x03\\xe9')")
-                pkt.append("Ether()/IP(src=\"1.3.5.7\",proto=115)/Raw('\\x00\\x00\\x03\\xa9')")
-                pkt.append("Ether()/IP(src=\"11.3.5.7\",proto=115)/Raw('\\x00\\x00\\x03\\xe9')")
-                pkt.append("Ether()/IPv6(src=\"1:3:5:7:9:2:4:6\",nh=115)/Raw('\\x00\\x00\\x03\\xe9')")
-                pkt.append("Ether()/IPv6(src=\"1:3:5:7:9:2:4:6\",nh=115)/Raw('\\x00\\x00\\x03\\xf9')")
-                pkt.append("Ether()/IPv6(src=\"1111:3:5:7:9:2:4:6\",nh=115)/Raw('\\x00\\x00\\x03\\xe9')")
+                pkt.append("Ether()/IP(src=\"1.3.5.7\",proto=115)/Raw(b'\\x00\\x00\\x03\\xe9')")
+                pkt.append("Ether()/IP(src=\"1.3.5.7\",proto=115)/Raw(b'\\x00\\x00\\x03\\xa9')")
+                pkt.append("Ether()/IP(src=\"11.3.5.7\",proto=115)/Raw(b'\\x00\\x00\\x03\\xe9')")
+                pkt.append("Ether()/IPv6(src=\"1:3:5:7:9:2:4:6\",nh=115)/Raw(b'\\x00\\x00\\x03\\xe9')")
+                pkt.append("Ether()/IPv6(src=\"1:3:5:7:9:2:4:6\",nh=115)/Raw(b'\\x00\\x00\\x03\\xf9')")
+                pkt.append("Ether()/IPv6(src=\"1111:3:5:7:9:2:4:6\",nh=115)/Raw(b'\\x00\\x00\\x03\\xe9')")
             if keyword is "l2tpv3oip_v4dst_v6dst":
-                pkt.append("Ether()/IP(dst=\"9.7.5.3\",proto=115)/Raw('\\x00\\x00\\x03\\xe9')")
-                pkt.append("Ether()/IP(dst=\"9.7.5.3\",proto=115)/Raw('\\x00\\x00\\x03\\xb9')")
-                pkt.append("Ether()/IP(dst=\"99.7.5.3\",proto=115)/Raw('\\x00\\x00\\x03\\xe9')")
-                pkt.append("Ether()/IPv6(dst=\"2:4:6:8:1:3:5:7\",nh=115)/Raw('\\x00\\x00\\x03\\xe9')")
-                pkt.append("Ether()/IPv6(dst=\"2:4:6:8:1:3:5:7\",nh=115)/Raw('\\x00\\x00\\x03\\xd9')")
-                pkt.append("Ether()/IPv6(dst=\"2222:4:6:8:1:3:5:7\",nh=115)/Raw('\\x00\\x00\\x03\\xe9')")
+                pkt.append("Ether()/IP(dst=\"9.7.5.3\",proto=115)/Raw(b'\\x00\\x00\\x03\\xe9')")
+                pkt.append("Ether()/IP(dst=\"9.7.5.3\",proto=115)/Raw(b'\\x00\\x00\\x03\\xb9')")
+                pkt.append("Ether()/IP(dst=\"99.7.5.3\",proto=115)/Raw(b'\\x00\\x00\\x03\\xe9')")
+                pkt.append("Ether()/IPv6(dst=\"2:4:6:8:1:3:5:7\",nh=115)/Raw(b'\\x00\\x00\\x03\\xe9')")
+                pkt.append("Ether()/IPv6(dst=\"2:4:6:8:1:3:5:7\",nh=115)/Raw(b'\\x00\\x00\\x03\\xd9')")
+                pkt.append("Ether()/IPv6(dst=\"2222:4:6:8:1:3:5:7\",nh=115)/Raw(b'\\x00\\x00\\x03\\xe9')")
             if keyword is "l2tpv3oip_v4srcdst_v6srcdst":
-                pkt.append("Ether()/IP(src=\"9.8.7.6\",dst=\"4.5.6.7\",proto=115)/Raw('\\x00\\x00\\x03\\xe9')")
-                pkt.append("Ether()/IP(src=\"9.8.7.6\",dst=\"4.5.6.7\",proto=115)/Raw('\\x00\\x00\\x03\\xf9')")
-                pkt.append("Ether()/IP(src=\"99.8.7.6\",dst=\"4.5.6.7\",proto=115)/Raw('\\x00\\x00\\x03\\xe9')")
-                pkt.append("Ether()/IP(src=\"9.8.7.6\",dst=\"44.5.6.7\",proto=115)/Raw('\\x00\\x00\\x03\\xe9')")
+                pkt.append("Ether()/IP(src=\"9.8.7.6\",dst=\"4.5.6.7\",proto=115)/Raw(b'\\x00\\x00\\x03\\xe9')")
+                pkt.append("Ether()/IP(src=\"9.8.7.6\",dst=\"4.5.6.7\",proto=115)/Raw(b'\\x00\\x00\\x03\\xf9')")
+                pkt.append("Ether()/IP(src=\"99.8.7.6\",dst=\"4.5.6.7\",proto=115)/Raw(b'\\x00\\x00\\x03\\xe9')")
+                pkt.append("Ether()/IP(src=\"9.8.7.6\",dst=\"44.5.6.7\",proto=115)/Raw(b'\\x00\\x00\\x03\\xe9')")
                 pkt.append(
-                    "Ether()/IPv6(src=\"1:2:3:4:5:6:7:8\",dst=\"9:8:7:6:5:4:3:2\",nh=115)/Raw('\\x00\\x00\\x03\\xe9')")
+                    "Ether()/IPv6(src=\"1:2:3:4:5:6:7:8\",dst=\"9:8:7:6:5:4:3:2\",nh=115)/Raw(b'\\x00\\x00\\x03\\xe9')")
                 pkt.append(
-                    "Ether()/IPv6(src=\"1:2:3:4:5:6:7:8\",dst=\"9:8:7:6:5:4:3:2\",nh=115)/Raw('\\x00\\x00\\x03\\xf9')")
+                    "Ether()/IPv6(src=\"1:2:3:4:5:6:7:8\",dst=\"9:8:7:6:5:4:3:2\",nh=115)/Raw(b'\\x00\\x00\\x03\\xf9')")
                 pkt.append(
-                    "Ether()/IPv6(src=\"1111:2:3:4:5:6:7:8\",dst=\"9:8:7:6:5:4:3:2\",nh=115)/Raw('\\x00\\x00\\x03\\xe9')")
+                    "Ether()/IPv6(src=\"1111:2:3:4:5:6:7:8\",dst=\"9:8:7:6:5:4:3:2\",nh=115)/Raw(b'\\x00\\x00\\x03\\xe9')")
                 pkt.append(
-                    "Ether()/IPv6(src=\"1:2:3:4:5:6:7:8\",dst=\"9999:8:7:6:5:4:3:2\",nh=115)/Raw('\\x00\\x00\\x03\\xe9')")
+                    "Ether()/IPv6(src=\"1:2:3:4:5:6:7:8\",dst=\"9999:8:7:6:5:4:3:2\",nh=115)/Raw(b'\\x00\\x00\\x03\\xe9')")
             if keyword is "l2tpv3oip_v4_v6_udp":
-                pkt.append("Ether()/IP(dst=\"9.7.5.3\",proto=115)/Raw('\\x00\\x00\\x03\\xe9')")
-                pkt.append("Ether()/IP(dst=\"9.7.5.3\",proto=115)/Raw('\\x00\\x00\\x03\\xb9')")
-                pkt.append("Ether()/IPv6(dst=\"2:4:6:8:1:3:5:7\",nh=115)/Raw('\\x00\\x00\\x03\\xe9')")
-                pkt.append("Ether()/IPv6(dst=\"2:4:6:8:1:3:5:7\",nh=115)/Raw('\\x00\\x00\\x03\\xd9')")
+                pkt.append("Ether()/IP(dst=\"9.7.5.3\",proto=115)/Raw(b'\\x00\\x00\\x03\\xe9')")
+                pkt.append("Ether()/IP(dst=\"9.7.5.3\",proto=115)/Raw(b'\\x00\\x00\\x03\\xb9')")
+                pkt.append("Ether()/IPv6(dst=\"2:4:6:8:1:3:5:7\",nh=115)/Raw(b'\\x00\\x00\\x03\\xe9')")
+                pkt.append("Ether()/IPv6(dst=\"2:4:6:8:1:3:5:7\",nh=115)/Raw(b'\\x00\\x00\\x03\\xd9')")
                 pkt.append("Ether()/IP()/UDP()")
         return pkt
 
@@ -209,7 +209,7 @@ class TestDdpL2tpv3(TestCase):
         qdef = []
         qnum = self.send_and_verify(keyword)
         for i in range(len(qnum)):
-            self.verify(qnum[i] == 0, "Receive packet from wrong queue!!!")
+            self.verify(qnum[i] == 0, "Receive packet from wrong queue{}!!!".format(qnum[i]))
 
         queue = random.randint(1, self.PF_QUEUE - 1)
 
@@ -356,7 +356,7 @@ class TestDdpL2tpv3(TestCase):
 
         qnum = self.send_and_verify(keyword)
         for i in range(len(qdef)):
-            self.verify(qdef[i] == qnum[i], "Receive packet from wrong queue!!!")
+            self.verify(qdef[i] == qnum[i], "Receive packet from wrong queue{}_{}!!!".format(qdef[i],qnum[i]))
         self.dut_testpmd.execute_cmd("flow flush 0")  # Delete all the flow director rules
 
     def test_l2tpv3oipv4(self):
-- 
2.17.1


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

* Re: [dts] [PATCH V1] tests/ddp_l2tpv3: adapted scapy tool running in python3
  2020-05-20  9:51 [dts] [PATCH V1] tests/ddp_l2tpv3: adapted scapy tool running in python3 ChenBo
@ 2020-05-20  9:56 ` Chen, BoX C
  2020-05-29  8:41 ` Tu, Lijuan
  1 sibling, 0 replies; 3+ messages in thread
From: Chen, BoX C @ 2020-05-20  9:56 UTC (permalink / raw)
  To: dts

[-- Attachment #1: Type: text/plain, Size: 13139 bytes --]

Tested-by: Chen, BoX C <box.c.chen@intel.com>

Regards,
Chen Bo

> -----Original Message-----
> From: Chen, BoX C <box.c.chen@intel.com>
> Sent: May 20, 2020 17:51
> To: dts@dpdk.org
> Cc: Chen, BoX C <box.c.chen@intel.com>
> Subject: [dts][PATCH V1] tests/ddp_l2tpv3: adapted scapy tool running in
> python3
> 
> adapted scapy tool running in python3
> 
> Signed-off-by: ChenBo <box.c.chen@intel.com>
> ---
>  tests/TestSuite_ddp_l2tpv3.py | 108 +++++++++++++++++-----------------
>  1 file changed, 54 insertions(+), 54 deletions(-)
> 
> diff --git a/tests/TestSuite_ddp_l2tpv3.py b/tests/TestSuite_ddp_l2tpv3.py
> index 552232b..da734f3 100644
> --- a/tests/TestSuite_ddp_l2tpv3.py
> +++ b/tests/TestSuite_ddp_l2tpv3.py
> @@ -99,78 +99,78 @@ class TestDdpL2tpv3(TestCase):
>          pkt = []
>          if keyword is not 'def':
>              if keyword is "l2tpv3oipv4":
> -                pkt.append("Ether()/IP(proto=115)/Raw('\\x00\\x00\\x03\\xe9')")
> -                pkt.append("Ether()/IP(proto=115)/Raw('\\x00\\x00\\x03\\fe9')")
> +                pkt.append("Ether()/IP(proto=115)/Raw(b'\\x00\\x00\\x03\\xe9')")
> +
> + pkt.append("Ether()/IP(proto=115)/Raw(b'\\x00\\x00\\x03\\fe9')")
>              if keyword is "l2tpv3oipv4_dst":
> -
> pkt.append("Ether()/IP(dst=\"8.8.8.8\",proto=115)/Raw('\\x00\\x00\\x03\\x
> e9')")
> -
> pkt.append("Ether()/IP(dst=\"8.8.8.8\",proto=115)/Raw('\\x00\\x00\\x03\\x
> b9')")
> -
> pkt.append("Ether()/IP(dst=\"88.8.8.8\",proto=115)/Raw('\\x00\\x00\\x03\\
> xe9')")
> +
> pkt.append("Ether()/IP(dst=\"8.8.8.8\",proto=115)/Raw(b'\\x00\\x00\\x03\\
> xe9')")
> +
> pkt.append("Ether()/IP(dst=\"8.8.8.8\",proto=115)/Raw(b'\\x00\\x00\\x03\\
> xb9')")
> +
> + pkt.append("Ether()/IP(dst=\"88.8.8.8\",proto=115)/Raw(b'\\x00\\x00\\x
> + 03\\xe9')")
>              if keyword is "l2tpv3oipv4_src":
> -
> pkt.append("Ether()/IP(src=\"1.1.1.1\",proto=115)/Raw('\\x00\\x00\\x03\\x
> e9')")
> -
> pkt.append("Ether()/IP(src=\"1.1.1.1\",proto=115)/Raw('\\x00\\x00\\x03\\x
> a9')")
> -
> pkt.append("Ether()/IP(src=\"11.1.1.1\",proto=115)/Raw('\\x00\\x00\\x03\\
> xe9')")
> +
> pkt.append("Ether()/IP(src=\"1.1.1.1\",proto=115)/Raw(b'\\x00\\x00\\x03\\
> xe9')")
> +
> pkt.append("Ether()/IP(src=\"1.1.1.1\",proto=115)/Raw(b'\\x00\\x00\\x03\\
> xa9')")
> +
> + pkt.append("Ether()/IP(src=\"11.1.1.1\",proto=115)/Raw(b'\\x00\\x00\\x
> + 03\\xe9')")
>              if keyword is "l2tpv3oipv4_src_dst":
> -
> pkt.append("Ether()/IP(src=\"5.5.5.5\",dst=\"2.2.2.2\",proto=115)/Raw('\\x0
> 0\\x00\\x03\\xe9')")
> -
> pkt.append("Ether()/IP(src=\"5.5.5.5\",dst=\"2.2.2.2\",proto=115)/Raw('\\x0
> 0\\x00\\x03\\xf9')")
> -
> pkt.append("Ether()/IP(src=\"55.5.5.5\",dst=\"2.2.2.2\",proto=115)/Raw('\\x
> 00\\x00\\x03\\xe9')")
> -
> pkt.append("Ether()/IP(src=\"5.5.5.5\",dst=\"22.2.2.2\",proto=115)/Raw('\\x
> 00\\x00\\x03\\xe9')")
> +
> pkt.append("Ether()/IP(src=\"5.5.5.5\",dst=\"2.2.2.2\",proto=115)/Raw(b'\\
> x00\\x00\\x03\\xe9')")
> +
> pkt.append("Ether()/IP(src=\"5.5.5.5\",dst=\"2.2.2.2\",proto=115)/Raw(b'\\
> x00\\x00\\x03\\xf9')")
> +
> pkt.append("Ether()/IP(src=\"55.5.5.5\",dst=\"2.2.2.2\",proto=115)/Raw(b'\
> \x00\\x00\\x03\\xe9')")
> +
> + pkt.append("Ether()/IP(src=\"5.5.5.5\",dst=\"22.2.2.2\",proto=115)/Raw
> + (b'\\x00\\x00\\x03\\xe9')")
>              if keyword is "l2tpv3oipv6":
> -                pkt.append("Ether()/IPv6(nh=115)/Raw('\\x00\\x00\\x03\\xe9')")
> -                pkt.append("Ether()/IPv6(nh=115)/Raw('\\x00\\x00\\x03\\xc9')")
> +                pkt.append("Ether()/IPv6(nh=115)/Raw(b'\\x00\\x00\\x03\\xe9')")
> +
> + pkt.append("Ether()/IPv6(nh=115)/Raw(b'\\x00\\x00\\x03\\xc9')")
>              if keyword is "l2tpv3oipv6_dst":
> -
> pkt.append("Ether()/IPv6(dst=\"8:7:6:5:4:3:2:1\",nh=115)/Raw('\\x00\\x00\\
> x03\\xe9')")
> -
> pkt.append("Ether()/IPv6(dst=\"8:7:6:5:4:3:2:1\",nh=115)/Raw('\\x00\\x00\\
> x03\\xd9')")
> -
> pkt.append("Ether()/IPv6(dst=\"8888:7:6:5:4:3:2:1\",nh=115)/Raw('\\x00\\x
> 00\\x03\\xe9')")
> +
> pkt.append("Ether()/IPv6(dst=\"8:7:6:5:4:3:2:1\",nh=115)/Raw(b'\\x00\\x00
> \\x03\\xe9')")
> +
> pkt.append("Ether()/IPv6(dst=\"8:7:6:5:4:3:2:1\",nh=115)/Raw(b'\\x00\\x00
> \\x03\\xd9')")
> +
> + pkt.append("Ether()/IPv6(dst=\"8888:7:6:5:4:3:2:1\",nh=115)/Raw(b'\\x0
> + 0\\x00\\x03\\xe9')")
>              if keyword is "l2tpv3oipv6_src":
> -
> pkt.append("Ether()/IPv6(src=\"1:2:3:4:5:6:7:8\",nh=115)/Raw('\\x00\\x00\\
> x03\\xe9')")
> -
> pkt.append("Ether()/IPv6(src=\"1:2:3:4:5:6:7:8\",nh=115)/Raw('\\x00\\x00\\
> x03\\xf9')")
> -
> pkt.append("Ether()/IPv6(src=\"1111:2:3:4:5:6:7:8\",nh=115)/Raw('\\x00\\x0
> 0\\x03\\xe9')")
> +
> pkt.append("Ether()/IPv6(src=\"1:2:3:4:5:6:7:8\",nh=115)/Raw(b'\\x00\\x00\
> \x03\\xe9')")
> +
> pkt.append("Ether()/IPv6(src=\"1:2:3:4:5:6:7:8\",nh=115)/Raw(b'\\x00\\x00\
> \x03\\xf9')")
> +
> + pkt.append("Ether()/IPv6(src=\"1111:2:3:4:5:6:7:8\",nh=115)/Raw(b'\\x0
> + 0\\x00\\x03\\xe9')")
>              if keyword is "l2tpv3oipv6_src_dst":
>                  pkt.append(
> -
> "Ether()/IPv6(src=\"2:3:4:5:6:7:8:9\",dst=\"6:5:4:3:2:1:8:9\",nh=115)/Raw('\\
> x00\\x00\\x03\\xe9')")
> +
> + "Ether()/IPv6(src=\"2:3:4:5:6:7:8:9\",dst=\"6:5:4:3:2:1:8:9\",nh=115)/
> + Raw(b'\\x00\\x00\\x03\\xe9')")
>                  pkt.append(
> -
> "Ether()/IPv6(src=\"2:3:4:5:6:7:8:9\",dst=\"6:5:4:3:2:1:8:9\",nh=115)/Raw('\\
> x00\\x00\\x03\\xf9')")
> +
> + "Ether()/IPv6(src=\"2:3:4:5:6:7:8:9\",dst=\"6:5:4:3:2:1:8:9\",nh=115)/
> + Raw(b'\\x00\\x00\\x03\\xf9')")
>                  pkt.append(
> -
> "Ether()/IPv6(src=\"2222:3:4:5:6:7:8:9\",dst=\"6:5:4:3:2:1:8:9\",nh=115)/Raw(
> '\\x00\\x00\\x03\\xe9')")
> +
> + "Ether()/IPv6(src=\"2222:3:4:5:6:7:8:9\",dst=\"6:5:4:3:2:1:8:9\",nh=11
> + 5)/Raw(b'\\x00\\x00\\x03\\xe9')")
>                  pkt.append(
> -
> "Ether()/IPv6(src=\"2:3:4:5:6:7:8:9\",dst=\"6666:5:4:3:2:1:8:9\",nh=115)/Raw(
> '\\x00\\x00\\x03\\xe9')")
> +
> + "Ether()/IPv6(src=\"2:3:4:5:6:7:8:9\",dst=\"6666:5:4:3:2:1:8:9\",nh=11
> + 5)/Raw(b'\\x00\\x00\\x03\\xe9')")
>              if keyword is "l2tpv3_ipv4_ipv6":
> -                pkt.append("Ether()/IP(proto=115)/Raw('\\x00\\x00\\x03\\xe9')")
> -                pkt.append("Ether()/IP(proto=115)/Raw('\\x00\\x00\\x03\\xf9')")
> -                pkt.append("Ether()/IPv6(nh=115)/Raw('\\x00\\x00\\x03\\xe9')")
> -                pkt.append("Ether()/IPv6(nh=115)/Raw('\\x00\\x00\\x03\\xf9')")
> +                pkt.append("Ether()/IP(proto=115)/Raw(b'\\x00\\x00\\x03\\xe9')")
> +                pkt.append("Ether()/IP(proto=115)/Raw(b'\\x00\\x00\\x03\\xf9')")
> +                pkt.append("Ether()/IPv6(nh=115)/Raw(b'\\x00\\x00\\x03\\xe9')")
> +
> + pkt.append("Ether()/IPv6(nh=115)/Raw(b'\\x00\\x00\\x03\\xf9')")
>              if keyword is "l2tpv3oip_v4src_v6src":
> -
> pkt.append("Ether()/IP(src=\"1.3.5.7\",proto=115)/Raw('\\x00\\x00\\x03\\x
> e9')")
> -
> pkt.append("Ether()/IP(src=\"1.3.5.7\",proto=115)/Raw('\\x00\\x00\\x03\\x
> a9')")
> -
> pkt.append("Ether()/IP(src=\"11.3.5.7\",proto=115)/Raw('\\x00\\x00\\x03\\
> xe9')")
> -
> pkt.append("Ether()/IPv6(src=\"1:3:5:7:9:2:4:6\",nh=115)/Raw('\\x00\\x00\\
> x03\\xe9')")
> -
> pkt.append("Ether()/IPv6(src=\"1:3:5:7:9:2:4:6\",nh=115)/Raw('\\x00\\x00\\
> x03\\xf9')")
> -
> pkt.append("Ether()/IPv6(src=\"1111:3:5:7:9:2:4:6\",nh=115)/Raw('\\x00\\x0
> 0\\x03\\xe9')")
> +
> pkt.append("Ether()/IP(src=\"1.3.5.7\",proto=115)/Raw(b'\\x00\\x00\\x03\\
> xe9')")
> +
> pkt.append("Ether()/IP(src=\"1.3.5.7\",proto=115)/Raw(b'\\x00\\x00\\x03\\
> xa9')")
> +
> pkt.append("Ether()/IP(src=\"11.3.5.7\",proto=115)/Raw(b'\\x00\\x00\\x03\
> \xe9')")
> +
> pkt.append("Ether()/IPv6(src=\"1:3:5:7:9:2:4:6\",nh=115)/Raw(b'\\x00\\x00\
> \x03\\xe9')")
> +
> pkt.append("Ether()/IPv6(src=\"1:3:5:7:9:2:4:6\",nh=115)/Raw(b'\\x00\\x00\
> \x03\\xf9')")
> +
> + pkt.append("Ether()/IPv6(src=\"1111:3:5:7:9:2:4:6\",nh=115)/Raw(b'\\x0
> + 0\\x00\\x03\\xe9')")
>              if keyword is "l2tpv3oip_v4dst_v6dst":
> -
> pkt.append("Ether()/IP(dst=\"9.7.5.3\",proto=115)/Raw('\\x00\\x00\\x03\\x
> e9')")
> -
> pkt.append("Ether()/IP(dst=\"9.7.5.3\",proto=115)/Raw('\\x00\\x00\\x03\\x
> b9')")
> -
> pkt.append("Ether()/IP(dst=\"99.7.5.3\",proto=115)/Raw('\\x00\\x00\\x03\\
> xe9')")
> -
> pkt.append("Ether()/IPv6(dst=\"2:4:6:8:1:3:5:7\",nh=115)/Raw('\\x00\\x00\\
> x03\\xe9')")
> -
> pkt.append("Ether()/IPv6(dst=\"2:4:6:8:1:3:5:7\",nh=115)/Raw('\\x00\\x00\\
> x03\\xd9')")
> -
> pkt.append("Ether()/IPv6(dst=\"2222:4:6:8:1:3:5:7\",nh=115)/Raw('\\x00\\x
> 00\\x03\\xe9')")
> +
> pkt.append("Ether()/IP(dst=\"9.7.5.3\",proto=115)/Raw(b'\\x00\\x00\\x03\\
> xe9')")
> +
> pkt.append("Ether()/IP(dst=\"9.7.5.3\",proto=115)/Raw(b'\\x00\\x00\\x03\\
> xb9')")
> +
> pkt.append("Ether()/IP(dst=\"99.7.5.3\",proto=115)/Raw(b'\\x00\\x00\\x03
> \\xe9')")
> +
> pkt.append("Ether()/IPv6(dst=\"2:4:6:8:1:3:5:7\",nh=115)/Raw(b'\\x00\\x00
> \\x03\\xe9')")
> +
> pkt.append("Ether()/IPv6(dst=\"2:4:6:8:1:3:5:7\",nh=115)/Raw(b'\\x00\\x00
> \\x03\\xd9')")
> +
> + pkt.append("Ether()/IPv6(dst=\"2222:4:6:8:1:3:5:7\",nh=115)/Raw(b'\\x0
> + 0\\x00\\x03\\xe9')")
>              if keyword is "l2tpv3oip_v4srcdst_v6srcdst":
> -
> pkt.append("Ether()/IP(src=\"9.8.7.6\",dst=\"4.5.6.7\",proto=115)/Raw('\\x0
> 0\\x00\\x03\\xe9')")
> -
> pkt.append("Ether()/IP(src=\"9.8.7.6\",dst=\"4.5.6.7\",proto=115)/Raw('\\x0
> 0\\x00\\x03\\xf9')")
> -
> pkt.append("Ether()/IP(src=\"99.8.7.6\",dst=\"4.5.6.7\",proto=115)/Raw('\\x
> 00\\x00\\x03\\xe9')")
> -
> pkt.append("Ether()/IP(src=\"9.8.7.6\",dst=\"44.5.6.7\",proto=115)/Raw('\\x
> 00\\x00\\x03\\xe9')")
> +
> pkt.append("Ether()/IP(src=\"9.8.7.6\",dst=\"4.5.6.7\",proto=115)/Raw(b'\\
> x00\\x00\\x03\\xe9')")
> +
> pkt.append("Ether()/IP(src=\"9.8.7.6\",dst=\"4.5.6.7\",proto=115)/Raw(b'\\
> x00\\x00\\x03\\xf9')")
> +
> pkt.append("Ether()/IP(src=\"99.8.7.6\",dst=\"4.5.6.7\",proto=115)/Raw(b'\
> \x00\\x00\\x03\\xe9')")
> +
> + pkt.append("Ether()/IP(src=\"9.8.7.6\",dst=\"44.5.6.7\",proto=115)/Raw
> + (b'\\x00\\x00\\x03\\xe9')")
>                  pkt.append(
> -
> "Ether()/IPv6(src=\"1:2:3:4:5:6:7:8\",dst=\"9:8:7:6:5:4:3:2\",nh=115)/Raw('\\
> x00\\x00\\x03\\xe9')")
> +
> + "Ether()/IPv6(src=\"1:2:3:4:5:6:7:8\",dst=\"9:8:7:6:5:4:3:2\",nh=115)/
> + Raw(b'\\x00\\x00\\x03\\xe9')")
>                  pkt.append(
> -
> "Ether()/IPv6(src=\"1:2:3:4:5:6:7:8\",dst=\"9:8:7:6:5:4:3:2\",nh=115)/Raw('\\
> x00\\x00\\x03\\xf9')")
> +
> + "Ether()/IPv6(src=\"1:2:3:4:5:6:7:8\",dst=\"9:8:7:6:5:4:3:2\",nh=115)/
> + Raw(b'\\x00\\x00\\x03\\xf9')")
>                  pkt.append(
> -
> "Ether()/IPv6(src=\"1111:2:3:4:5:6:7:8\",dst=\"9:8:7:6:5:4:3:2\",nh=115)/Raw(
> '\\x00\\x00\\x03\\xe9')")
> +
> + "Ether()/IPv6(src=\"1111:2:3:4:5:6:7:8\",dst=\"9:8:7:6:5:4:3:2\",nh=11
> + 5)/Raw(b'\\x00\\x00\\x03\\xe9')")
>                  pkt.append(
> -
> "Ether()/IPv6(src=\"1:2:3:4:5:6:7:8\",dst=\"9999:8:7:6:5:4:3:2\",nh=115)/Raw(
> '\\x00\\x00\\x03\\xe9')")
> +
> + "Ether()/IPv6(src=\"1:2:3:4:5:6:7:8\",dst=\"9999:8:7:6:5:4:3:2\",nh=11
> + 5)/Raw(b'\\x00\\x00\\x03\\xe9')")
>              if keyword is "l2tpv3oip_v4_v6_udp":
> -
> pkt.append("Ether()/IP(dst=\"9.7.5.3\",proto=115)/Raw('\\x00\\x00\\x03\\x
> e9')")
> -
> pkt.append("Ether()/IP(dst=\"9.7.5.3\",proto=115)/Raw('\\x00\\x00\\x03\\x
> b9')")
> -
> pkt.append("Ether()/IPv6(dst=\"2:4:6:8:1:3:5:7\",nh=115)/Raw('\\x00\\x00\\
> x03\\xe9')")
> -
> pkt.append("Ether()/IPv6(dst=\"2:4:6:8:1:3:5:7\",nh=115)/Raw('\\x00\\x00\\
> x03\\xd9')")
> +
> pkt.append("Ether()/IP(dst=\"9.7.5.3\",proto=115)/Raw(b'\\x00\\x00\\x03\\
> xe9')")
> +
> pkt.append("Ether()/IP(dst=\"9.7.5.3\",proto=115)/Raw(b'\\x00\\x00\\x03\\
> xb9')")
> +
> pkt.append("Ether()/IPv6(dst=\"2:4:6:8:1:3:5:7\",nh=115)/Raw(b'\\x00\\x00
> \\x03\\xe9')")
> +
> + pkt.append("Ether()/IPv6(dst=\"2:4:6:8:1:3:5:7\",nh=115)/Raw(b'\\x00\\
> + x00\\x03\\xd9')")
>                  pkt.append("Ether()/IP()/UDP()")
>          return pkt
> 
> @@ -209,7 +209,7 @@ class TestDdpL2tpv3(TestCase):
>          qdef = []
>          qnum = self.send_and_verify(keyword)
>          for i in range(len(qnum)):
> -            self.verify(qnum[i] == 0, "Receive packet from wrong queue!!!")
> +            self.verify(qnum[i] == 0, "Receive packet from wrong
> + queue{}!!!".format(qnum[i]))
> 
>          queue = random.randint(1, self.PF_QUEUE - 1)
> 
> @@ -356,7 +356,7 @@ class TestDdpL2tpv3(TestCase):
> 
>          qnum = self.send_and_verify(keyword)
>          for i in range(len(qdef)):
> -            self.verify(qdef[i] == qnum[i], "Receive packet from wrong queue!!!")
> +            self.verify(qdef[i] == qnum[i], "Receive packet from wrong
> + queue{}_{}!!!".format(qdef[i],qnum[i]))
>          self.dut_testpmd.execute_cmd("flow flush 0")  # Delete all the flow
> director rules
> 
>      def test_l2tpv3oipv4(self):
> --
> 2.17.1


[-- Attachment #2: TestDdpL2tpv3.log --]
[-- Type: application/octet-stream, Size: 3065634 bytes --]

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

* Re: [dts] [PATCH V1] tests/ddp_l2tpv3: adapted scapy tool running in python3
  2020-05-20  9:51 [dts] [PATCH V1] tests/ddp_l2tpv3: adapted scapy tool running in python3 ChenBo
  2020-05-20  9:56 ` Chen, BoX C
@ 2020-05-29  8:41 ` Tu, Lijuan
  1 sibling, 0 replies; 3+ messages in thread
From: Tu, Lijuan @ 2020-05-29  8:41 UTC (permalink / raw)
  To: Chen, BoX C, dts; +Cc: Chen, BoX C

Applied failed, please rework it.

> -----Original Message-----
> From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of ChenBo
> Sent: Wednesday, May 20, 2020 5:51 PM
> To: dts@dpdk.org
> Cc: Chen, BoX C <box.c.chen@intel.com>
> Subject: [dts] [PATCH V1] tests/ddp_l2tpv3: adapted scapy tool running in
> python3
> 
> adapted scapy tool running in python3
> 
> Signed-off-by: ChenBo <box.c.chen@intel.com>
> ---
>  tests/TestSuite_ddp_l2tpv3.py | 108 +++++++++++++++++-----------------
>  1 file changed, 54 insertions(+), 54 deletions(-)
> 
> diff --git a/tests/TestSuite_ddp_l2tpv3.py b/tests/TestSuite_ddp_l2tpv3.py
> index 552232b..da734f3 100644
> --- a/tests/TestSuite_ddp_l2tpv3.py
> +++ b/tests/TestSuite_ddp_l2tpv3.py
> @@ -99,78 +99,78 @@ class TestDdpL2tpv3(TestCase):
>          pkt = []
>          if keyword is not 'def':
>              if keyword is "l2tpv3oipv4":
> -                pkt.append("Ether()/IP(proto=115)/Raw('\\x00\\x00\\x03\\xe9')")
> -                pkt.append("Ether()/IP(proto=115)/Raw('\\x00\\x00\\x03\\fe9')")
> +                pkt.append("Ether()/IP(proto=115)/Raw(b'\\x00\\x00\\x03\\xe9')")
> +
> + pkt.append("Ether()/IP(proto=115)/Raw(b'\\x00\\x00\\x03\\fe9')")
>              if keyword is "l2tpv3oipv4_dst":
> -
> pkt.append("Ether()/IP(dst=\"8.8.8.8\",proto=115)/Raw('\\x00\\x00\\x03\\x
> e9')")
> -
> pkt.append("Ether()/IP(dst=\"8.8.8.8\",proto=115)/Raw('\\x00\\x00\\x03\\x
> b9')")
> -
> pkt.append("Ether()/IP(dst=\"88.8.8.8\",proto=115)/Raw('\\x00\\x00\\x03\\
> xe9')")
> +
> pkt.append("Ether()/IP(dst=\"8.8.8.8\",proto=115)/Raw(b'\\x00\\x00\\x03\\
> xe9')")
> +
> pkt.append("Ether()/IP(dst=\"8.8.8.8\",proto=115)/Raw(b'\\x00\\x00\\x03\\
> xb9')")
> +
> + pkt.append("Ether()/IP(dst=\"88.8.8.8\",proto=115)/Raw(b'\\x00\\x00\\x
> + 03\\xe9')")
>              if keyword is "l2tpv3oipv4_src":
> -
> pkt.append("Ether()/IP(src=\"1.1.1.1\",proto=115)/Raw('\\x00\\x00\\x03\\x
> e9')")
> -
> pkt.append("Ether()/IP(src=\"1.1.1.1\",proto=115)/Raw('\\x00\\x00\\x03\\x
> a9')")
> -
> pkt.append("Ether()/IP(src=\"11.1.1.1\",proto=115)/Raw('\\x00\\x00\\x03\\
> xe9')")
> +
> pkt.append("Ether()/IP(src=\"1.1.1.1\",proto=115)/Raw(b'\\x00\\x00\\x03\\
> xe9')")
> +
> pkt.append("Ether()/IP(src=\"1.1.1.1\",proto=115)/Raw(b'\\x00\\x00\\x03\\
> xa9')")
> +
> + pkt.append("Ether()/IP(src=\"11.1.1.1\",proto=115)/Raw(b'\\x00\\x00\\x
> + 03\\xe9')")
>              if keyword is "l2tpv3oipv4_src_dst":
> -
> pkt.append("Ether()/IP(src=\"5.5.5.5\",dst=\"2.2.2.2\",proto=115)/Raw('\\x0
> 0\\x00\\x03\\xe9')")
> -
> pkt.append("Ether()/IP(src=\"5.5.5.5\",dst=\"2.2.2.2\",proto=115)/Raw('\\x0
> 0\\x00\\x03\\xf9')")
> -
> pkt.append("Ether()/IP(src=\"55.5.5.5\",dst=\"2.2.2.2\",proto=115)/Raw('\\x
> 00\\x00\\x03\\xe9')")
> -
> pkt.append("Ether()/IP(src=\"5.5.5.5\",dst=\"22.2.2.2\",proto=115)/Raw('\\x
> 00\\x00\\x03\\xe9')")
> +
> pkt.append("Ether()/IP(src=\"5.5.5.5\",dst=\"2.2.2.2\",proto=115)/Raw(b'\\x
> 00\\x00\\x03\\xe9')")
> +
> pkt.append("Ether()/IP(src=\"5.5.5.5\",dst=\"2.2.2.2\",proto=115)/Raw(b'\\x
> 00\\x00\\x03\\xf9')")
> +
> pkt.append("Ether()/IP(src=\"55.5.5.5\",dst=\"2.2.2.2\",proto=115)/Raw(b'\\
> x00\\x00\\x03\\xe9')")
> +
> + pkt.append("Ether()/IP(src=\"5.5.5.5\",dst=\"22.2.2.2\",proto=115)/Raw
> + (b'\\x00\\x00\\x03\\xe9')")
>              if keyword is "l2tpv3oipv6":
> -                pkt.append("Ether()/IPv6(nh=115)/Raw('\\x00\\x00\\x03\\xe9')")
> -                pkt.append("Ether()/IPv6(nh=115)/Raw('\\x00\\x00\\x03\\xc9')")
> +                pkt.append("Ether()/IPv6(nh=115)/Raw(b'\\x00\\x00\\x03\\xe9')")
> +
> + pkt.append("Ether()/IPv6(nh=115)/Raw(b'\\x00\\x00\\x03\\xc9')")
>              if keyword is "l2tpv3oipv6_dst":
> -
> pkt.append("Ether()/IPv6(dst=\"8:7:6:5:4:3:2:1\",nh=115)/Raw('\\x00\\x00\\
> x03\\xe9')")
> -
> pkt.append("Ether()/IPv6(dst=\"8:7:6:5:4:3:2:1\",nh=115)/Raw('\\x00\\x00\\
> x03\\xd9')")
> -
> pkt.append("Ether()/IPv6(dst=\"8888:7:6:5:4:3:2:1\",nh=115)/Raw('\\x00\\x
> 00\\x03\\xe9')")
> +
> pkt.append("Ether()/IPv6(dst=\"8:7:6:5:4:3:2:1\",nh=115)/Raw(b'\\x00\\x00\
> \x03\\xe9')")
> +
> pkt.append("Ether()/IPv6(dst=\"8:7:6:5:4:3:2:1\",nh=115)/Raw(b'\\x00\\x00\
> \x03\\xd9')")
> +
> + pkt.append("Ether()/IPv6(dst=\"8888:7:6:5:4:3:2:1\",nh=115)/Raw(b'\\x0
> + 0\\x00\\x03\\xe9')")
>              if keyword is "l2tpv3oipv6_src":
> -
> pkt.append("Ether()/IPv6(src=\"1:2:3:4:5:6:7:8\",nh=115)/Raw('\\x00\\x00\\
> x03\\xe9')")
> -
> pkt.append("Ether()/IPv6(src=\"1:2:3:4:5:6:7:8\",nh=115)/Raw('\\x00\\x00\\
> x03\\xf9')")
> -
> pkt.append("Ether()/IPv6(src=\"1111:2:3:4:5:6:7:8\",nh=115)/Raw('\\x00\\x0
> 0\\x03\\xe9')")
> +
> pkt.append("Ether()/IPv6(src=\"1:2:3:4:5:6:7:8\",nh=115)/Raw(b'\\x00\\x00\
> \x03\\xe9')")
> +
> pkt.append("Ether()/IPv6(src=\"1:2:3:4:5:6:7:8\",nh=115)/Raw(b'\\x00\\x00\
> \x03\\xf9')")
> +
> + pkt.append("Ether()/IPv6(src=\"1111:2:3:4:5:6:7:8\",nh=115)/Raw(b'\\x0
> + 0\\x00\\x03\\xe9')")
>              if keyword is "l2tpv3oipv6_src_dst":
>                  pkt.append(
> -
> "Ether()/IPv6(src=\"2:3:4:5:6:7:8:9\",dst=\"6:5:4:3:2:1:8:9\",nh=115)/Raw('\\
> x00\\x00\\x03\\xe9')")
> +
> + "Ether()/IPv6(src=\"2:3:4:5:6:7:8:9\",dst=\"6:5:4:3:2:1:8:9\",nh=115)/
> + Raw(b'\\x00\\x00\\x03\\xe9')")
>                  pkt.append(
> -
> "Ether()/IPv6(src=\"2:3:4:5:6:7:8:9\",dst=\"6:5:4:3:2:1:8:9\",nh=115)/Raw('\\
> x00\\x00\\x03\\xf9')")
> +
> + "Ether()/IPv6(src=\"2:3:4:5:6:7:8:9\",dst=\"6:5:4:3:2:1:8:9\",nh=115)/
> + Raw(b'\\x00\\x00\\x03\\xf9')")
>                  pkt.append(
> -
> "Ether()/IPv6(src=\"2222:3:4:5:6:7:8:9\",dst=\"6:5:4:3:2:1:8:9\",nh=115)/Raw
> ('\\x00\\x00\\x03\\xe9')")
> +
> + "Ether()/IPv6(src=\"2222:3:4:5:6:7:8:9\",dst=\"6:5:4:3:2:1:8:9\",nh=11
> + 5)/Raw(b'\\x00\\x00\\x03\\xe9')")
>                  pkt.append(
> -
> "Ether()/IPv6(src=\"2:3:4:5:6:7:8:9\",dst=\"6666:5:4:3:2:1:8:9\",nh=115)/Raw
> ('\\x00\\x00\\x03\\xe9')")
> +
> + "Ether()/IPv6(src=\"2:3:4:5:6:7:8:9\",dst=\"6666:5:4:3:2:1:8:9\",nh=11
> + 5)/Raw(b'\\x00\\x00\\x03\\xe9')")
>              if keyword is "l2tpv3_ipv4_ipv6":
> -                pkt.append("Ether()/IP(proto=115)/Raw('\\x00\\x00\\x03\\xe9')")
> -                pkt.append("Ether()/IP(proto=115)/Raw('\\x00\\x00\\x03\\xf9')")
> -                pkt.append("Ether()/IPv6(nh=115)/Raw('\\x00\\x00\\x03\\xe9')")
> -                pkt.append("Ether()/IPv6(nh=115)/Raw('\\x00\\x00\\x03\\xf9')")
> +                pkt.append("Ether()/IP(proto=115)/Raw(b'\\x00\\x00\\x03\\xe9')")
> +                pkt.append("Ether()/IP(proto=115)/Raw(b'\\x00\\x00\\x03\\xf9')")
> +                pkt.append("Ether()/IPv6(nh=115)/Raw(b'\\x00\\x00\\x03\\xe9')")
> +
> + pkt.append("Ether()/IPv6(nh=115)/Raw(b'\\x00\\x00\\x03\\xf9')")
>              if keyword is "l2tpv3oip_v4src_v6src":
> -
> pkt.append("Ether()/IP(src=\"1.3.5.7\",proto=115)/Raw('\\x00\\x00\\x03\\x
> e9')")
> -
> pkt.append("Ether()/IP(src=\"1.3.5.7\",proto=115)/Raw('\\x00\\x00\\x03\\x
> a9')")
> -
> pkt.append("Ether()/IP(src=\"11.3.5.7\",proto=115)/Raw('\\x00\\x00\\x03\\
> xe9')")
> -
> pkt.append("Ether()/IPv6(src=\"1:3:5:7:9:2:4:6\",nh=115)/Raw('\\x00\\x00\\
> x03\\xe9')")
> -
> pkt.append("Ether()/IPv6(src=\"1:3:5:7:9:2:4:6\",nh=115)/Raw('\\x00\\x00\\
> x03\\xf9')")
> -
> pkt.append("Ether()/IPv6(src=\"1111:3:5:7:9:2:4:6\",nh=115)/Raw('\\x00\\x0
> 0\\x03\\xe9')")
> +
> pkt.append("Ether()/IP(src=\"1.3.5.7\",proto=115)/Raw(b'\\x00\\x00\\x03\\
> xe9')")
> +
> pkt.append("Ether()/IP(src=\"1.3.5.7\",proto=115)/Raw(b'\\x00\\x00\\x03\\
> xa9')")
> +
> pkt.append("Ether()/IP(src=\"11.3.5.7\",proto=115)/Raw(b'\\x00\\x00\\x03\
> \xe9')")
> +
> pkt.append("Ether()/IPv6(src=\"1:3:5:7:9:2:4:6\",nh=115)/Raw(b'\\x00\\x00\
> \x03\\xe9')")
> +
> pkt.append("Ether()/IPv6(src=\"1:3:5:7:9:2:4:6\",nh=115)/Raw(b'\\x00\\x00\
> \x03\\xf9')")
> +
> + pkt.append("Ether()/IPv6(src=\"1111:3:5:7:9:2:4:6\",nh=115)/Raw(b'\\x0
> + 0\\x00\\x03\\xe9')")
>              if keyword is "l2tpv3oip_v4dst_v6dst":
> -
> pkt.append("Ether()/IP(dst=\"9.7.5.3\",proto=115)/Raw('\\x00\\x00\\x03\\x
> e9')")
> -
> pkt.append("Ether()/IP(dst=\"9.7.5.3\",proto=115)/Raw('\\x00\\x00\\x03\\x
> b9')")
> -
> pkt.append("Ether()/IP(dst=\"99.7.5.3\",proto=115)/Raw('\\x00\\x00\\x03\\
> xe9')")
> -
> pkt.append("Ether()/IPv6(dst=\"2:4:6:8:1:3:5:7\",nh=115)/Raw('\\x00\\x00\\
> x03\\xe9')")
> -
> pkt.append("Ether()/IPv6(dst=\"2:4:6:8:1:3:5:7\",nh=115)/Raw('\\x00\\x00\\
> x03\\xd9')")
> -
> pkt.append("Ether()/IPv6(dst=\"2222:4:6:8:1:3:5:7\",nh=115)/Raw('\\x00\\x
> 00\\x03\\xe9')")
> +
> pkt.append("Ether()/IP(dst=\"9.7.5.3\",proto=115)/Raw(b'\\x00\\x00\\x03\\
> xe9')")
> +
> pkt.append("Ether()/IP(dst=\"9.7.5.3\",proto=115)/Raw(b'\\x00\\x00\\x03\\
> xb9')")
> +
> pkt.append("Ether()/IP(dst=\"99.7.5.3\",proto=115)/Raw(b'\\x00\\x00\\x03\
> \xe9')")
> +
> pkt.append("Ether()/IPv6(dst=\"2:4:6:8:1:3:5:7\",nh=115)/Raw(b'\\x00\\x00\
> \x03\\xe9')")
> +
> pkt.append("Ether()/IPv6(dst=\"2:4:6:8:1:3:5:7\",nh=115)/Raw(b'\\x00\\x00\
> \x03\\xd9')")
> +
> + pkt.append("Ether()/IPv6(dst=\"2222:4:6:8:1:3:5:7\",nh=115)/Raw(b'\\x0
> + 0\\x00\\x03\\xe9')")
>              if keyword is "l2tpv3oip_v4srcdst_v6srcdst":
> -
> pkt.append("Ether()/IP(src=\"9.8.7.6\",dst=\"4.5.6.7\",proto=115)/Raw('\\x0
> 0\\x00\\x03\\xe9')")
> -
> pkt.append("Ether()/IP(src=\"9.8.7.6\",dst=\"4.5.6.7\",proto=115)/Raw('\\x0
> 0\\x00\\x03\\xf9')")
> -
> pkt.append("Ether()/IP(src=\"99.8.7.6\",dst=\"4.5.6.7\",proto=115)/Raw('\\x
> 00\\x00\\x03\\xe9')")
> -
> pkt.append("Ether()/IP(src=\"9.8.7.6\",dst=\"44.5.6.7\",proto=115)/Raw('\\x
> 00\\x00\\x03\\xe9')")
> +
> pkt.append("Ether()/IP(src=\"9.8.7.6\",dst=\"4.5.6.7\",proto=115)/Raw(b'\\x
> 00\\x00\\x03\\xe9')")
> +
> pkt.append("Ether()/IP(src=\"9.8.7.6\",dst=\"4.5.6.7\",proto=115)/Raw(b'\\x
> 00\\x00\\x03\\xf9')")
> +
> pkt.append("Ether()/IP(src=\"99.8.7.6\",dst=\"4.5.6.7\",proto=115)/Raw(b'\\
> x00\\x00\\x03\\xe9')")
> +
> + pkt.append("Ether()/IP(src=\"9.8.7.6\",dst=\"44.5.6.7\",proto=115)/Raw
> + (b'\\x00\\x00\\x03\\xe9')")
>                  pkt.append(
> -
> "Ether()/IPv6(src=\"1:2:3:4:5:6:7:8\",dst=\"9:8:7:6:5:4:3:2\",nh=115)/Raw('\\
> x00\\x00\\x03\\xe9')")
> +
> + "Ether()/IPv6(src=\"1:2:3:4:5:6:7:8\",dst=\"9:8:7:6:5:4:3:2\",nh=115)/
> + Raw(b'\\x00\\x00\\x03\\xe9')")
>                  pkt.append(
> -
> "Ether()/IPv6(src=\"1:2:3:4:5:6:7:8\",dst=\"9:8:7:6:5:4:3:2\",nh=115)/Raw('\\
> x00\\x00\\x03\\xf9')")
> +
> + "Ether()/IPv6(src=\"1:2:3:4:5:6:7:8\",dst=\"9:8:7:6:5:4:3:2\",nh=115)/
> + Raw(b'\\x00\\x00\\x03\\xf9')")
>                  pkt.append(
> -
> "Ether()/IPv6(src=\"1111:2:3:4:5:6:7:8\",dst=\"9:8:7:6:5:4:3:2\",nh=115)/Raw
> ('\\x00\\x00\\x03\\xe9')")
> +
> + "Ether()/IPv6(src=\"1111:2:3:4:5:6:7:8\",dst=\"9:8:7:6:5:4:3:2\",nh=11
> + 5)/Raw(b'\\x00\\x00\\x03\\xe9')")
>                  pkt.append(
> -
> "Ether()/IPv6(src=\"1:2:3:4:5:6:7:8\",dst=\"9999:8:7:6:5:4:3:2\",nh=115)/Raw
> ('\\x00\\x00\\x03\\xe9')")
> +
> + "Ether()/IPv6(src=\"1:2:3:4:5:6:7:8\",dst=\"9999:8:7:6:5:4:3:2\",nh=11
> + 5)/Raw(b'\\x00\\x00\\x03\\xe9')")
>              if keyword is "l2tpv3oip_v4_v6_udp":
> -
> pkt.append("Ether()/IP(dst=\"9.7.5.3\",proto=115)/Raw('\\x00\\x00\\x03\\x
> e9')")
> -
> pkt.append("Ether()/IP(dst=\"9.7.5.3\",proto=115)/Raw('\\x00\\x00\\x03\\x
> b9')")
> -
> pkt.append("Ether()/IPv6(dst=\"2:4:6:8:1:3:5:7\",nh=115)/Raw('\\x00\\x00\\
> x03\\xe9')")
> -
> pkt.append("Ether()/IPv6(dst=\"2:4:6:8:1:3:5:7\",nh=115)/Raw('\\x00\\x00\\
> x03\\xd9')")
> +
> pkt.append("Ether()/IP(dst=\"9.7.5.3\",proto=115)/Raw(b'\\x00\\x00\\x03\\
> xe9')")
> +
> pkt.append("Ether()/IP(dst=\"9.7.5.3\",proto=115)/Raw(b'\\x00\\x00\\x03\\
> xb9')")
> +
> pkt.append("Ether()/IPv6(dst=\"2:4:6:8:1:3:5:7\",nh=115)/Raw(b'\\x00\\x00\
> \x03\\xe9')")
> +
> + pkt.append("Ether()/IPv6(dst=\"2:4:6:8:1:3:5:7\",nh=115)/Raw(b'\\x00\\
> + x00\\x03\\xd9')")
>                  pkt.append("Ether()/IP()/UDP()")
>          return pkt
> 
> @@ -209,7 +209,7 @@ class TestDdpL2tpv3(TestCase):
>          qdef = []
>          qnum = self.send_and_verify(keyword)
>          for i in range(len(qnum)):
> -            self.verify(qnum[i] == 0, "Receive packet from wrong queue!!!")
> +            self.verify(qnum[i] == 0, "Receive packet from wrong
> + queue{}!!!".format(qnum[i]))
> 
>          queue = random.randint(1, self.PF_QUEUE - 1)
> 
> @@ -356,7 +356,7 @@ class TestDdpL2tpv3(TestCase):
> 
>          qnum = self.send_and_verify(keyword)
>          for i in range(len(qdef)):
> -            self.verify(qdef[i] == qnum[i], "Receive packet from wrong queue!!!")
> +            self.verify(qdef[i] == qnum[i], "Receive packet from wrong
> + queue{}_{}!!!".format(qdef[i],qnum[i]))
>          self.dut_testpmd.execute_cmd("flow flush 0")  # Delete all the flow
> director rules
> 
>      def test_l2tpv3oipv4(self):
> --
> 2.17.1


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

end of thread, other threads:[~2020-05-29  8:41 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-20  9:51 [dts] [PATCH V1] tests/ddp_l2tpv3: adapted scapy tool running in python3 ChenBo
2020-05-20  9:56 ` Chen, BoX C
2020-05-29  8:41 ` 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).