netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next 0/2] Additional tests for action API
@ 2021-04-07 15:46 Vlad Buslov
  2021-04-07 15:46 ` [PATCH net-next 1/2] tc-testing: add simple action test to verify batch add cleanup Vlad Buslov
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Vlad Buslov @ 2021-04-07 15:46 UTC (permalink / raw)
  To: netdev
  Cc: memxor, xiyou.wangcong, davem, jhs, jiri, kuba, toke,
	marcelo.leitner, dcaratti, Vlad Buslov

Add two new tests for action create/change code.

Vlad Buslov (2):
  tc-testing: add simple action test to verify batch add cleanup
  tc-testing: add simple action test to verify batch change cleanup

 .../tc-testing/tc-tests/actions/simple.json   | 59 +++++++++++++++++++
 1 file changed, 59 insertions(+)

-- 
2.29.2


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH net-next 1/2] tc-testing: add simple action test to verify batch add cleanup
  2021-04-07 15:46 [PATCH net-next 0/2] Additional tests for action API Vlad Buslov
@ 2021-04-07 15:46 ` Vlad Buslov
  2021-04-07 15:46 ` [PATCH net-next 2/2] tc-testing: add simple action test to verify batch change cleanup Vlad Buslov
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Vlad Buslov @ 2021-04-07 15:46 UTC (permalink / raw)
  To: netdev
  Cc: memxor, xiyou.wangcong, davem, jhs, jiri, kuba, toke,
	marcelo.leitner, dcaratti, Vlad Buslov

Verify cleanup of failed actions batch add where second action in batch
fails after successful init of first action.

Signed-off-by: Vlad Buslov <vladbu@nvidia.com>
---
 .../tc-testing/tc-tests/actions/simple.json   | 30 +++++++++++++++++++
 1 file changed, 30 insertions(+)

diff --git a/tools/testing/selftests/tc-testing/tc-tests/actions/simple.json b/tools/testing/selftests/tc-testing/tc-tests/actions/simple.json
index e15f708b0fa4..d5bcbb919dcc 100644
--- a/tools/testing/selftests/tc-testing/tc-tests/actions/simple.json
+++ b/tools/testing/selftests/tc-testing/tc-tests/actions/simple.json
@@ -175,5 +175,35 @@
         "teardown": [
             "$TC actions flush action simple"
         ]
+    },
+    {
+        "id": "8d07",
+        "name": "Verify cleanup of failed actions batch add",
+        "category": [
+            "actions",
+            "simple"
+        ],
+        "setup": [
+            [
+                "$TC actions flush action simple",
+                0,
+                1,
+                255
+            ],
+            "$TC actions add action simple sdata \"2\" index 2",
+            [
+                "$TC actions add action simple sdata \"1\" index 1 action simple sdata \"2\" index 2",
+                255
+            ],
+            "$TC actions flush action simple"
+        ],
+        "cmdUnderTest": "$TC actions add action simple sdata \"2\" index 2",
+        "expExitCode": "0",
+        "verifyCmd": "$TC actions list action simple",
+        "matchPattern": "action order [0-9]*: Simple <2>.*index 2 ref",
+        "matchCount": "1",
+        "teardown": [
+            "$TC actions flush action simple"
+        ]
     }
 ]
-- 
2.29.2


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH net-next 2/2] tc-testing: add simple action test to verify batch change cleanup
  2021-04-07 15:46 [PATCH net-next 0/2] Additional tests for action API Vlad Buslov
  2021-04-07 15:46 ` [PATCH net-next 1/2] tc-testing: add simple action test to verify batch add cleanup Vlad Buslov
