netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Davide Caratti <dcaratti@redhat.com>
To: Jiri Pirko <jiri@resnulli.us>,
	Cong Wang <xiyou.wangcong@gmail.com>,
	Jamal Hadi Salim <jhs@mojatatu.com>,
	"David S. Miller" <davem@davemloft.net>,
	netdev@vger.kernel.org
Subject: [PATCH net 3/4] tc-tests: test denial of 'goto chain' on 'random' traffic in gact.json
Date: Sat, 20 Oct 2018 23:33:09 +0200	[thread overview]
Message-ID: <51a0ed6c8799935d415c9108f1858c1512d6c2c3.1540070509.git.dcaratti@redhat.com> (raw)
In-Reply-To: <cover.1540070509.git.dcaratti@redhat.com>

add test to verify if act_gact forbids 'goto chain' control actions on
'random' traffic in gact.json.

Signed-off-by: Davide Caratti <dcaratti@redhat.com>
---
 .../tc-testing/tc-tests/actions/gact.json     | 24 +++++++++++++++++++
 1 file changed, 24 insertions(+)

diff --git a/tools/testing/selftests/tc-testing/tc-tests/actions/gact.json b/tools/testing/selftests/tc-testing/tc-tests/actions/gact.json
index 68c91023cdb9..89189a03ce3d 100644
--- a/tools/testing/selftests/tc-testing/tc-tests/actions/gact.json
+++ b/tools/testing/selftests/tc-testing/tc-tests/actions/gact.json
@@ -536,5 +536,29 @@
         "matchPattern": "^[ \t]+index [0-9]+ ref",
         "matchCount": "0",
         "teardown": []
+    },
+    {
+        "id": "8e47",
+        "name": "Add gact action with random determ goto chain control action",
+        "category": [
+            "actions",
+            "gact"
+        ],
+        "setup": [
+            [
+                "$TC actions flush action gact",
+                0,
+                1,
+                255
+            ]
+        ],
+        "cmdUnderTest": "$TC actions add action pass random determ goto chain 1 2 index 90",
+        "expExitCode": "255",
+        "verifyCmd": "$TC actions list action gact",
+        "matchPattern": "action order [0-9]*: gact action pass random type determ goto chain 1 val 2.*index 90 ref",
+        "matchCount": "0",
+        "teardown": [
+            "$TC actions flush action gact"
+        ]
     }
 ]
-- 
2.17.1

  parent reply	other threads:[~2018-10-21  5:45 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-20 21:33 [PATCH net 0/4] net/sched: forbid 'goto_chain' on fallback actions Davide Caratti
2018-10-20 21:33 ` [PATCH net 1/4] net/sched: act_gact: disallow 'goto chain' on fallback control action Davide Caratti
2018-10-22 16:22   ` Cong Wang
2018-10-22 20:55   ` Jiri Pirko
2018-10-20 21:33 ` [PATCH net 2/4] net/sched: act_police: " Davide Caratti
2018-10-22 16:23   ` Cong Wang
2018-10-22 20:57   ` Jiri Pirko
2018-10-20 21:33 ` Davide Caratti [this message]
2018-10-20 21:33 ` [PATCH net 4/4] tc-tests: test denial of 'goto chain' for exceed traffic in police.json Davide Caratti
2018-10-22 18:39 ` [PATCH net 0/4] net/sched: forbid 'goto_chain' on fallback actions Jamal Hadi Salim
2018-10-23  2:43 ` David Miller

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=51a0ed6c8799935d415c9108f1858c1512d6c2c3.1540070509.git.dcaratti@redhat.com \
    --to=dcaratti@redhat.com \
    --cc=davem@davemloft.net \
    --cc=jhs@mojatatu.com \
    --cc=jiri@resnulli.us \
    --cc=netdev@vger.kernel.org \
    --cc=xiyou.wangcong@gmail.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
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).