diff options
author | Petr Machata <[email protected]> | 2024-06-27 16:48:40 +0200 |
---|---|---|
committer | David S. Miller <[email protected]> | 2024-06-28 10:55:36 +0100 |
commit | 9b5d5f272654ca4b97f39b6ef809e4edef794fdc (patch) | |
tree | 5851b675bc976fa619e000f1e8b22c2aefa7d13c | |
parent | 28e67746b73da72f57609c7250d514051e787e65 (diff) |
selftests: lib: tc_rule_stats_get(): Move default to argument definition
The argument $dir has a fallback value of "ingress". Move the fallback from
the usage site to the argument definition block to make the fact clearer.
Signed-off-by: Petr Machata <[email protected]>
Reviewed-by: Danielle Ratson <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
-rw-r--r-- | tools/testing/selftests/net/lib.sh | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/testing/selftests/net/lib.sh b/tools/testing/selftests/net/lib.sh index 915f319bcc8b..d0219032f773 100644 --- a/tools/testing/selftests/net/lib.sh +++ b/tools/testing/selftests/net/lib.sh @@ -199,10 +199,10 @@ tc_rule_stats_get() { local dev=$1; shift local pref=$1; shift - local dir=$1; shift + local dir=${1:-ingress}; shift local selector=${1:-.packets}; shift - tc -j -s filter show dev $dev ${dir:-ingress} pref $pref \ + tc -j -s filter show dev $dev $dir pref $pref \ | jq ".[1].options.actions[].stats$selector" } |