1#!/bin/bash
2# SPDX-License-Identifier: GPL-2.0
3
4ALL_TESTS="
5	ping_ipv4
6	tbf_test
7"
8: ${lib_dir:=.}
9source $lib_dir/sch_tbf_core.sh
10
11tbf_test_one()
12{
13	local bs=$1; shift
14
15	tc qdisc replace dev $swp2 root handle 108: tbf \
16	   rate 400Mbit burst $bs limit 1M
17	do_tbf_test 10 400 $bs
18}
19
20tbf_test()
21{
22	tbf_test_one 128K
23	tc qdisc del dev $swp2 root
24}
25
26trap cleanup EXIT
27
28setup_prepare
29setup_wait
30
31tests_run
32
33exit $EXIT_STATUS
34