linux-loongson/tools/testing/selftests/tc-testing/tc-tests/qdiscs/choke.json
Pedro Tammela d227cc0b1e selftests/tc-testing: update test definitions for local resources
With resources localized on a per test basis, some tests definitions
either contain redundant commands, were wrong or could be simplified.
Update all of them to match the new requirements.

Tested-by: Davide Caratti <dcaratti@redhat.com>
Signed-off-by: Pedro Tammela <pctammela@mojatatu.com>
Acked-by: Jamal Hadi Salim <jhs@mojatatu.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
2023-09-28 09:51:07 +02:00

173 lines
5.2 KiB
JSON

[
{
"id": "8937",
"name": "Create CHOKE with default setting",
"category": [
"qdisc",
"choke"
],
"plugins": {
"requires": "nsPlugin"
},
"setup": [
],
"cmdUnderTest": "$TC qdisc add dev $DUMMY handle 1: root choke limit 1000 bandwidth 10000",
"expExitCode": "0",
"verifyCmd": "$TC qdisc show dev $DUMMY",
"matchPattern": "qdisc choke 1: root refcnt [0-9]+ limit 1000p min 83p max 250p",
"matchCount": "1",
"teardown": [
"$TC qdisc del dev $DUMMY handle 1: root"
]
},
{
"id": "48c0",
"name": "Create CHOKE with min packet setting",
"category": [
"qdisc",
"choke"
],
"plugins": {
"requires": "nsPlugin"
},
"setup": [
],
"cmdUnderTest": "$TC qdisc add dev $DUMMY handle 1: root choke limit 1000 bandwidth 10000 min 100",
"expExitCode": "0",
"verifyCmd": "$TC qdisc show dev $DUMMY",
"matchPattern": "qdisc choke 1: root refcnt [0-9]+ limit 1000p min 100p max 250p",
"matchCount": "1",
"teardown": [
"$TC qdisc del dev $DUMMY handle 1: root"
]
},
{
"id": "38c1",
"name": "Create CHOKE with max packet setting",
"category": [
"qdisc",
"choke"
],
"plugins": {
"requires": "nsPlugin"
},
"setup": [
],
"cmdUnderTest": "$TC qdisc add dev $DUMMY handle 1: root choke limit 1000 bandwidth 10000 max 900",
"expExitCode": "0",
"verifyCmd": "$TC qdisc show dev $DUMMY",
"matchPattern": "qdisc choke 1: root refcnt [0-9]+ limit 1000p min.*max 900p",
"matchCount": "1",
"teardown": [
"$TC qdisc del dev $DUMMY handle 1: root"
]
},
{
"id": "234a",
"name": "Create CHOKE with ecn setting",
"category": [
"qdisc",
"choke"
],
"plugins": {
"requires": "nsPlugin"
},
"setup": [
],
"cmdUnderTest": "$TC qdisc add dev $DUMMY handle 1: root choke limit 1000 bandwidth 10000 ecn",
"expExitCode": "0",
"verifyCmd": "$TC qdisc show dev $DUMMY",
"matchPattern": "qdisc choke 1: root refcnt [0-9]+ limit 1000p min 83p max 250p ecn",
"matchCount": "1",
"teardown": [
"$TC qdisc del dev $DUMMY handle 1: root"
]
},
{
"id": "4380",
"name": "Create CHOKE with burst setting",
"category": [
"qdisc",
"choke"
],
"plugins": {
"requires": "nsPlugin"
},
"setup": [
],
"cmdUnderTest": "$TC qdisc add dev $DUMMY handle 1: root choke limit 1000 bandwidth 10000 burst 100",
"expExitCode": "0",
"verifyCmd": "$TC qdisc show dev $DUMMY",
"matchPattern": "qdisc choke 1: root refcnt [0-9]+ limit 1000p min 83p max 250p",
"matchCount": "1",
"teardown": [
"$TC qdisc del dev $DUMMY handle 1: root"
]
},
{
"id": "48c7",
"name": "Delete CHOKE with valid handle",
"category": [
"qdisc",
"choke"
],
"plugins": {
"requires": "nsPlugin"
},
"setup": [
"$TC qdisc add dev $DUMMY handle 1: root choke limit 1000 bandwidth 10000"
],
"cmdUnderTest": "$TC qdisc del dev $DUMMY handle 1: root",
"expExitCode": "0",
"verifyCmd": "$TC qdisc show dev $DUMMY",
"matchPattern": "qdisc choke 1: root refcnt [0-9]+ limit 1000p min 83p max 250p",
"matchCount": "0",
"teardown": [
]
},
{
"id": "4398",
"name": "Replace CHOKE with min setting",
"category": [
"qdisc",
"choke"
],
"plugins": {
"requires": "nsPlugin"
},
"setup": [
"$TC qdisc add dev $DUMMY handle 1: root choke limit 1000 bandwidth 10000"
],
"cmdUnderTest": "$TC qdisc replace dev $DUMMY handle 1: root choke limit 1000 bandwidth 10000 min 100",
"expExitCode": "0",
"verifyCmd": "$TC qdisc show dev $DUMMY",
"matchPattern": "qdisc choke 1: root refcnt [0-9]+ limit 1000p min 100p max 250p",
"matchCount": "1",
"teardown": [
"$TC qdisc del dev $DUMMY handle 1: root"
]
},
{
"id": "0301",
"name": "Change CHOKE with limit setting",
"category": [
"qdisc",
"choke"
],
"plugins": {
"requires": "nsPlugin"
},
"setup": [
"$TC qdisc add dev $DUMMY handle 1: root choke limit 1000 bandwidth 10000"
],
"cmdUnderTest": "$TC qdisc change dev $DUMMY handle 1: root choke limit 1000 bandwidth 10000 min 100",
"expExitCode": "0",
"verifyCmd": "$TC qdisc show dev $DUMMY",
"matchPattern": "qdisc choke 1: root refcnt [0-9]+ limit 1000p min 100p max 250p",
"matchCount": "1",
"teardown": [
"$TC qdisc del dev $DUMMY handle 1: root"
]
}
]