xref: /aosp_15_r20/external/ltp/testcases/network/tcp_cc/bbr01.sh (revision 49cdfc7efb34551c7342be41a7384b9c40d7cab7)
1#!/bin/sh
2# SPDX-License-Identifier: GPL-2.0-or-later
3# Copyright (c) 2018-2020 Oracle and/or its affiliates. All Rights Reserved.
4
5TST_SETUP="setup"
6TST_TESTFUNC="do_test"
7TST_CLEANUP="cleanup"
8TST_MIN_KVER="4.13"
9
10cleanup()
11{
12	tc qdisc del dev $(tst_iface) root netem > /dev/null 2>&1
13
14	tcp_cc_cleanup
15}
16
17setup()
18{
19	tcp_cc_check_support bbr
20	tcp_cc_setup
21
22	tst_res TINFO "emulate congestion with packet loss 0.5%"
23	ROD tc qdisc add dev $(tst_iface) root netem loss 0.5%
24}
25
26do_test()
27{
28	tcp_cc_test01 bbr -100
29}
30
31. tcp_cc_lib.sh
32tst_run
33