Commit 196640a6 authored by David S. Miller's avatar 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: default avatarDavid S. Miller <davem@davemloft.net>
parents 6636fb31 14b54ac4
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
"$TC qdisc add dev $DEV2 ingress", "$TC qdisc add dev $DEV2 ingress",
"./tdc_multibatch.py $DEV2 $BATCH_DIR 100000 10 add" "./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", "expExitCode": "0",
"verifyCmd": "$TC -s filter show dev $DEV2 ingress", "verifyCmd": "$TC -s filter show dev $DEV2 ingress",
"matchPattern": "filter protocol ip pref 1 flower chain 0 handle", "matchPattern": "filter protocol ip pref 1 flower chain 0 handle",
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
"$TC -b $BATCH_DIR/add_0", "$TC -b $BATCH_DIR/add_0",
"./tdc_multibatch.py $DEV2 $BATCH_DIR 100000 10 del" "./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", "expExitCode": "0",
"verifyCmd": "$TC -s filter show dev $DEV2 ingress", "verifyCmd": "$TC -s filter show dev $DEV2 ingress",
"matchPattern": "filter protocol ip pref 1 flower chain 0 handle", "matchPattern": "filter protocol ip pref 1 flower chain 0 handle",
...@@ -62,7 +62,7 @@ ...@@ -62,7 +62,7 @@
"$TC -b $BATCH_DIR/add_0", "$TC -b $BATCH_DIR/add_0",
"./tdc_multibatch.py $DEV2 $BATCH_DIR 100000 10 replace" "./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", "expExitCode": "0",
"verifyCmd": "$TC -s filter show dev $DEV2 ingress", "verifyCmd": "$TC -s filter show dev $DEV2 ingress",
"matchPattern": "filter protocol ip pref 1 flower chain 0 handle", "matchPattern": "filter protocol ip pref 1 flower chain 0 handle",
...@@ -87,7 +87,7 @@ ...@@ -87,7 +87,7 @@
"$TC -b $BATCH_DIR/add_0", "$TC -b $BATCH_DIR/add_0",
"./tdc_multibatch.py -d $DEV2 $BATCH_DIR 100000 10 replace" "./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", "expExitCode": "0",
"verifyCmd": "$TC -s filter show dev $DEV2 ingress", "verifyCmd": "$TC -s filter show dev $DEV2 ingress",
"matchPattern": "filter protocol ip pref 1 flower chain 0 handle", "matchPattern": "filter protocol ip pref 1 flower chain 0 handle",
...@@ -112,7 +112,7 @@ ...@@ -112,7 +112,7 @@
"$TC -b $BATCH_DIR/add_0", "$TC -b $BATCH_DIR/add_0",
"./tdc_multibatch.py -d $DEV2 $BATCH_DIR 100000 10 del" "./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", "expExitCode": "123",
"verifyCmd": "$TC -s filter show dev $DEV2 ingress", "verifyCmd": "$TC -s filter show dev $DEV2 ingress",
"matchPattern": "filter protocol ip pref 1 flower chain 0 handle", "matchPattern": "filter protocol ip pref 1 flower chain 0 handle",
...@@ -134,11 +134,11 @@ ...@@ -134,11 +134,11 @@
"/bin/mkdir $BATCH_DIR", "/bin/mkdir $BATCH_DIR",
"$TC qdisc add dev $DEV2 ingress", "$TC qdisc add dev $DEV2 ingress",
"./tdc_multibatch.py -x init_ $DEV2 $BATCH_DIR 100000 5 add", "./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_ -a 500001 -m 5 $DEV2 $BATCH_DIR 100000 5 add",
"./tdc_multibatch.py -x par_ $DEV2 $BATCH_DIR 100000 5 del" "./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", "expExitCode": "0",
"verifyCmd": "$TC -s filter show dev $DEV2 ingress", "verifyCmd": "$TC -s filter show dev $DEV2 ingress",
"matchPattern": "filter protocol ip pref 1 flower chain 0 handle", "matchPattern": "filter protocol ip pref 1 flower chain 0 handle",
...@@ -160,11 +160,11 @@ ...@@ -160,11 +160,11 @@
"/bin/mkdir $BATCH_DIR", "/bin/mkdir $BATCH_DIR",
"$TC qdisc add dev $DEV2 ingress", "$TC qdisc add dev $DEV2 ingress",
"./tdc_multibatch.py -x init_ $DEV2 $BATCH_DIR 100000 10 add", "./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_ -a 500001 -m 5 $DEV2 $BATCH_DIR 100000 5 replace",
"./tdc_multibatch.py -x par_ $DEV2 $BATCH_DIR 100000 5 del" "./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", "expExitCode": "0",
"verifyCmd": "$TC -s filter show dev $DEV2 ingress", "verifyCmd": "$TC -s filter show dev $DEV2 ingress",
"matchPattern": "filter protocol ip pref 1 flower chain 0 handle", "matchPattern": "filter protocol ip pref 1 flower chain 0 handle",
......
...@@ -7,16 +7,16 @@ ...@@ -7,16 +7,16 @@
"ingress" "ingress"
], ],
"setup": [ "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", "expExitCode": "0",
"verifyCmd": "$TC qdisc show dev $DEV1", "verifyCmd": "$TC qdisc show dev $DUMMY",
"matchPattern": "qdisc ingress ffff:", "matchPattern": "qdisc ingress ffff:",
"matchCount": "1", "matchCount": "1",
"teardown": [ "teardown": [
"$TC qdisc del dev $DEV1 ingress", "$TC qdisc del dev $DUMMY ingress",
"$IP link del dev $DEV1 type dummy" "$IP link del dev $DUMMY type dummy"
] ]
}, },
{ {
...@@ -27,15 +27,15 @@ ...@@ -27,15 +27,15 @@
"ingress" "ingress"
], ],
"setup": [ "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", "expExitCode": "1",
"verifyCmd": "$TC qdisc show dev $DEV1", "verifyCmd": "$TC qdisc show dev $DUMMY",
"matchPattern": "qdisc ingress ffff:", "matchPattern": "qdisc ingress ffff:",
"matchCount": "0", "matchCount": "0",
"teardown": [ "teardown": [
"$IP link del dev $DEV1 type dummy" "$IP link del dev $DUMMY type dummy"
] ]
}, },
{ {
...@@ -46,17 +46,17 @@ ...@@ -46,17 +46,17 @@
"ingress" "ingress"
], ],
"setup": [ "setup": [
"$IP link add dev $DEV1 type dummy || /bin/true", "$IP link add dev $DUMMY type dummy || /bin/true",
"$TC qdisc add dev $DEV1 ingress" "$TC qdisc add dev $DUMMY ingress"
], ],
"cmdUnderTest": "$TC qdisc add dev $DEV1 ingress", "cmdUnderTest": "$TC qdisc add dev $DUMMY ingress",
"expExitCode": "2", "expExitCode": "2",
"verifyCmd": "$TC qdisc show dev $DEV1", "verifyCmd": "$TC qdisc show dev $DUMMY",
"matchPattern": "qdisc ingress ffff:", "matchPattern": "qdisc ingress ffff:",
"matchCount": "1", "matchCount": "1",
"teardown": [ "teardown": [
"$TC qdisc del dev $DEV1 ingress", "$TC qdisc del dev $DUMMY ingress",
"$IP link del dev $DEV1 type dummy" "$IP link del dev $DUMMY type dummy"
] ]
}, },
{ {
...@@ -67,15 +67,15 @@ ...@@ -67,15 +67,15 @@
"ingress" "ingress"
], ],
"setup": [ "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", "expExitCode": "2",
"verifyCmd": "$TC qdisc show dev $DEV1", "verifyCmd": "$TC qdisc show dev $DUMMY",
"matchPattern": "qdisc ingress ffff:", "matchPattern": "qdisc ingress ffff:",
"matchCount": "0", "matchCount": "0",
"teardown": [ "teardown": [
"$IP link del dev $DEV1 type dummy" "$IP link del dev $DUMMY type dummy"
] ]
}, },
{ {
...@@ -86,17 +86,17 @@ ...@@ -86,17 +86,17 @@
"ingress" "ingress"
], ],
"setup": [ "setup": [
"$IP link add dev $DEV1 type dummy || /bin/true", "$IP link add dev $DUMMY type dummy || /bin/true",
"$TC qdisc add dev $DEV1 ingress", "$TC qdisc add dev $DUMMY ingress",
"$TC qdisc del dev $DEV1 ingress" "$TC qdisc del dev $DUMMY ingress"
], ],
"cmdUnderTest": "$TC qdisc del dev $DEV1 ingress", "cmdUnderTest": "$TC qdisc del dev $DUMMY ingress",
"expExitCode": "2", "expExitCode": "2",
"verifyCmd": "$TC qdisc show dev $DEV1", "verifyCmd": "$TC qdisc show dev $DUMMY",
"matchPattern": "qdisc ingress ffff:", "matchPattern": "qdisc ingress ffff:",
"matchCount": "0", "matchCount": "0",
"teardown": [ "teardown": [
"$IP link del dev $DEV1 type dummy" "$IP link del dev $DUMMY type dummy"
] ]
} }
] ]
...@@ -16,6 +16,7 @@ NAMES = { ...@@ -16,6 +16,7 @@ NAMES = {
'DEV0': 'v0p0', 'DEV0': 'v0p0',
'DEV1': 'v0p1', 'DEV1': 'v0p1',
'DEV2': '', 'DEV2': '',
'DUMMY': 'dummy1',
'BATCH_FILE': './batch.txt', 'BATCH_FILE': './batch.txt',
'BATCH_DIR': 'tmp', 'BATCH_DIR': 'tmp',
# Length of time in seconds to wait before terminating a command # Length of time in seconds to wait before terminating a command
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment