test suite reviews and discussions
 help / color / mirror / Atom feed
From: "Chen, BoX C" <box.c.chen@intel.com>
To: "dts@dpdk.org" <dts@dpdk.org>
Subject: Re: [dts] [PATCH V1] tests/ddp_l2tpv3: adapted scapy tool running in python3
Date: Wed, 20 May 2020 09:56:14 +0000	[thread overview]
Message-ID: <MN2PR11MB39680B1DD7B9989F84005B5FD9B60@MN2PR11MB3968.namprd11.prod.outlook.com> (raw)
In-Reply-To: <20200520095129.23037-1-box.c.chen@intel.com>

[-- 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 --]

  reply	other threads:[~2020-05-20  9:56 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-20  9:51 ChenBo
2020-05-20  9:56 ` Chen, BoX C [this message]
2020-05-29  8:41 ` Tu, Lijuan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=MN2PR11MB39680B1DD7B9989F84005B5FD9B60@MN2PR11MB3968.namprd11.prod.outlook.com \
    --to=box.c.chen@intel.com \
    --cc=dts@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).