test suite reviews and discussions
 help / color / mirror / Atom feed
From: Owen Hilyard <ohilyard@iol.unh.edu>
To: dts@dpdk.org, lihongx.ma@intel.com
Cc: ohilyard@iol.unh.edu, lylavoie@iol.unh.edu,
	zhaoyan.chen@intel.com, yuan.peng@intel.com, lijuan.tu@intel.com,
	shall@iol.unh.edu
Subject: [dts] [PATCH] rte flow: fixing checkpatch issues
Date: Wed, 14 Oct 2020 17:02:24 -0400
Message-ID: <20201014210225.16759-1-ohilyard@iol.unh.edu> (raw)
In-Reply-To: <20201014205051.16205-1-ohilyard@iol.unh.edu>

Apparently my linter didn't catch these issues.

Signed-off-by: Owen Hilyard <ohilyard@iol.unh.edu>
---
 framework/flow/flow_action_items.py  |  6 +--
 framework/flow/flow_pattern_items.py | 58 ++++++++++++++--------------
 tests/TestSuite_rte_flow.py          |  8 ++--
 3 files changed, 35 insertions(+), 37 deletions(-)

diff --git a/framework/flow/flow_action_items.py b/framework/flow/flow_action_items.py
index 50201ee2..d856cd1d 100644
--- a/framework/flow/flow_action_items.py
+++ b/framework/flow/flow_action_items.py
@@ -72,7 +72,7 @@ class ActionFlowItem(FlowItem):
 
 class FlowActionVoid(ActionFlowItem):
     type = FlowActionType.VOID
