提交 196640a6 编写于 作者: D David S. Miller

Merge branch 'ns-plugin-fixes'

Vlad Buslov says:

====================
Fix problems with using ns plugin

Recent changes to plugin architecture broke some of the tests when running tdc
without specifying a test group. Fix tests incompatible with ns plugin and
modify tests to not reuse interface name of ns veth interface for dummy
interface.
====================
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
......@@ -12,7 +12,7 @@
"$TC qdisc add dev $DEV2 ingress",
"./tdc_multibatch.py $DEV2 $BATCH_DIR 100000 10 add"
],
"cmdUnderTest": "find $BATCH_DIR/add* -print | xargs -n 1 -P 10 $TC -b",
"cmdUnderTest": "bash -c \"find $BATCH_DIR/add* -print | xargs -n 1 -P 10 $TC -b\"",
"expExitCode": "0",
"verifyCmd": "$TC -s filter show dev $DEV2 ingress",
"matchPattern": "filter protocol ip pref 1 flower chain 0 handle",
......@@ -37,7 +37,7 @@
"$TC -b $BATCH_DIR/add_0",
"./tdc_multibatch.py $DEV2 $BATCH_DIR 100000 10 del"
],
"cmdUnderTest": "find $BATCH_DIR/del* -print | xargs -n 1 -P 10 $TC -b",
"cmdUnderTest": "bash -c \"find $BATCH_DIR/del* -print | xargs -n 1 -P 10 $TC -b\"",
"expExitCode": "0",
"verifyCmd": "$TC -s filter show dev $DEV2 ingress",
"matchPattern": "filter protocol ip pref 1 flower chain 0 handle",
......@@ -62,7 +62,7 @@
"$TC -b $BATCH_DIR/add_0",
"./tdc_multibatch.py $DEV2 $BATCH_DIR 100000 10 replace"
],
"cmdUnderTest": "find $BATCH_DIR/replace* -print | xargs -n 1 -P 10 $TC -b",
"cmdUnderTest": "bash -c \"find $BATCH_DIR/replace* -print | xargs -n 1 -P 10 $TC -b\"",
"expExitCode": "0",
"verifyCmd": "$TC -s filter show dev $DEV2 ingress",
"matchPattern": "filter protocol ip pref 1 flower chain 0 handle",
......@@ -87,7 +87,7 @@
"$TC -b $BATCH_DIR/add_0",
"./tdc_multibatch.py -d $DEV2 $BATCH_DIR 100000 10 replace"
],
"cmdUnderTest": "find $BATCH_DIR/replace* -print | xargs -n 1 -P 10 $TC -b",
"cmdUnderTest": "bash -c \"find $BATCH_DIR/replace* -print | xargs -n 1 -P 10 $TC -b\"",
"expExitCode": "0",
"verifyCmd": "$TC -s filter show dev $DEV2 ingress",
"matchPattern": "filter protocol ip pref 1 flower chain 0 handle",
......@@ -112,7 +112,7 @@
"$TC -b $BATCH_DIR/add_0",
"./tdc_multibatch.py -d $DEV2 $BATCH_DIR 100000 10 del"
],
"cmdUnderTest": "find $BATCH_DIR/del* -print | xargs -n 1 -P 10 $TC -f -b",
"cmdUnderTest": "bash -c \"find $BATCH_DIR/del* -print | xargs -n 1 -P 10 $TC -f -b\"",
"expExitCode": "123",
"verifyCmd": "$TC -s filter show dev $DEV2 ingress",
"matchPattern": "filter protocol ip pref 1 flower chain 0 handle",
......@@ -134,11 +134,11 @@
"/bin/mkdir $BATCH_DIR",
"$TC qdisc add dev $DEV2 ingress",
"./tdc_multibatch.py -x init_ $DEV2 $BATCH_DIR 100000 5 add",
"find $BATCH_DIR/init_* -print | xargs -n 1 -P 5 $TC -b",
"bash -c \"find $BATCH_DIR/init_* -print | xargs -n 1 -P 5 $TC -b\"",
"./tdc_multibatch.py -x par_ -a 500001 -m 5 $DEV2 $BATCH_DIR 100000 5 add",
"./tdc_multibatch.py -x par_ $DEV2 $BATCH_DIR 100000 5 del"
],
"cmdUnderTest": "find $BATCH_DIR/par_* -print | xargs -n 1 -P 10 $TC -b",
"cmdUnderTest": "bash -c \"find $BATCH_DIR/par_* -print | xargs -n 1 -P 10 $TC -b\"",
"expExitCode": "0",
"verifyCmd": "$TC -s filter show dev $DEV2 ingress",
"matchPattern": "filter protocol ip pref 1 flower chain 0 handle",
......@@ -160,11 +160,11 @@
"/bin/mkdir $BATCH_DIR",
"$TC qdisc add dev $DEV2 ingress",
"./tdc_multibatch.py -x init_ $DEV2 $BATCH_DIR 100000 10 add",
"find $BATCH_DIR/init_* -print | xargs -n 1 -P 5 $TC -b",
"bash -c \"find $BATCH_DIR/init_* -print | xargs -n 1 -P 5 $TC -b\"",
"./tdc_multibatch.py -x par_ -a 500001 -m 5 $DEV2 $BATCH_DIR 100000 5 replace",
"./tdc_multibatch.py -x par_ $DEV2 $BATCH_DIR 100000 5 del"
],
"cmdUnderTest": "find $BATCH_DIR/par_* -print | xargs -n 1 -P 10 $TC -b",
"cmdUnderTest": "bash -c \"find $BATCH_DIR/par_* -print | xargs -n 1 -P 10 $TC -b\"",
"expExitCode": "0",
"verifyCmd": "$TC -s filter show dev $DEV2 ingress",
"matchPattern": "filter protocol ip pref 1 flower chain 0 handle",
......
......@@ -8,16 +8,16 @@
"fifo"
],
"setup": [
"$IP link add dev $DEV1 type dummy || /bin/true"
"$IP link add dev $DUMMY type dummy || /bin/true"
],
"cmdUnderTest": "$TC qdisc add dev $DEV1 handle 1: root bfifo",
"cmdUnderTest": "$TC qdisc add dev $DUMMY handle 1: root bfifo",
"expExitCode": "0",
"verifyCmd": "$TC qdisc show dev $DEV1",
"verifyCmd": "$TC qdisc show dev $DUMMY",
"matchPattern": "qdisc bfifo 1: root.*limit [0-9]+b",
"matchCount": "1",
"teardown": [
"$TC qdisc del dev $DEV1 handle 1: root bfifo",
"$IP link del dev $DEV1 type dummy"
"$TC qdisc del dev $DUMMY handle 1: root bfifo",
"$IP link del dev $DUMMY type dummy"
]
},
{
......@@ -29,16 +29,16 @@
"fifo"
],
"setup": [
"$IP link add dev $DEV1 type dummy || /bin/true"
"$IP link add dev $DUMMY type dummy || /bin/true"
],
"cmdUnderTest": "$TC qdisc add dev $DEV1 handle 1: root pfifo",
"cmdUnderTest": "$TC qdisc add dev $DUMMY handle 1: root pfifo",
"expExitCode": "0",
"verifyCmd": "$TC qdisc show dev $DEV1",
"verifyCmd": "$TC qdisc show dev $DUMMY",
"matchPattern": "qdisc pfifo 1: root.*limit [0-9]+p",
"matchCount": "1",
"teardown": [
"$TC qdisc del dev $DEV1 handle 1: root pfifo",
"$IP link del dev $DEV1 type dummy"
"$TC qdisc del dev $DUMMY handle 1: root pfifo",
"$IP link del dev $DUMMY type dummy"
]
},
{
......@@ -49,16 +49,16 @@
"fifo"
],
"setup": [
"$IP link add dev $DEV1 type dummy || /bin/true"
"$IP link add dev $DUMMY type dummy || /bin/true"
],
"cmdUnderTest": "$TC qdisc add dev $DEV1 root handle ffff: bfifo",
"cmdUnderTest": "$TC qdisc add dev $DUMMY root handle ffff: bfifo",
"expExitCode": "0",
"verifyCmd": "$TC qdisc show dev $DEV1",
"verifyCmd": "$TC qdisc show dev $DUMMY",
"matchPattern": "qdisc bfifo ffff: root.*limit [0-9]+b",
"matchCount": "1",
"teardown": [
"$TC qdisc del dev $DEV1 handle ffff: root bfifo",
"$IP link del dev $DEV1 type dummy"
"$TC qdisc del dev $DUMMY handle ffff: root bfifo",
"$IP link del dev $DUMMY type dummy"
]
},
{
......@@ -69,16 +69,16 @@
"fifo"
],
"setup": [
"$IP link add dev $DEV1 type dummy || /bin/true"
"$IP link add dev $DUMMY type dummy || /bin/true"
],
"cmdUnderTest": "$TC qdisc add dev $DEV1 handle 1: root bfifo limit 3000b",
"cmdUnderTest": "$TC qdisc add dev $DUMMY handle 1: root bfifo limit 3000b",
"expExitCode": "0",
"verifyCmd": "$TC qdisc show dev $DEV1",
"verifyCmd": "$TC qdisc show dev $DUMMY",
"matchPattern": "qdisc bfifo 1: root.*limit 3000b",
"matchCount": "1",
"teardown": [
"$TC qdisc del dev $DEV1 handle 1: root bfifo",
"$IP link del dev $DEV1 type dummy"
"$TC qdisc del dev $DUMMY handle 1: root bfifo",
"$IP link del dev $DUMMY type dummy"
]
},
{
......@@ -89,16 +89,16 @@
"fifo"
],
"setup": [
"$IP link add dev $DEV1 txqueuelen 3000 type dummy || /bin/true"
"$IP link add dev $DUMMY txqueuelen 3000 type dummy || /bin/true"
],
"cmdUnderTest": "$TC qdisc add dev $DEV1 handle 1: root pfifo limit 3000",
"cmdUnderTest": "$TC qdisc add dev $DUMMY handle 1: root pfifo limit 3000",
"expExitCode": "0",
"verifyCmd": "$TC qdisc show dev $DEV1",
"verifyCmd": "$TC qdisc show dev $DUMMY",
"matchPattern": "qdisc pfifo 1: root.*limit 3000p",
"matchCount": "1",
"teardown": [
"$TC qdisc del dev $DEV1 handle 1: root pfifo",
"$IP link del dev $DEV1 type dummy"
"$TC qdisc del dev $DUMMY handle 1: root pfifo",
"$IP link del dev $DUMMY type dummy"
]
},
{
......@@ -109,15 +109,15 @@
"fifo"
],
"setup": [
"$IP link add dev $DEV1 type dummy || /bin/true"
"$IP link add dev $DUMMY type dummy || /bin/true"
],
"cmdUnderTest": "$TC qdisc add dev $DEV1 root handle 10000: bfifo",
"cmdUnderTest": "$TC qdisc add dev $DUMMY root handle 10000: bfifo",
"expExitCode": "255",
"verifyCmd": "$TC qdisc show dev $DEV1",
"verifyCmd": "$TC qdisc show dev $DUMMY",
"matchPattern": "qdisc bfifo 10000: root.*limit [0-9]+b",
"matchCount": "0",
"teardown": [
"$IP link del dev $DEV1 type dummy"
"$IP link del dev $DUMMY type dummy"
]
},
{
......@@ -128,15 +128,15 @@
"fifo"
],
"setup": [
"$IP link add dev $DEV1 type dummy || /bin/true"
"$IP link add dev $DUMMY type dummy || /bin/true"
],
"cmdUnderTest": "$TC qdisc add dev $DEV1 handle 1: root bfifo foorbar",
"cmdUnderTest": "$TC qdisc add dev $DUMMY handle 1: root bfifo foorbar",
"expExitCode": "1",
"verifyCmd": "$TC qdisc show dev $DEV1",
"verifyCmd": "$TC qdisc show dev $DUMMY",
"matchPattern": "qdisc bfifo 1: root",
"matchCount": "0",
"teardown": [
"$IP link del dev $DEV1 type dummy"
"$IP link del dev $DUMMY type dummy"
]
},
{
......@@ -147,15 +147,15 @@
"fifo"
],
"setup": [
"$IP link add dev $DEV1 type dummy || /bin/true"
"$IP link add dev $DUMMY type dummy || /bin/true"
],
"cmdUnderTest": "$TC qdisc add dev $DEV1 handle 1: root pfifo foorbar",
"cmdUnderTest": "$TC qdisc add dev $DUMMY handle 1: root pfifo foorbar",
"expExitCode": "1",
"verifyCmd": "$TC qdisc show dev $DEV1",
"verifyCmd": "$TC qdisc show dev $DUMMY",
"matchPattern": "qdisc pfifo 1: root",
"matchCount": "0",
"teardown": [
"$IP link del dev $DEV1 type dummy"
"$IP link del dev $DUMMY type dummy"
]
},
{
......@@ -166,18 +166,18 @@
"fifo"
],
"setup": [
"$IP link del dev $DEV1 type dummy || /bin/true",
"$IP link add dev $DEV1 txqueuelen 1000 type dummy",
"$TC qdisc add dev $DEV1 handle 1: root bfifo"
"$IP link del dev $DUMMY type dummy || /bin/true",
"$IP link add dev $DUMMY txqueuelen 1000 type dummy",
"$TC qdisc add dev $DUMMY handle 1: root bfifo"
],
"cmdUnderTest": "$TC qdisc replace dev $DEV1 handle 1: root bfifo limit 3000b",
"cmdUnderTest": "$TC qdisc replace dev $DUMMY handle 1: root bfifo limit 3000b",
"expExitCode": "0",
"verifyCmd": "$TC qdisc show dev $DEV1",
"verifyCmd": "$TC qdisc show dev $DUMMY",
"matchPattern": "qdisc bfifo 1: root.*limit 3000b",
"matchCount": "1",
"teardown": [
"$TC qdisc del dev $DEV1 handle 1: root bfifo",
"$IP link del dev $DEV1 type dummy"
"$TC qdisc del dev $DUMMY handle 1: root bfifo",
"$IP link del dev $DUMMY type dummy"
]
},
{
......@@ -188,18 +188,18 @@
"fifo"
],
"setup": [
"$IP link del dev $DEV1 type dummy || /bin/true",
"$IP link add dev $DEV1 txqueuelen 1000 type dummy",
"$TC qdisc add dev $DEV1 handle 1: root pfifo"
"$IP link del dev $DUMMY type dummy || /bin/true",
"$IP link add dev $DUMMY txqueuelen 1000 type dummy",
"$TC qdisc add dev $DUMMY handle 1: root pfifo"
],
"cmdUnderTest": "$TC qdisc replace dev $DEV1 handle 1: root pfifo limit 30",
"cmdUnderTest": "$TC qdisc replace dev $DUMMY handle 1: root pfifo limit 30",
"expExitCode": "0",
"verifyCmd": "$TC qdisc show dev $DEV1",
"verifyCmd": "$TC qdisc show dev $DUMMY",
"matchPattern": "qdisc pfifo 1: root.*limit 30p",
"matchCount": "1",
"teardown": [
"$TC qdisc del dev $DEV1 handle 1: root pfifo",
"$IP link del dev $DEV1 type dummy"
"$TC qdisc del dev $DUMMY handle 1: root pfifo",
"$IP link del dev $DUMMY type dummy"
]
},
{
......@@ -210,15 +210,15 @@
"fifo"
],
"setup": [
"$IP link add dev $DEV1 type dummy || /bin/true"
"$IP link add dev $DUMMY type dummy || /bin/true"
],
"cmdUnderTest": "$TC qdisc add dev $DEV1 handle 1: root bfifo limit foo-bar",
"cmdUnderTest": "$TC qdisc add dev $DUMMY handle 1: root bfifo limit foo-bar",
"expExitCode": "1",
"verifyCmd": "$TC qdisc show dev $DEV1",
"verifyCmd": "$TC qdisc show dev $DUMMY",
"matchPattern": "qdisc bfifo 1: root.*limit foo-bar",
"matchCount": "0",
"teardown": [
"$IP link del dev $DEV1 type dummy"
"$IP link del dev $DUMMY type dummy"
]
},
{
......@@ -229,17 +229,17 @@
"fifo"
],
"setup": [
"$IP link add dev $DEV1 type dummy || /bin/true",
"$TC qdisc add dev $DEV1 handle 1: root bfifo"
"$IP link add dev $DUMMY type dummy || /bin/true",
"$TC qdisc add dev $DUMMY handle 1: root bfifo"
],
"cmdUnderTest": "$TC qdisc add dev $DEV1 handle 1: root bfifo",
"cmdUnderTest": "$TC qdisc add dev $DUMMY handle 1: root bfifo",
"expExitCode": "2",
"verifyCmd": "$TC qdisc show dev $DEV1",
"verifyCmd": "$TC qdisc show dev $DUMMY",
"matchPattern": "qdisc bfifo 1: root",
"matchCount": "1",
"teardown": [
"$TC qdisc del dev $DEV1 handle 1: root bfifo",
"$IP link del dev $DEV1 type dummy"
"$TC qdisc del dev $DUMMY handle 1: root bfifo",
"$IP link del dev $DUMMY type dummy"
]
},
{
......@@ -250,15 +250,15 @@
"fifo"
],
"setup": [
"$IP link add dev $DEV1 type dummy || /bin/true"
"$IP link add dev $DUMMY type dummy || /bin/true"
],
"cmdUnderTest": "$TC qdisc del dev $DEV1 root handle 1: bfifo",
"cmdUnderTest": "$TC qdisc del dev $DUMMY root handle 1: bfifo",
"expExitCode": "2",
"verifyCmd": "$TC qdisc show dev $DEV1",
"verifyCmd": "$TC qdisc show dev $DUMMY",
"matchPattern": "qdisc bfifo 1: root",
"matchCount": "0",
"teardown": [
"$IP link del dev $DEV1 type dummy"
"$IP link del dev $DUMMY type dummy"
]
},
{
......@@ -269,15 +269,15 @@
"fifo"
],
"setup": [
"$IP link add dev $DEV1 type dummy || /bin/true"
"$IP link add dev $DUMMY type dummy || /bin/true"
],
"cmdUnderTest": "$TC qdisc add dev $DEV1 root handle 123^ bfifo limit 100b",
"cmdUnderTest": "$TC qdisc add dev $DUMMY root handle 123^ bfifo limit 100b",
"expExitCode": "255",
"verifyCmd": "$TC qdisc show dev $DEV1",
"verifyCmd": "$TC qdisc show dev $DUMMY",
"matchPattern": "qdisc bfifo 123 root",
"matchCount": "0",
"teardown": [
"$IP link del dev $DEV1 type dummy"
"$IP link del dev $DUMMY type dummy"
]
},
{
......@@ -288,17 +288,17 @@
"fifo"
],
"setup": [
"$IP link add dev $DEV1 type dummy || /bin/true",
"$TC qdisc add dev $DEV1 root handle 1: bfifo",
"$TC qdisc del dev $DEV1 root handle 1: bfifo"
"$IP link add dev $DUMMY type dummy || /bin/true",
"$TC qdisc add dev $DUMMY root handle 1: bfifo",
"$TC qdisc del dev $DUMMY root handle 1: bfifo"
],
"cmdUnderTest": "$TC qdisc del dev $DEV1 handle 1: root bfifo",
"cmdUnderTest": "$TC qdisc del dev $DUMMY handle 1: root bfifo",
"expExitCode": "2",
"verifyCmd": "$TC qdisc show dev $DEV1",
"verifyCmd": "$TC qdisc show dev $DUMMY",
"matchPattern": "qdisc bfifo 1: root",
"matchCount": "0",
"teardown": [
"$IP link del dev $DEV1 type dummy"
"$IP link del dev $DUMMY type dummy"
]
}
]
......@@ -7,16 +7,16 @@
"ingress"
],
"setup": [
"$IP link add dev $DEV1 type dummy || /bin/true"
"$IP link add dev $DUMMY type dummy || /bin/true"
],
"cmdUnderTest": "$TC qdisc add dev $DEV1 ingress",
"cmdUnderTest": "$TC qdisc add dev $DUMMY ingress",
"expExitCode": "0",
"verifyCmd": "$TC qdisc show dev $DEV1",
"verifyCmd": "$TC qdisc show dev $DUMMY",
"matchPattern": "qdisc ingress ffff:",
"matchCount": "1",
"teardown": [
"$TC qdisc del dev $DEV1 ingress",
"$IP link del dev $DEV1 type dummy"
"$TC qdisc del dev $DUMMY ingress",
"$IP link del dev $DUMMY type dummy"
]
},
{
......@@ -27,15 +27,15 @@
"ingress"
],
"setup": [
"$IP link add dev $DEV1 type dummy || /bin/true"
"$IP link add dev $DUMMY type dummy || /bin/true"
],
"cmdUnderTest": "$TC qdisc add dev $DEV1 ingress foorbar",
"cmdUnderTest": "$TC qdisc add dev $DUMMY ingress foorbar",
"expExitCode": "1",
"verifyCmd": "$TC qdisc show dev $DEV1",
"verifyCmd": "$TC qdisc show dev $DUMMY",
"matchPattern": "qdisc ingress ffff:",
"matchCount": "0",
"teardown": [
"$IP link del dev $DEV1 type dummy"
"$IP link del dev $DUMMY type dummy"
]
},
{
......@@ -46,17 +46,17 @@
"ingress"
],
"setup": [
"$IP link add dev $DEV1 type dummy || /bin/true",
"$TC qdisc add dev $DEV1 ingress"
"$IP link add dev $DUMMY type dummy || /bin/true",
"$TC qdisc add dev $DUMMY ingress"
],
"cmdUnderTest": "$TC qdisc add dev $DEV1 ingress",
"cmdUnderTest": "$TC qdisc add dev $DUMMY ingress",
"expExitCode": "2",
"verifyCmd": "$TC qdisc show dev $DEV1",
"verifyCmd": "$TC qdisc show dev $DUMMY",
"matchPattern": "qdisc ingress ffff:",
"matchCount": "1",
"teardown": [
"$TC qdisc del dev $DEV1 ingress",
"$IP link del dev $DEV1 type dummy"
"$TC qdisc del dev $DUMMY ingress",
"$IP link del dev $DUMMY type dummy"
]
},
{
......@@ -67,15 +67,15 @@
"ingress"
],
"setup": [
"$IP link add dev $DEV1 type dummy || /bin/true"
"$IP link add dev $DUMMY type dummy || /bin/true"
],
"cmdUnderTest": "$TC qdisc del dev $DEV1 ingress",
"cmdUnderTest": "$TC qdisc del dev $DUMMY ingress",
"expExitCode": "2",
"verifyCmd": "$TC qdisc show dev $DEV1",
"verifyCmd": "$TC qdisc show dev $DUMMY",
"matchPattern": "qdisc ingress ffff:",
"matchCount": "0",
"teardown": [
"$IP link del dev $DEV1 type dummy"
"$IP link del dev $DUMMY type dummy"
]
},
{
......@@ -86,17 +86,17 @@
"ingress"
],
"setup": [
"$IP link add dev $DEV1 type dummy || /bin/true",
"$TC qdisc add dev $DEV1 ingress",
"$TC qdisc del dev $DEV1 ingress"
"$IP link add dev $DUMMY type dummy || /bin/true",
"$TC qdisc add dev $DUMMY ingress",
"$TC qdisc del dev $DUMMY ingress"
],
"cmdUnderTest": "$TC qdisc del dev $DEV1 ingress",
"cmdUnderTest": "$TC qdisc del dev $DUMMY ingress",
"expExitCode": "2",
"verifyCmd": "$TC qdisc show dev $DEV1",
"verifyCmd": "$TC qdisc show dev $DUMMY",
"matchPattern": "qdisc ingress ffff:",
"matchCount": "0",
"teardown": [
"$IP link del dev $DEV1 type dummy"
"$IP link del dev $DUMMY type dummy"
]
}
]
......@@ -7,16 +7,16 @@
"prio"
],
"setup": [
"$IP link add dev $DEV1 type dummy || /bin/true"
"$IP link add dev $DUMMY type dummy || /bin/true"
],
"cmdUnderTest": "$TC qdisc add dev $DEV1 handle 1: root prio",
"cmdUnderTest": "$TC qdisc add dev $DUMMY handle 1: root prio",
"expExitCode": "0",
"verifyCmd": "$TC qdisc show dev $DEV1",
"verifyCmd": "$TC qdisc show dev $DUMMY",
"matchPattern": "qdisc prio 1: root",
"matchCount": "1",
"teardown": [
"$TC qdisc del dev $DEV1 handle 1: root prio",
"$IP link del dev $DEV1 type dummy"
"$TC qdisc del dev $DUMMY handle 1: root prio",
"$IP link del dev $DUMMY type dummy"
]
},
{
......@@ -27,15 +27,15 @@
"prio"
],
"setup": [
"$IP link add dev $DEV1 type dummy || /bin/true"
"$IP link add dev $DUMMY type dummy || /bin/true"
],
"cmdUnderTest": "$TC qdisc add dev $DEV1 root handle ffff: prio",
"cmdUnderTest": "$TC qdisc add dev $DUMMY root handle ffff: prio",
"expExitCode": "0",
"verifyCmd": "$TC qdisc show dev $DEV1",
"verifyCmd": "$TC qdisc show dev $DUMMY",
"matchPattern": "qdisc prio ffff: root",
"matchCount": "1",
"teardown": [
"$IP link del dev $DEV1 type dummy"
"$IP link del dev $DUMMY type dummy"
]
},
{
......@@ -46,15 +46,15 @@
"prio"
],
"setup": [
"$IP link add dev $DEV1 type dummy || /bin/true"
"$IP link add dev $DUMMY type dummy || /bin/true"
],
"cmdUnderTest": "$TC qdisc add dev $DEV1 root handle 10000: prio",
"cmdUnderTest": "$TC qdisc add dev $DUMMY root handle 10000: prio",
"expExitCode": "255",
"verifyCmd": "$TC qdisc show dev $DEV1",
"verifyCmd": "$TC qdisc show dev $DUMMY",
"matchPattern": "qdisc prio 10000: root",
"matchCount": "0",
"teardown": [
"$IP link del dev $DEV1 type dummy"
"$IP link del dev $DUMMY type dummy"
]
},
{
......@@ -65,15 +65,15 @@
"prio"
],
"setup": [
"$IP link add dev $DEV1 type dummy || /bin/true"
"$IP link add dev $DUMMY type dummy || /bin/true"
],
"cmdUnderTest": "$TC qdisc add dev $DEV1 handle 1: root prio foorbar",
"cmdUnderTest": "$TC qdisc add dev $DUMMY handle 1: root prio foorbar",
"expExitCode": "1",
"verifyCmd": "$TC qdisc show dev $DEV1",
"verifyCmd": "$TC qdisc show dev $DUMMY",
"matchPattern": "qdisc prio 1: root",
"matchCount": "0",
"teardown": [
"$IP link del dev $DEV1 type dummy"
"$IP link del dev $DUMMY type dummy"
]
},
{
......@@ -84,16 +84,16 @@
"prio"
],
"setup": [
"$IP link add dev $DEV1 type dummy || /bin/true"
"$IP link add dev $DUMMY type dummy || /bin/true"
],
"cmdUnderTest": "$TC qdisc add dev $DEV1 handle 1: root prio bands 4 priomap 1 1 2 2 3 3 0 0 1 2 3 0 0 0 0 0",
"cmdUnderTest": "$TC qdisc add dev $DUMMY handle 1: root prio bands 4 priomap 1 1 2 2 3 3 0 0 1 2 3 0 0 0 0 0",
"expExitCode": "0",
"verifyCmd": "$TC qdisc show dev $DEV1",
"verifyCmd": "$TC qdisc show dev $DUMMY",
"matchPattern": "qdisc prio 1: root.*bands 4 priomap.*1 1 2 2 3 3 0 0 1 2 3 0 0 0 0 0",
"matchCount": "1",
"teardown": [
"$TC qdisc del dev $DEV1 handle 1: root prio",
"$IP link del dev $DEV1 type dummy"
"$TC qdisc del dev $DUMMY handle 1: root prio",
"$IP link del dev $DUMMY type dummy"
]
},
{
......@@ -104,15 +104,15 @@
"prio"
],
"setup": [
"$IP link add dev $DEV1 type dummy || /bin/true"
"$IP link add dev $DUMMY type dummy || /bin/true"
],
"cmdUnderTest": "$TC qdisc add dev $DEV1 handle 1: root prio bands 4 priomap 1 1 2 2 3 3 0 0 1 2 3 0 0 0 0 0 1 1",
"cmdUnderTest": "$TC qdisc add dev $DUMMY handle 1: root prio bands 4 priomap 1 1 2 2 3 3 0 0 1 2 3 0 0 0 0 0 1 1",
"expExitCode": "1",
"verifyCmd": "$TC qdisc show dev $DEV1",
"verifyCmd": "$TC qdisc show dev $DUMMY",
"matchPattern": "qdisc prio 1: root.*bands 4 priomap.*1 1 2 2 3 3 0 0 1 2 3 0 0 0 0 0 1 1",
"matchCount": "0",
"teardown": [
"$IP link del dev $DEV1 type dummy"
"$IP link del dev $DUMMY type dummy"
]
},
{
......@@ -123,15 +123,15 @@
"prio"
],
"setup": [
"$IP link add dev $DEV1 type dummy || /bin/true"
"$IP link add dev $DUMMY type dummy || /bin/true"
],
"cmdUnderTest": "$TC qdisc add dev $DEV1 handle 1: root prio bands 4 priomap 1 1 2 2 7 5 0 0 1 2 3 0 0 0 0 0",
"cmdUnderTest": "$TC qdisc add dev $DUMMY handle 1: root prio bands 4 priomap 1 1 2 2 7 5 0 0 1 2 3 0 0 0 0 0",
"expExitCode": "1",
"verifyCmd": "$TC qdisc show dev $DEV1",
"verifyCmd": "$TC qdisc show dev $DUMMY",
"matchPattern": "qdisc prio 1: root.*bands 4 priomap.*1 1 2 2 7 5 0 0 1 2 3 0 0 0 0 0",
"matchCount": "0",
"teardown": [
"$IP link del dev $DEV1 type dummy"
"$IP link del dev $DUMMY type dummy"
]
},
{
......@@ -142,15 +142,15 @@
"prio"
],
"setup": [
"$IP link add dev $DEV1 type dummy || /bin/true"
"$IP link add dev $DUMMY type dummy || /bin/true"
],
"cmdUnderTest": "$TC qdisc add dev $DEV1 handle 1: root prio bands 1 priomap 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0",
"cmdUnderTest": "$TC qdisc add dev $DUMMY handle 1: root prio bands 1 priomap 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0",
"expExitCode": "2",
"verifyCmd": "$TC qdisc show dev $DEV1",
"verifyCmd": "$TC qdisc show dev $DUMMY",
"matchPattern": "qdisc prio 1: root.*bands 1 priomap.*0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0",
"matchCount": "0",
"teardown": [
"$IP link del dev $DEV1 type dummy"
"$IP link del dev $DUMMY type dummy"
]
},
{
......@@ -161,15 +161,15 @@
"prio"
],
"setup": [
"$IP link add dev $DEV1 type dummy || /bin/true"
"$IP link add dev $DUMMY type dummy || /bin/true"
],
"cmdUnderTest": "$TC qdisc add dev $DEV1 handle 1: root prio bands 1024 priomap 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16",
"cmdUnderTest": "$TC qdisc add dev $DUMMY handle 1: root prio bands 1024 priomap 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16",
"expExitCode": "2",
"verifyCmd": "$TC qdisc show dev $DEV1",
"verifyCmd": "$TC qdisc show dev $DUMMY",
"matchPattern": "qdisc prio 1: root.*bands 1024 priomap.*1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16",
"matchCount": "0",
"teardown": [
"$IP link del dev $DEV1 type dummy"
"$IP link del dev $DUMMY type dummy"
]
},
{
......@@ -180,17 +180,17 @@
"prio"
],
"setup": [
"$IP link add dev $DEV1 type dummy || /bin/true",
"$TC qdisc add dev $DEV1 handle 1: root prio"
"$IP link add dev $DUMMY type dummy || /bin/true",
"$TC qdisc add dev $DUMMY handle 1: root prio"
],
"cmdUnderTest": "$TC qdisc replace dev $DEV1 handle 1: root prio bands 8 priomap 1 1 2 2 3 3 4 4 5 5 6 6 7 7 0 0",
"cmdUnderTest": "$TC qdisc replace dev $DUMMY handle 1: root prio bands 8 priomap 1 1 2 2 3 3 4 4 5 5 6 6 7 7 0 0",
"expExitCode": "0",
"verifyCmd": "$TC qdisc show dev $DEV1",
"verifyCmd": "$TC qdisc show dev $DUMMY",
"matchPattern": "qdisc prio 1: root.*bands 8 priomap.*1 1 2 2 3 3 4 4 5 5 6 6 7 7 0 0",
"matchCount": "1",
"teardown": [
"$TC qdisc del dev $DEV1 handle 1: root prio",
"$IP link del dev $DEV1 type dummy"
"$TC qdisc del dev $DUMMY handle 1: root prio",
"$IP link del dev $DUMMY type dummy"
]
},
{
......@@ -201,17 +201,17 @@
"prio"
],
"setup": [
"$IP link add dev $DEV1 type dummy || /bin/true",
"$TC qdisc add dev $DEV1 handle 1: root prio"
"$IP link add dev $DUMMY type dummy || /bin/true",
"$TC qdisc add dev $DUMMY handle 1: root prio"
],
"cmdUnderTest": "$TC qdisc add dev $DEV1 handle 1: root prio",
"cmdUnderTest": "$TC qdisc add dev $DUMMY handle 1: root prio",
"expExitCode": "2",
"verifyCmd": "$TC qdisc show dev $DEV1",
"verifyCmd": "$TC qdisc show dev $DUMMY",
"matchPattern": "qdisc prio 1: root",
"matchCount": "1",
"teardown": [
"$TC qdisc del dev $DEV1 handle 1: root prio",
"$IP link del dev $DEV1 type dummy"
"$TC qdisc del dev $DUMMY handle 1: root prio",
"$IP link del dev $DUMMY type dummy"
]
},
{
......@@ -222,15 +222,15 @@
"prio"
],
"setup": [
"$IP link add dev $DEV1 type dummy || /bin/true"
"$IP link add dev $DUMMY type dummy || /bin/true"
],
"cmdUnderTest": "$TC qdisc del dev $DEV1 root handle 1: prio",
"cmdUnderTest": "$TC qdisc del dev $DUMMY root handle 1: prio",
"expExitCode": "2",
"verifyCmd": "$TC qdisc show dev $DEV1",
"verifyCmd": "$TC qdisc show dev $DUMMY",
"matchPattern": "qdisc prio 1: root",
"matchCount": "0",
"teardown": [
"$IP link del dev $DEV1 type dummy"
"$IP link del dev $DUMMY type dummy"
]
},
{
......@@ -241,15 +241,15 @@
"prio"
],
"setup": [
"$IP link add dev $DEV1 type dummy || /bin/true"
"$IP link add dev $DUMMY type dummy || /bin/true"
],
"cmdUnderTest": "$TC qdisc add dev $DEV1 root handle 123^ prio",
"cmdUnderTest": "$TC qdisc add dev $DUMMY root handle 123^ prio",
"expExitCode": "255",
"verifyCmd": "$TC qdisc show dev $DEV1",
"verifyCmd": "$TC qdisc show dev $DUMMY",
"matchPattern": "qdisc prio 123 root",
"matchCount": "0",
"teardown": [
"$IP link del dev $DEV1 type dummy"
"$IP link del dev $DUMMY type dummy"
]
},
{
......@@ -260,17 +260,17 @@
"prio"
],
"setup": [
"$IP link add dev $DEV1 type dummy || /bin/true",
"$TC qdisc add dev $DEV1 root handle 1: prio",
"$TC qdisc del dev $DEV1 root handle 1: prio"
"$IP link add dev $DUMMY type dummy || /bin/true",
"$TC qdisc add dev $DUMMY root handle 1: prio",
"$TC qdisc del dev $DUMMY root handle 1: prio"
],
"cmdUnderTest": "$TC qdisc del dev $DEV1 handle 1: root prio",
"cmdUnderTest": "$TC qdisc del dev $DUMMY handle 1: root prio",
"expExitCode": "2",
"verifyCmd": "$TC qdisc show dev $DEV1",
"verifyCmd": "$TC qdisc show dev $DUMMY",
"matchPattern": "qdisc ingress ffff:",
"matchCount": "0",
"teardown": [
"$IP link del dev $DEV1 type dummy"
"$IP link del dev $DUMMY type dummy"
]
}
]
......@@ -16,6 +16,7 @@ NAMES = {
'DEV0': 'v0p0',
'DEV1': 'v0p1',
'DEV2': '',
'DUMMY': 'dummy1',
'BATCH_FILE': './batch.txt',
'BATCH_DIR': 'tmp',
# Length of time in seconds to wait before terminating a command
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册