Skip to content

Commit

Permalink
selftests: net: include lib/sh/*.sh with lib.sh
Browse files Browse the repository at this point in the history
Recently, the net/lib.sh file has been modified to include defer.sh from
net/lib/sh/ directory. The Makefile from net/lib has been modified
accordingly, but not the ones from the sub-targets using net/lib.sh.

Because of that, the new file is not installed as expected when
installing the Forwarding, MPTCP, and Netfilter targets, e.g.

  # make -C tools/testing/selftests TARGETS=net/mptcp install \
        INSTALL_PATH=/tmp/kself
  # cd /tmp/kself/
  # ./run_kselftest.sh -c net/mptcp
    TAP version 13
    1..7
    # timeout set to 1800
    # selftests: net/mptcp: mptcp_connect.sh
    # ./../lib.sh: line 5: /tmp/kself/net/lib/sh/defer.sh: No such file
      or directory
    # (...)

This can be fixed simply by adding all the .sh files from net/lib/sh
directory to the TEST_INCLUDES variable in the different Makefile's.

Fixes: a6e263f ("selftests: net: lib: Introduce deferred commands")
Signed-off-by: Matthieu Baerts (NGI0) <[email protected]>
Message-Id: <20241104-net-next-selftests-lib-sh-deps-v1-1-7c9f7d939fc2@kernel.org>
  • Loading branch information
matttbe authored and Patchew Applier committed Nov 4, 2024
1 parent 429458b commit a7323a4
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion tools/testing/selftests/net/forwarding/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ TEST_FILES := devlink_lib.sh \
tc_common.sh

TEST_INCLUDES := \
../lib.sh
../lib.sh \
$(wildcard ../lib/sh/*.sh)

include ../../lib.mk
2 changes: 1 addition & 1 deletion tools/testing/selftests/net/mptcp/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ TEST_GEN_FILES = mptcp_connect pm_nl_ctl mptcp_sockopt mptcp_inq

TEST_FILES := mptcp_lib.sh settings

TEST_INCLUDES := ../lib.sh ../net_helper.sh
TEST_INCLUDES := ../lib.sh $(wildcard ../lib/sh/*.sh) ../net_helper.sh

EXTRA_CLEAN := *.pcap

Expand Down
3 changes: 2 additions & 1 deletion tools/testing/selftests/net/netfilter/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,5 @@ TEST_FILES := lib.sh
TEST_FILES += packetdrill

TEST_INCLUDES := \
../lib.sh
../lib.sh \
$(wildcard ../lib/sh/*.sh)

0 comments on commit a7323a4

Please sign in to comment.