2 # SPDX-License-Identifier: GPL-2.0
4 # Regression tests for the SO_TXTIME interface
6 # Run in network namespace
7 if [[ $# -eq 0 ]]; then
8 if ! ./in_netns.sh $0 __subprocess; then
9 # test is time sensitive, can be flaky
10 echo "test failed: retry once"
11 ./in_netns.sh $0 __subprocess
19 tc qdisc add dev lo root fq
20 ./so_txtime -4 -6 -c mono a,-1 a,-1
21 ./so_txtime -4 -6 -c mono a,0 a,0
22 ./so_txtime -4 -6 -c mono a,10 a,10
23 ./so_txtime -4 -6 -c mono a,10,b,20 a,10,b,20
24 ./so_txtime -4 -6 -c mono a,20,b,10 b,20,a,20
26 if tc qdisc replace dev lo root etf clockid CLOCK_TAI delta 400000; then
27 ! ./so_txtime -4 -6 -c tai a,-1 a,-1
28 ! ./so_txtime -4 -6 -c tai a,0 a,0
29 ./so_txtime -4 -6 -c tai a,10 a,10
30 ./so_txtime -4 -6 -c tai a,10,b,20 a,10,b,20
31 ./so_txtime -4 -6 -c tai a,20,b,10 b,10,a,20
33 echo "tc ($(tc -V)) does not support qdisc etf. skipping"
36 echo OK. All tests passed