From patchwork Wed Oct 11 21:16:51 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lucas Bates X-Patchwork-Id: 824577 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=netdev-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=mojatatu-com.20150623.gappssmtp.com header.i=@mojatatu-com.20150623.gappssmtp.com header.b="A8r1L4fm"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3yC6J15TRxz9sRq for ; Thu, 12 Oct 2017 08:17:21 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753309AbdJKVRS (ORCPT ); Wed, 11 Oct 2017 17:17:18 -0400 Received: from mail-io0-f174.google.com ([209.85.223.174]:46877 "EHLO mail-io0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752448AbdJKVRP (ORCPT ); Wed, 11 Oct 2017 17:17:15 -0400 Received: by mail-io0-f174.google.com with SMTP id 101so3294239ioj.3 for ; Wed, 11 Oct 2017 14:17:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mojatatu-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=KPH7yNzilHY4mao+IbB5/igNy0BCDOas66NkhBFgJAQ=; b=A8r1L4fm5UCdAhL04HSAhsqY0TvUL0f1GyvQzHQYhjCCTCbOwtpxZ29zPwCgIA6JN4 9SWeI7qmDSZ3VvpLjxvlQX/ZpahF9+xVnS4FUdUqKY9Rf/WlMgvWLtcx+p8uEBn7fPdM NdgPL54TXW6v3s1y1wpTCzjpTNVcTPSEFLbMmNNZq7SI4jtLtgO7iHOag+QX4LOdxTdX yqnyXePADYLeZweuVInMNPPLBg/dhHZlbVaORvcMO5XhJFsqhsQcHB2hcXqQXg4lmVNB CyyhH/XFAMbxoPQTKPVY1LuvE4wav1IdLkQ4fInJsdxuVUuzNno3HcGTgtYmPbIlbEZ2 GKaA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=KPH7yNzilHY4mao+IbB5/igNy0BCDOas66NkhBFgJAQ=; b=Y/F7u0rtHq9xwFozG85pJQFZqXgv2ozeqbJ1OkshJ2OXNJAOiqQbCNToULzxfNZr9h TdVNLkaO6a3rU0f4ywK8QHTgKWatSB4pp0kziWvti+k+9VtTpbrFrXmxFDiyDsV+hxju /o1c11A7ITYBoYArbRXBgtw6k9TjHoHqocIiSiKlBFQQ19utLUeh8UWKfBx2lGiuq3st yucAA8wHC6Qx9FTpOiuTEVkG5m5XpCc/qYS9ksky3vROtdHGCyuGF1/7t4+ieipz06LQ yUEu0Egdv7D40oqSQApWVR4hGEoytlw7c352ch4g7MXx728bb3IwzPnr+LhiH4CPFY72 LljA== X-Gm-Message-State: AMCzsaWI6I6Dvop0OlsV7JcJbFgYxOqYNk43nk/cFp0K6Wm2NpUS6lfD /Bl6iCxUTnmwan6ZnuA3OMur0A== X-Google-Smtp-Source: ABhQp+SqTUybaptlB6FUSbjovPUGWqzogDcIxrfYl9DDW6WYXwrIxauT+HxXrvtN+eFYESuGQISM0Q== X-Received: by 10.107.3.147 with SMTP id e19mr447694ioi.39.1507756635375; Wed, 11 Oct 2017 14:17:15 -0700 (PDT) Received: from mojatatu.com ([64.26.149.125]) by smtp.gmail.com with ESMTPSA id 5sm3078467ion.46.2017.10.11.14.17.13 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 11 Oct 2017 14:17:14 -0700 (PDT) From: Lucas Bates To: davem@davemloft.net Cc: netdev@vger.kernel.org, xiyou.wangcong@gmail.com, jiri@resnulli.us, jhs@mojatatu.com, aring@mojatatu.com, mrv@mojatatu.com, Lucas Bates Subject: [PATCH net-next 1/4] tc-testing: Add test cases for flushing actions Date: Wed, 11 Oct 2017 17:16:51 -0400 Message-Id: <1507756614-30333-2-git-send-email-lucasb@mojatatu.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1507756614-30333-1-git-send-email-lucasb@mojatatu.com> References: <1507756614-30333-1-git-send-email-lucasb@mojatatu.com> Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Tests for flushing gact and mirred were missing. This patch adds test cases to explicitly test the flush of any installed gact/mirred actions. Signed-off-by: Lucas Bates Acked-by: Jamal Hadi Salim --- .../tc-testing/tc-tests/actions/tests.json | 49 +++++++++++++++++++++- 1 file changed, 48 insertions(+), 1 deletion(-) -- 2.7.4 diff --git a/tools/testing/selftests/tc-testing/tc-tests/actions/tests.json b/tools/testing/selftests/tc-testing/tc-tests/actions/tests.json index 6973bdc..2ea0065 100644 --- a/tools/testing/selftests/tc-testing/tc-tests/actions/tests.json +++ b/tools/testing/selftests/tc-testing/tc-tests/actions/tests.json @@ -246,6 +246,27 @@ ] }, { + "id": "3edf", + "name": "Flush gact actions", + "category": [ + "actions", + "gact" + ], + "setup": [ + "$TC actions add action reclassify index 101", + "$TC actions add action reclassify index 102", + "$TC actions add action reclassify index 103", + "$TC actions add action reclassify index 104", + "$TC actions add action reclassify index 105" + ], + "cmdUnderTest": "$TC actions flush action gact", + "expExitCode": "0", + "verifyCmd": "$TC actions list action gact", + "matchPattern": "action order [0-9]*: gact action reclassify", + "matchCount": "0", + "teardown": [] + }, + { "id": "63ec", "name": "Delete pass action", "category": [ @@ -469,6 +490,32 @@ ] }, { + "id": "58c3", + "name": "Flush mirred actions", + "category": [ + "actions", + "mirred" + ], + "setup": [ + [ + "$TC actions flush action mirred", + 0, + 1, + 255 + ], + "$TC actions add action mirred egress mirror index 1 dev lo", + "$TC actions add action mirred egress redirect index 2 dev lo" + ], + "cmdUnderTest": "$TC actions show action mirred", + "expExitCode": "0", + "verifyCmd": "$TC actions list action mirred", + "matchPattern": "[Mirror|Redirect] to device lo", + "matchCount": "0", + "teardown": [ + "$TC actions flush action mirred" + ] + }, + { "id": "d7c0", "name": "Add invalid mirred direction", "category": [ @@ -1162,4 +1209,4 @@ "$TC actions flush action ife" ] } -] \ No newline at end of file +]