diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-04 14:18:53 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-04 14:18:53 +0000 |
commit | a0e0018c9a7ef5ce7f6d2c3ae16aecbbd16a8f67 (patch) | |
tree | 8feaf1a1932871b139b3b30be4c09c66489918be /testsuite/tests/tc/batch.t | |
parent | Initial commit. (diff) | |
download | iproute2-upstream/6.1.0.tar.xz iproute2-upstream/6.1.0.zip |
Adding upstream version 6.1.0.upstream/6.1.0upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rwxr-xr-x | testsuite/tests/tc/batch.t | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/testsuite/tests/tc/batch.t b/testsuite/tests/tc/batch.t new file mode 100755 index 0000000..50e7ba3 --- /dev/null +++ b/testsuite/tests/tc/batch.t @@ -0,0 +1,23 @@ +#!/bin/sh +. lib/generic.sh + +DEV="$(rand_dev)" +ts_ip "$0" "Add $DEV dummy interface" link add dev $DEV type dummy +ts_ip "$0" "Enable $DEV" link set $DEV up +ts_tc "$0" "Add ingress qdisc" qdisc add dev $DEV clsact + +TMP="$(mktemp)" +echo filt add dev $DEV ingress pref 1000 matchall action pass >> "$TMP" +echo filt add dev $DEV ingress pref 1000 matchall action pass >> "$TMP" + +"$TC" -b "$TMP" 2> $STD_ERR > $STD_OUT +if [ $? -eq 0 ]; then + ts_err "$0: batch passed when it should have failed" +elif [ ! -s $STD_ERR ]; then + ts_err "$0: batch produced no error message" +else + echo "$0: batch failed, as expected" +fi + +rm "$TMP" +ts_ip "$0" "Del $DEV dummy interface" link del dev $DEV |