2 # SPDX-License-Identifier: GPL-2.0
4 lib_dir
=$
(dirname $0)/..
/..
/..
/..
/net
/forwarding
8 source $lib_dir/tc_common.sh
9 source devlink_lib_spectrum.sh
16 if [ ! -z $current_test ]; then
17 ${current_test}_cleanup
19 devlink_sp_size_kvd_to_default
22 devlink_sp_read_kvd_defaults
25 ALL_TESTS
="router tc_flower mirror_gre tc_police port"
26 for current_test
in ${TESTS:-$ALL_TESTS}; do
28 source ${current_test}_scale.sh
30 num_netifs_var
=${current_test^^}_NUM_NETIFS
31 num_netifs
=${!num_netifs_var:-$NUM_NETIFS}
33 for profile
in $KVD_PROFILES; do
35 devlink_sp_resource_kvd_profile_set
$profile
36 if [[ $RET -gt 0 ]]; then
37 log_test
"'$current_test' [$profile] setting"
41 for should_fail
in 0 1; do
43 target
=$
(${current_test}_get_target
"$should_fail")
44 ${current_test}_setup_prepare
45 setup_wait
$num_netifs
46 ${current_test}_test
"$target" "$should_fail"
47 ${current_test}_cleanup
48 if [[ "$should_fail" -eq 0 ]]; then
49 log_test
"'$current_test' [$profile] $target"
51 log_test
"'$current_test' [$profile] overflow $target"
54 RET_FIN
=$
(( RET_FIN || RET
))