@ 2021-04-07 15:46 ` Vlad Buslov
  2021-04-07 23:16 ` [PATCH net-next 0/2] Additional tests for action API Cong Wang
  2021-04-08 21:00 ` patchwork-bot+netdevbpf
  3 siblings, 0 replies; 5+ messages in thread
From: Vlad Buslov @ 2021-04-07 15:46 UTC (permalink / raw)
  To: netdev
  Cc: memxor, xiyou.wangcong, davem, jhs, jiri, kuba, toke,
	marcelo.leitner, dcaratti, Vlad Buslov

Verify cleanup of failed actions batch change where second action in batch
fails after successful init of first action.

Signed-off-by: Vlad Buslov <vladbu@nvidia.com>
---
 .../tc-testing/tc-tests/actions/simple.json   | 29 +++++++++++++++++++
 1 file changed, 29 insertions(+)

diff --git a/tools/testing/selftests/tc-testing/tc-tests/actions/simple.json b/tools/testing/selftests/tc-testing/tc-tests/actions/simple.json
index d5bcbb919dcc..e0c5f060ccb9 100644
--- a/tools/testing/selftests/tc-testing/tc-tests/actions/simple.json
+++ b/tools/testing/selftests/tc-testing/tc-tests/actions/simple.json
@@ -205,5 +205,34 @@
         "teardown": [
             "$TC actions flush action simple"
         ]
+    },
+    {
+        "id": "a68a",
+        "name": "Verify cleanup of failed actions batch change",
+        "category": [
+            "actions",
+            "simple"
+        ],
+        "setup": [
+            [
+                "$TC actions flush action simple",
+                0,
+                1,
+                255
+            ],
+            [
+                "$TC actions change action simple sdata \"1\" index 1 action simple sdata \"2\" goto chain 42 index 2",
+                255
+            ],
+            "$TC actions flush action simple"
+        ],
+        "cmdUnderTest": "$TC actions add action simple sdata \"1\" index 1",
+        "expExitCode": "0",
+        "verifyCmd": "$TC actions list action simple",
+        "matchPattern": "action order [0-9]*: Simple <1>.*index 1 ref",
+        "matchCount": "1",
+        "teardown": [
+            "$TC actions flush action simple"
+        ]
     }
 ]
-- 
2.29.2


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH net-next 0/2] Additional tests for action API
  2021-04-07 15:46 [PATCH net-next 0/2] Additional tests for action API Vlad Buslov
  2021-04-07 15:46 ` [PATCH net-next 1/2] tc-testing: add simple action test to verify batch add cleanup Vlad Buslov
  2021-04-07 15:46 ` [PATCH net-next 2/2] tc-testing: add simple action test to verify batch change cleanup Vlad Buslov
@ 2021-04-07 23:16 ` Cong Wang
  2021-04-08 21:00 ` patchwork-bot+netdevbpf
  3 siblings, 0 replies; 5+ messages in thread
From: Cong Wang @ 2021-04-07 23:16 UTC (permalink / raw)
  To: Vlad Buslov
  Cc: Linux Kernel Network Developers, Kumar Kartikeya Dwivedi,
	David Miller, Jamal Hadi Salim, Jiri Pirko, Jakub Kicinski,
	Toke Høiland-Jørgensen, Marcelo Ricardo Leitner,
	Davide Caratti

On Wed, Apr 7, 2021 at 8:46 AM Vlad Buslov <vladbu@nvidia.com> wrote:
>
> Add two new tests for action create/change code.

Acked-by: Cong Wang <cong.wang@bytedance.com>

Thanks.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH net-next 0/2] Additional tests for action API
  2021-04-07 15:46 [PATCH net-next 0/2] Additional tests for action API Vlad Buslov
                   ` (2 preceding siblings ...)
  2021-04-07 23:16 ` [PATCH net-next 0/2] Additional tests for action API Cong Wang
@ 2021-04-08 21:00 ` patchwork-bot+netdevbpf
  3 siblings, 0 replies; 5+ messages in thread
From: patchwork-bot+netdevbpf @ 2021-04-08 21:00 UTC (permalink / raw)
  To: Vlad Buslov
  Cc: netdev, memxor, xiyou.wangcong, davem, jhs, jiri, kuba, toke,
	marcelo.leitner, dcaratti

Hello:

This series was applied to netdev/net-next.git (refs/heads/master):

On Wed, 7 Apr 2021 18:46:41 +0300 you wrote:
> Add two new tests for action create/change code.
> 
> Vlad Buslov (2):
>   tc-testing: add simple action test to verify batch add cleanup
>   tc-testing: add simple action test to verify batch change cleanup
> 
>  .../tc-testing/tc-tests/actions/simple.json   | 59 +++++++++++++++++++
>  1 file changed, 59 insertions(+)

Here is the summary with links:
  - [net-next,1/2] tc-testing: add simple action test to verify batch add cleanup
    https://git.kernel.org/netdev/net-next/c/79749ae19de6
  - [net-next,2/2] tc-testing: add simple action test to verify batch change cleanup
    https://git.kernel.org/netdev/net-next/c/652e3124c3ee

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-04-08 21:00 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-07 15:46 [PATCH net-next 0/2] Additional tests for action API Vlad Buslov
2021-04-07 15:46 ` [PATCH net-next 1/2] tc-testing: add simple action test to verify batch add cleanup Vlad Buslov
2021-04-07 15:46 ` [PATCH net-next 2/2] tc-testing: add simple action test to verify batch change cleanup Vlad Buslov
2021-04-07 23:16 ` [PATCH net-next 0/2] Additional tests for action API Cong Wang
2021-04-08 21:00 ` patchwork-bot+netdevbpf

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).