kselftest: bonding: dev_addr_lists.sh doesn't run due to lack of dependencies
Subsystems (4)
When kselftest for bonding is built like:
$ make TARGETS="drivers/net/bonding" -j8 -C tools/testing/selftests gen_tar
and then run on the target:
$ ./run_kselftest.sh [...] # selftests: drivers/net/bonding: dev_addr_lists.sh # ./dev_addr_lists.sh: line 17: ./../../../net/forwarding/lib.sh: No such file or directory # ./dev_addr_lists.sh: line 107: tests_run: command not found # ./dev_addr_lists.sh: line 109: exit: : numeric argument required # ./dev_addr_lists.sh: line 34: pre_cleanup: command not found not ok 4 selftests: drivers/net/bonding: dev_addr_lists.sh # exit=2 [...]
I am still new to kselftests is this expected or is there some way in the make machinery to force packaging of net as well?
Thanks,
-Jon
Quoted 15 lines · Jonathan Toppins
When kselftest for bonding is built like:
$ make TARGETS="drivers/net/bonding" -j8 -C tools/testing/selftests gen_tarand then run on the target:
$ ./run_kselftest.sh [...] # selftests: drivers/net/bonding: dev_addr_lists.sh # ./dev_addr_lists.sh: line 17: ./../../../net/forwarding/lib.sh: No such file or directory # ./dev_addr_lists.sh: line 107: tests_run: command not found # ./dev_addr_lists.sh: line 109: exit: : numeric argument required # ./dev_addr_lists.sh: line 34: pre_cleanup: command not found not ok 4 selftests: drivers/net/bonding: dev_addr_lists.sh # exit=2 [...]
Quoted 3 lines
I am still new to kselftests is this expected or is there some way in the make machinery to force packaging of net as well?
Arg, I didn't know that you could export just a part of the selftest tree. Thanks for the report.
I'm traveling for a few days. I'll look into how to fix the inclusion problem when I get back on October 19th.
In the meantime, if you just want to run the bonding tests you can do:
(in tree)
make -C tools/testing/selftests run_tests TARGETS="drivers/net/bonding"
or
(exported)
make -C tools/testing/selftests gen_tar
[... extract archive ...]
./run_kselftest.sh -c drivers/net/bonding
It seems like a plausible fix might be to use symlinks, what do you think?
tools/testing/selftests/drivers/net/bonding/Makefile +3 -1
@@ -7,6 +7,8 @@ TEST_PROGS := \ bond-lladdr-target.sh \ dev_addr_lists.sh -TEST_FILES := lag_lib.sh +TEST_FILES := \ + lag_lib.sh \ + lib.sh include ../../../lib.mk
tools/testing/selftests/drivers/net/bonding/dev_addr_lists.sh +1 -1
@@ -14,7 +14,7 @@ ALL_TESTS=" REQUIRE_MZ=no NUM_NETIFS=0 lib_dir=$(dirname "$0") -source "$lib_dir"/../../../net/forwarding/lib.sh +source "$lib_dir"/lib.sh source "$lib_dir"/lag_lib.sh
tools/testing/selftests/drivers/net/bonding/lib.sh new file +1 -0
@@ -0,0 +1 @@ +../../../net/forwarding/lib.sh
tools/testing/selftests/lib.mk +1 -1
@@ -84,7 +84,7 @@ endif define INSTALL_SINGLE_RULE $(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 define INSTALL_RULE
Quoted 33 lines · Benjamin Poirier
Quoted 15 lines · Jonathan Toppins
When kselftest for bonding is built like:
$ make TARGETS="drivers/net/bonding" -j8 -C tools/testing/selftests gen_tarand then run on the target:
$ ./run_kselftest.sh [...] # selftests: drivers/net/bonding: dev_addr_lists.sh # ./dev_addr_lists.sh: line 17: ./../../../net/forwarding/lib.sh: No such file or directory # ./dev_addr_lists.sh: line 107: tests_run: command not found # ./dev_addr_lists.sh: line 109: exit: : numeric argument required # ./dev_addr_lists.sh: line 34: pre_cleanup: command not found not ok 4 selftests: drivers/net/bonding: dev_addr_lists.sh # exit=2 [...]Quoted 3 lines
I am still new to kselftests is this expected or is there some way in the make machinery to force packaging of net as well?
Arg, I didn't know that you could export just a part of the selftest tree. Thanks for the report.
I'm traveling for a few days. I'll look into how to fix the inclusion problem when I get back on October 19th.
In the meantime, if you just want to run the bonding tests you can do:
(in tree)
make -Ctools/testing/selftestsrun_testsTARGETS="drivers/net/bonding"or
Quoted 8 lines
(exported)
make -Ctools/testing/selftestsgen_tar
[... extract archive ...]
./run_kselftest.sh -cdrivers/net/bondingIt seems like a plausible fix might be to use symlinks, what do you think?
This looks good to me. I might rename lib.sh to net_lib.sh but that is just a nit.
-Jon
Quoted 50 lines
tools/testing/selftests/drivers/net/bonding/Makefile +3
-1@@ -7,6 +7,8 @@ TEST_PROGS := \ bond-lladdr-target.sh \ dev_addr_lists.sh -TEST_FILES := lag_lib.sh +TEST_FILES := \ + lag_lib.sh \ + lib.sh include ../../../lib.mktools/testing/selftests/drivers/net/bonding/dev_addr_lists.sh +1
-1@@ -14,7 +14,7 @@ ALL_TESTS=" REQUIRE_MZ=no NUM_NETIFS=0 lib_dir=$(dirname "$0") -source "$lib_dir"/../../../net/forwarding/lib.sh +source "$lib_dir"/lib.sh source "$lib_dir"/lag_lib.shtools/testing/selftests/drivers/net/bonding/lib.sh new file +1
-0@@ -0,0 +1 @@ +../../../net/forwarding/lib.shtools/testing/selftests/lib.mk +1
-1@@ -84,7 +84,7 @@ endif define INSTALL_SINGLE_RULE $(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 define INSTALL_RULE