-    
+
     test_case = {
          'test': ('ingress pattern eth / ipv4 src is 192.168.0.1 / udp / end actions void / end',
                   frozenset({"Ether() / IP(src=\"192.168.0.1\") / UDP() / ('\\x00' * 64)"}),
@@ -549,7 +549,7 @@ class FlowActionNvgre_encap(ActionFlowItem):
     # NVGRE PACKETS NOT SUPPORTED BY SCAPY.
     '''
      test_case = {
-         'test': ('ingress pattern eth / ipv4 src is 192.168.0.1 
+         'test': ('ingress pattern eth / ipv4 src is 192.168.0.1
          / udp / end actions nvgre_encap definition 0x112233 / end',
                    frozenset({"Ether() / IP(src=\"192.168.0.1\") / UDP() /  NVGRE() / ('\\x00' * 64)"}),
                    frozenset({"Ether() / IP(src=\"192.168.0.2\") / UDP() /  NVGRE() / ('\\x00' * 64)",
@@ -900,7 +900,7 @@ class FlowActionSet_meta(ActionFlowItem):
 
 class FlowActionSet_ipv4_dscp(ActionFlowItem):
     type = FlowActionType.SET_IPV4_DSCP
-    
+
     test_case = {
          'test': ('ingress pattern eth / ipv4 src is 192.168.0.1 '
                   '/ udp / end actions set_ipv4_dscp dscp 2 / end',
diff --git a/framework/flow/flow_pattern_items.py b/framework/flow/flow_pattern_items.py
index 77e2de0d..25823cc8 100644
--- a/framework/flow/flow_pattern_items.py
+++ b/framework/flow/flow_pattern_items.py
@@ -93,7 +93,7 @@ class FlowItemArp_eth_ipv4(PatternFlowItem):
     valid_parent_items: List[FlowItemType] = [FlowItemType.IPV4]
     """
     - ``hdr``: hardware type, normally 1. => hwtype
-    - ``pro``: protocol type, normally 0x0800. => ptype = 2048 
+    - ``pro``: protocol type, normally 0x0800. => ptype = 2048
     - ``hln``: hardware address length, normally 6. => hwlen
     - ``pln``: protocol address length, normally 4. => plen
     - ``op``: opcode (1 for request, 2 for reply). => op
@@ -276,7 +276,6 @@ class FlowItemIcmp(PatternFlowItem):
     This definition includes:
     icmp_type (8 bits; for IPv4 echo request it's "8")
     icmp_code (8 bits)
-    
     THE FOLLOWING ARE NOT SUPPORTED IN TESTPMD:
     icmp_cksum (16 bits)
     icmp_ident (16 bits)
@@ -384,7 +383,7 @@ class FlowItemIpv4(PatternFlowItem):
     valid_parent_items: List[FlowItemType] = [FlowItemType.ETH, FlowItemType.GRE]
     """
     Note: IPv4 options are handled by dedicated pattern items.
-    
+
     - ``hdr``: IPv4 header definition (``rte_ip.h``).
     - Default ``mask`` matches source and destination addresses only.
     """
@@ -458,7 +457,7 @@ class FlowItemIpv6(PatternFlowItem):
     """
     Note: IPv6 options are handled by dedicated pattern items, see `Item:
     IPV6_EXT`_.
-    
+
     - ``hdr``: IPv6 header definition (``rte_ip.h``).
     - Default ``mask`` matches source and destination addresses only.
     """
@@ -547,9 +546,9 @@ class FlowItemSctp(PatternFlowItem):
     valid_next_items = list(ALWAYS_ALLOWED_ITEMS)
     valid_parent_items: List[FlowItemType] = [FlowItemType.IPV4, FlowItemType.IPV6]
     """
-    
+
     **chunks?
-    
+
     - ``hdr``: SCTP header definition (``rte_sctp.h``).
     - Default ``mask`` matches source and destination ports only.
     """
@@ -603,26 +602,26 @@ class FlowItemTcp(PatternFlowItem):
     """
     - ``hdr``: TCP header definition (``rte_tcp.h``).
     - Default ``mask`` matches source and destination ports only.
-    
+
     #define 	RTE_TCP_CWR_FLAG   0x80
- 
+
     #define 	RTE_TCP_ECE_FLAG   0x40
- 
+
     #define 	RTE_TCP_URG_FLAG   0x20
- 
+
     #define 	RTE_TCP_ACK_FLAG   0x10
- 
+
     #define 	RTE_TCP_PSH_FLAG   0x08
- 
+
     #define 	RTE_TCP_RST_FLAG   0x04
- 
+
     #define 	RTE_TCP_SYN_FLAG   0x02
- 
+
     #define 	RTE_TCP_FIN_FLAG   0x01
-    
-    Can we set multiple flags at once in testing (ex. SYN, ACK)? 
+
+    Can we set multiple flags at once in testing (ex. SYN, ACK)?
     Probably, and we can definitely test them if necessary.
-    
+
     """
     possible_properties = {
         # THE FOLLOWING PROPERTIES ARE UNSUPPORTED BY TESTPMD AT THE TIME OF WRITING.
@@ -752,20 +751,19 @@ class FlowItemVlan(PatternFlowItem):
     preceding pattern item.
     If a ``VLAN`` item is present in the pattern, then only tagged packets will
     match the pattern.
-    
+
     - ``tci``: tag control information.
     - ``inner_type``: inner EtherType or TPID.
     - Default ``mask`` matches the VID part of TCI only (lower 12 bits).
-    
+
     tci in testpmd = pcp, dei, and vid, altogether.
-    
+
     pcp in testpmd = prio in scapy
-    dei in testpmd = id in scapy? 
+    dei in testpmd = id in scapy?
     vid in testpmd = vlan in scapy
-    
+
     tpid in testpmd = type in scapy
-    
-    
+
     """
     possible_properties = {
 
@@ -827,8 +825,8 @@ class FlowItemVxlan(PatternFlowItem):
     - ``vni``: VXLAN network identifier.
     - ``rsvd1``: reserved, normally 0x00.
     - Default ``mask`` matches VNI only.
-    
-    TESTPMD ONLY SUPPORTS VNI. 
+
+    TESTPMD ONLY SUPPORTS VNI.
     """
 
 
@@ -886,7 +884,7 @@ class FlowItemVxlan_gpe(PatternFlowItem):
     - ``vni``: VXLAN network identifier.
     - ``rsvd1``: reserved, normally 0x00.
     - Default ``mask`` matches VNI only.
-    
+
     NOT CURRENTLY SUPPORTED BY TESTPMD.
     """
 
@@ -979,7 +977,7 @@ class FlowItemMeta(PatternFlowItem):
     type = FlowItemType.META
     """
     Matches an application specific 32 bit metadata item.
-  
+
     - Default ``mask`` matches the specified metadata value.
     """
 
@@ -989,9 +987,9 @@ class FlowItemTag(PatternFlowItem):
     """
     Matches tag item set by other flows. Multiple tags are supported by specifying
     ``index``.
-    
+
     - Default ``mask`` matches the specified tag value and index.
-    
+
    +----------+----------+----------------------------------------+
    | Field    | Subfield  | Value                                 |
    +==========+===========+=======================================+
diff --git a/tests/TestSuite_rte_flow.py b/tests/TestSuite_rte_flow.py
index 56277a18..0464a2df 100644
--- a/tests/TestSuite_rte_flow.py
+++ b/tests/TestSuite_rte_flow.py
@@ -97,7 +97,7 @@ class RteFlow(TestCase):
         for packet in packets:
             output = self.send_scapy_packet(0, packet)
             time.sleep(5)  # Allow the packet to be processed
-            self.verify("Sent" in output, "Broken scapy packet definiton: " + packet)
+            self.verify("Sent" in output, "Broken scapy packet definition: " + packet)
             output = self.pmdout.get_output()
             self.verify(pass_fail_function(output),
                         error_message + "\r\n" + output)
@@ -151,8 +151,8 @@ class RteFlow(TestCase):
 
     """
     Edge Cases
-    
-    These are tests which are designed to deal with edge cases. 
+
+    These are tests which are designed to deal with edge cases.
     """
 
     def test_excessive_voids(self):
@@ -185,7 +185,7 @@ class RteFlow(TestCase):
 
     """
     Action Test Cases
-    
+
     These are test cases built for testing various actions
     """
 
-- 
2.25.1


  reply	other threads:[~2020-10-14 21:02 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-14 20:50 [dts] [PATCH] rte flow: added test suite and framework Owen Hilyard
2020-10-14 21:02 ` Owen Hilyard [this message]
2020-10-22  8:53 ` Tu, Lijuan
2020-10-23 18:18   ` Owen Hilyard
2020-10-23 23:28     ` [dts] [PATCH v2 1/7] rte flow: add test plan and test suite Owen Hilyard
2020-10-23 23:28       ` [dts] [PATCH v2 2/7] rte flow: add supporting data structures Owen Hilyard
2020-10-23 23:28         ` [dts] [PATCH v2 3/7] rte flow: Add base flow type Owen Hilyard
2020-10-23 23:28           ` [dts] [PATCH v2 4/7] rte flow: add more specifc data structures Owen Hilyard
2020-10-23 23:29             ` [dts] [PATCH v2 5/7] rte flow: add action items Owen Hilyard
2020-10-23 23:29               ` [dts] [PATCH v2 6/7] rte flow: add pattern items Owen Hilyard
2020-10-23 23:29                 ` [dts] [PATCH v2 7/7] rte flow: add flow test generator Owen Hilyard
2020-10-23 23:29                   ` [dts] [PATCH v2] " Owen Hilyard
2020-10-23 23:30                     ` Owen Hilyard
2020-10-27  5:07       ` [dts] [PATCH v2 1/7] rte flow: add test plan and test suite 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=20201014210225.16759-1-ohilyard@iol.unh.edu \
    --to=ohilyard@iol.unh.edu \
    --cc=dts@dpdk.org \
    --cc=lihongx.ma@intel.com \
    --cc=lijuan.tu@intel.com \
    --cc=lylavoie@iol.unh.edu \
    --cc=shall@iol.unh.edu \
    --cc=yuan.peng@intel.com \
    --cc=zhaoyan.chen@intel.com \
    /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

test suite reviews and discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.dpdk.org/dts/0 dts/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dts dts/ https://inbox.dpdk.org/dts \
		dts@dpdk.org
	public-inbox-index dts

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.dts


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git