From mboxrd@z Thu Jan 1 00:00:00 1970 From: Davide Caratti 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 Message-ID: <51a0ed6c8799935d415c9108f1858c1512d6c2c3.1540070509.git.dcaratti@redhat.com> References: To: Jiri Pirko , Cong Wang , Jamal Hadi Salim , "David S. Miller" , netdev@vger.kernel.org Return-path: Received: from mx1.redhat.com ([209.132.183.28]:47136 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726710AbeJUFpI (ORCPT ); Sun, 21 Oct 2018 01:45:08 -0400 In-Reply-To: Sender: netdev-owner@vger.kernel.org List-ID: add test to verify if act_gact forbids 'goto chain' control actions on 'random' traffic in gact.json. Signed-off-by: Davide Caratti --- .../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