mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-24 12:44:11 +08:00
selftests: forwarding: devlink_lib: Avoid double sourcing of lib.sh
Don't source lib.sh twice and make the script work with ifnames passed on the command line. Signed-off-by: Petr Machata <petrm@mellanox.com> Signed-off-by: Ido Schimmel <idosch@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
2fcbc0b15e
commit
2cca8751af
@ -12,6 +12,7 @@ ALL_TESTS="single_mask_test identical_filters_test two_masks_test \
|
||||
delta_two_masks_one_key_test delta_simple_rehash_test \
|
||||
bloom_simple_test bloom_complex_test bloom_delta_test"
|
||||
NUM_NETIFS=2
|
||||
source $lib_dir/lib.sh
|
||||
source $lib_dir/tc_common.sh
|
||||
source $lib_dir/devlink_lib.sh
|
||||
|
||||
|
@ -1,7 +1,10 @@
|
||||
#!/bin/bash
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
|
||||
lib_dir=$(dirname $0)/../../../../net/forwarding
|
||||
|
||||
NUM_NETIFS=1
|
||||
source $lib_dir/lib.sh
|
||||
source devlink_lib_spectrum.sh
|
||||
|
||||
setup_prepare()
|
||||
|
@ -1,8 +1,11 @@
|
||||
#!/bin/bash
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
|
||||
lib_dir=$(dirname $0)/../../../../net/forwarding
|
||||
|
||||
NUM_NETIFS=6
|
||||
source ../../../../net/forwarding/tc_common.sh
|
||||
source $lib_dir/lib.sh
|
||||
source $lib_dir/tc_common.sh
|
||||
source devlink_lib_spectrum.sh
|
||||
|
||||
current_test=""
|
||||
|
@ -1,16 +1,6 @@
|
||||
#!/bin/bash
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
|
||||
##############################################################################
|
||||
# Source library
|
||||
|
||||
relative_path="${BASH_SOURCE%/*}"
|
||||
if [[ "$relative_path" == "${BASH_SOURCE}" ]]; then
|
||||
relative_path="."
|
||||
fi
|
||||
|
||||
source "$relative_path/lib.sh"
|
||||
|
||||
##############################################################################
|
||||
# Defines
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user