From: Benjamin Poirier <bpoirier@nvidia.com>
To: netdev@vger.kernel.org
Cc: Shuah Khan <shuah@kernel.org>, Petr Machata <petrm@nvidia.com>,
Hangbin Liu <liuhangbin@gmail.com>,
Vladimir Oltean <vladimir.oltean@nxp.com>
Subject: [RFC PATCH net-next 08/10] selftests: team: Add lib.sh scripts to TEST_INCLUDES
Date: Fri, 22 Dec 2023 08:58:34 -0500 [thread overview]
Message-ID: <20231222135836.992841-9-bpoirier@nvidia.com> (raw)
In-Reply-To: <20231222135836.992841-1-bpoirier@nvidia.com>
Since commit 25ae948b4478 ("selftests/net: add lib.sh"), when exporting the
team test and running it, the test fails to import net/lib.sh. This prints
an error message but since the test does not use functions from net/lib.sh,
this does not affect the test result.
Example:
# make install TARGETS="drivers/net/team"
# kselftest_install/run_kselftest.sh
TAP version 13
1..1
# timeout set to 45
# selftests: drivers/net/team: dev_addr_lists.sh
# ./net_forwarding_lib.sh: line 38: /src/linux/tools/testing/selftests/kselftest_install/drivers/net/team/../lib.sh:
No such file or directory
# This program is not intended to be run as root.
# TEST: team cleanup mode lacp [ OK ]
ok 1 selftests: drivers/net/team: dev_addr_lists.sh
In order to avoid the error message, net/forwarding/lib.sh is exported and
included via its relative path and net/lib.sh is also exported.
Fixes: 25ae948b4478 ("selftests/net: add lib.sh")
Signed-off-by: Benjamin Poirier <bpoirier@nvidia.com>
---
tools/testing/selftests/drivers/net/team/Makefile | 5 ++++-
tools/testing/selftests/drivers/net/team/dev_addr_lists.sh | 2 +-
.../testing/selftests/drivers/net/team/net_forwarding_lib.sh | 1 -
3 files changed, 5 insertions(+), 3 deletions(-)
delete mode 120000 tools/testing/selftests/drivers/net/team/net_forwarding_lib.sh
diff --git a/tools/testing/selftests/drivers/net/team/Makefile b/tools/testing/selftests/drivers/net/team/Makefile
index 6a86e61e8bfe..d31af127ca29 100644
--- a/tools/testing/selftests/drivers/net/team/Makefile
+++ b/tools/testing/selftests/drivers/net/team/Makefile
@@ -5,6 +5,9 @@ TEST_PROGS := dev_addr_lists.sh
TEST_FILES := \
lag_lib.sh \
- net_forwarding_lib.sh
+
+TEST_INCLUDES := \
+ net/forwarding/lib.sh \
+ net/lib.sh
include ../../../lib.mk
diff --git a/tools/testing/selftests/drivers/net/team/dev_addr_lists.sh b/tools/testing/selftests/drivers/net/team/dev_addr_lists.sh
index 33913112d5ca..bea2565486f7 100755
--- a/tools/testing/selftests/drivers/net/team/dev_addr_lists.sh
+++ b/tools/testing/selftests/drivers/net/team/dev_addr_lists.sh
@@ -11,7 +11,7 @@ ALL_TESTS="
REQUIRE_MZ=no
NUM_NETIFS=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
diff --git a/tools/testing/selftests/drivers/net/team/net_forwarding_lib.sh b/tools/testing/selftests/drivers/net/team/net_forwarding_lib.sh
deleted file mode 120000
index 39c96828c5ef..000000000000
--- a/tools/testing/selftests/drivers/net/team/net_forwarding_lib.sh
+++ /dev/null
@@ -1 +0,0 @@
-../../../net/forwarding/lib.sh
\ No newline at end of file
--
2.43.0
next prev parent reply other threads:[~2023-12-22 14:00 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-22 13:58 [RFC PATCH net-next 00/10] selftests: Add TEST_INCLUDES directive and adjust tests to use it Benjamin Poirier
2023-12-22 13:58 ` [RFC PATCH net-next 01/10] selftests: bonding: Change script interpreter Benjamin Poirier
2023-12-22 13:58 ` [RFC PATCH net-next 02/10] selftests: forwarding: Remove executable bits from lib.sh Benjamin Poirier
2023-12-27 19:24 ` Vladimir Oltean
2023-12-22 13:58 ` [RFC PATCH net-next 03/10] selftests: forwarding: Import top-level lib.sh through absolute path Benjamin Poirier
2023-12-22 13:58 ` [RFC PATCH net-next 04/10] selftests: forwarding: Simplify forwarding.config import logic Benjamin Poirier
2023-12-27 19:27 ` Vladimir Oltean
2023-12-28 19:07 ` Benjamin Poirier
2023-12-22 13:58 ` [RFC PATCH net-next 05/10] selftests: Introduce Makefile variable to list shared bash scripts Benjamin Poirier
2023-12-27 19:43 ` Vladimir Oltean
2023-12-27 19:47 ` Vladimir Oltean
2023-12-28 19:28 ` Benjamin Poirier
2023-12-28 20:38 ` Vladimir Oltean
2023-12-22 13:58 ` [RFC PATCH net-next 06/10] selftests: forwarding: Add net/lib.sh to TEST_INCLUDES Benjamin Poirier
2023-12-22 13:58 ` [RFC PATCH net-next 07/10] selftests: bonding: Add lib.sh scripts " Benjamin Poirier
2023-12-22 13:58 ` Benjamin Poirier [this message]
2023-12-22 13:58 ` [RFC PATCH net-next 09/10] selftests: team: Add shared library script " Benjamin Poirier
2023-12-22 13:58 ` [RFC PATCH net-next 10/10] selftests: dsa: Replace symlinks by wrapper script Benjamin Poirier
2023-12-27 20:11 ` Vladimir Oltean
2023-12-28 19:36 ` Benjamin Poirier
2023-12-28 20:33 ` Vladimir Oltean
2023-12-23 9:27 ` [RFC PATCH net-next 00/10] selftests: Add TEST_INCLUDES directive and adjust tests to use it Hangbin Liu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20231222135836.992841-9-bpoirier@nvidia.com \
--to=bpoirier@nvidia.com \
--cc=liuhangbin@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=petrm@nvidia.com \
--cc=shuah@kernel.org \
--cc=vladimir.oltean@nxp.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox