From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f52.google.com ([74.125.82.52]:54046 "EHLO mail-wm0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753986AbeCGM6D (ORCPT ); Wed, 7 Mar 2018 07:58:03 -0500 Received: by mail-wm0-f52.google.com with SMTP id e194so4586705wmd.3 for ; Wed, 07 Mar 2018 04:58:03 -0800 (PST) From: Jiri Pirko To: netdev@vger.kernel.org Cc: davem@davemloft.net, idosch@mellanox.com, mlxsw@mellanox.com Subject: [patch net-next 1/2] selftests: forwarding: fix "ok" action test Date: Wed, 7 Mar 2018 13:57:59 +0100 Message-Id: <20180307125800.6196-2-jiri@resnulli.us> In-Reply-To: <20180307125800.6196-1-jiri@resnulli.us> References: <20180307125800.6196-1-jiri@resnulli.us> Sender: netdev-owner@vger.kernel.org List-ID: From: Jiri Pirko Fix the "ok" action test so it checks that packet that is okayed does not continue to be processed by other rules. Fix error message as well. Signed-off-by: Jiri Pirko Reviewed-by: Ido Schimmel --- tools/testing/selftests/net/forwarding/tc_actions.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tools/testing/selftests/net/forwarding/tc_actions.sh b/tools/testing/selftests/net/forwarding/tc_actions.sh index 6b18ba2d3982..ac6b6a1057d8 100755 --- a/tools/testing/selftests/net/forwarding/tc_actions.sh +++ b/tools/testing/selftests/net/forwarding/tc_actions.sh @@ -96,7 +96,10 @@ gact_drop_and_ok_test() -t ip -q tc_check_packets "dev $swp1 ingress" 101 1 - check_err $? "Did not see trapped packet" + check_err $? "Did not see passed packet" + + tc_check_packets "dev $swp1 ingress" 102 2 + check_fail $? "Packet was dropped and it should not reach here" tc filter del dev $swp1 ingress protocol ip pref 2 handle 102 flower tc filter del dev $swp1 ingress protocol ip pref 1 handle 101 flower -- 2.14.3