Skip to content

Commit

Permalink
tc-testing: add simple action change test
Browse files Browse the repository at this point in the history
Use act_simple to verify that action created with 'tc actions change'
command exists after command returns. The goal is to verify internal action
API reference counting to ensure that the case when netlink message has
NLM_F_REPLACE flag set but action with specified index doesn't exist is
handled correctly.

Signed-off-by: Vlad Buslov <vladbu@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Vlad Buslov authored and David S. Miller committed Mar 31, 2021
1 parent df82e9c commit e48792a
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions tools/testing/selftests/tc-testing/tc-tests/actions/simple.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,30 @@
"$TC actions flush action simple"
]
},
{
"id": "4297",
"name": "Add simple action with change command",
"category": [
"actions",
"simple"
],
"setup": [
[
"$TC actions flush action simple",
0,
1,
255
]
],
"cmdUnderTest": "$TC actions change action simple sdata \"Not changed\" index 60",
"expExitCode": "0",
"verifyCmd": "$TC actions list action simple",
"matchPattern": "action order [0-9]*: Simple <Not changed>.*index 60 ref",
"matchCount": "1",
"teardown": [
"$TC actions flush action simple"
]
},
{
"id": "6d4c",
"name": "Add simple action with duplicate index",
Expand Down

0 comments on commit e48792a

Please sign in to comment.