Commit 4a7a8304 authored by Jakub Kicinski's avatar Jakub Kicinski

Merge branch 'selftests-net-fix-problems-in-some-drivers-net-tests'

Benjamin Poirier says:

====================
selftests: net: Fix problems in some drivers/net tests

Fix two problems mostly introduced in commit bbb774d9 ("net: Add tests
for bonding and team address list management").
====================

Link: https://lore.kernel.org/r/20221019091042.783786-1-bpoirier@nvidia.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parents f8c1c66b b2c0921b
...@@ -7,6 +7,8 @@ TEST_PROGS := \ ...@@ -7,6 +7,8 @@ TEST_PROGS := \
bond-lladdr-target.sh \ bond-lladdr-target.sh \
dev_addr_lists.sh dev_addr_lists.sh
TEST_FILES := lag_lib.sh TEST_FILES := \
lag_lib.sh \
net_forwarding_lib.sh
include ../../../lib.mk include ../../../lib.mk
...@@ -14,7 +14,7 @@ ALL_TESTS=" ...@@ -14,7 +14,7 @@ ALL_TESTS="
REQUIRE_MZ=no REQUIRE_MZ=no
NUM_NETIFS=0 NUM_NETIFS=0
lib_dir=$(dirname "$0") lib_dir=$(dirname "$0")
source "$lib_dir"/../../../net/forwarding/lib.sh source "$lib_dir"/net_forwarding_lib.sh
source "$lib_dir"/lag_lib.sh source "$lib_dir"/lag_lib.sh
......
../../../net/forwarding/lib.sh
\ No newline at end of file
...@@ -18,8 +18,8 @@ NUM_NETIFS=1 ...@@ -18,8 +18,8 @@ NUM_NETIFS=1
REQUIRE_JQ="no" REQUIRE_JQ="no"
REQUIRE_MZ="no" REQUIRE_MZ="no"
NETIF_CREATE="no" NETIF_CREATE="no"
lib_dir=$(dirname $0)/../../../net/forwarding lib_dir=$(dirname "$0")
source $lib_dir/lib.sh source "$lib_dir"/lib.sh
cleanup() { cleanup() {
echo "Cleaning up" echo "Cleaning up"
......
...@@ -3,4 +3,8 @@ ...@@ -3,4 +3,8 @@
TEST_PROGS := dev_addr_lists.sh TEST_PROGS := dev_addr_lists.sh
TEST_FILES := \
lag_lib.sh \
net_forwarding_lib.sh
include ../../../lib.mk include ../../../lib.mk
...@@ -11,14 +11,14 @@ ALL_TESTS=" ...@@ -11,14 +11,14 @@ ALL_TESTS="
REQUIRE_MZ=no REQUIRE_MZ=no
NUM_NETIFS=0 NUM_NETIFS=0
lib_dir=$(dirname "$0") lib_dir=$(dirname "$0")
source "$lib_dir"/../../../net/forwarding/lib.sh source "$lib_dir"/net_forwarding_lib.sh
source "$lib_dir"/../bonding/lag_lib.sh source "$lib_dir"/lag_lib.sh
destroy() destroy()
{ {
local ifnames=(dummy0 dummy1 team0 mv0) local ifnames=(dummy1 dummy2 team0 mv0)
local ifname local ifname
for ifname in "${ifnames[@]}"; do for ifname in "${ifnames[@]}"; do
......
../bonding/lag_lib.sh
\ No newline at end of file
../../../net/forwarding/lib.sh
\ No newline at end of file
...@@ -70,7 +70,7 @@ endef ...@@ -70,7 +70,7 @@ endef
run_tests: all run_tests: all
ifdef building_out_of_srctree ifdef building_out_of_srctree
@if [ "X$(TEST_PROGS)$(TEST_PROGS_EXTENDED)$(TEST_FILES)" != "X" ]; then \ @if [ "X$(TEST_PROGS)$(TEST_PROGS_EXTENDED)$(TEST_FILES)" != "X" ]; then \
rsync -aq $(TEST_PROGS) $(TEST_PROGS_EXTENDED) $(TEST_FILES) $(OUTPUT); \ rsync -aLq $(TEST_PROGS) $(TEST_PROGS_EXTENDED) $(TEST_FILES) $(OUTPUT); \
fi fi
@if [ "X$(TEST_PROGS)" != "X" ]; then \ @if [ "X$(TEST_PROGS)" != "X" ]; then \
$(call RUN_TESTS, $(TEST_GEN_PROGS) $(TEST_CUSTOM_PROGS) \ $(call RUN_TESTS, $(TEST_GEN_PROGS) $(TEST_CUSTOM_PROGS) \
...@@ -84,7 +84,7 @@ endif ...@@ -84,7 +84,7 @@ endif
define INSTALL_SINGLE_RULE define INSTALL_SINGLE_RULE
$(if $(INSTALL_LIST),@mkdir -p $(INSTALL_PATH)) $(if $(INSTALL_LIST),@mkdir -p $(INSTALL_PATH))
$(if $(INSTALL_LIST),rsync -a $(INSTALL_LIST) $(INSTALL_PATH)/) $(if $(INSTALL_LIST),rsync -aL $(INSTALL_LIST) $(INSTALL_PATH)/)
endef endef
define INSTALL_RULE define INSTALL_RULE
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment