netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next v2 0/6] selftests: Add TEST_INCLUDES directive and adjust tests to use it
@ 2024-01-26 23:21 Benjamin Poirier
  2024-01-26 23:21 ` [PATCH net-next v2 1/6] selftests: Introduce Makefile variable to list shared bash scripts Benjamin Poirier
                   ` (6 more replies)
  0 siblings, 7 replies; 9+ messages in thread
From: Benjamin Poirier @ 2024-01-26 23:21 UTC (permalink / raw)
  To: netdev
  Cc: Shuah Khan, Jonathan Corbet, Jay Vosburgh, Andy Gospodarek,
	Andrew Lunn, Florian Fainelli, Vladimir Oltean, Jiri Pirko,
	David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	Petr Machata, Danielle Ratson, Nikolay Aleksandrov, Ido Schimmel,
	Johannes Nixdorf, Davide Caratti, Tobias Waldekranz,
	Zahari Doychev, Hangbin Liu, linux-kselftest, linux-doc

After commit 25ae948b4478 ("selftests/net: add lib.sh") but before commit
2114e83381d3 ("selftests: forwarding: Avoid failures to source
net/lib.sh"), some net selftests encountered errors when they were being
exported and run. This was because the new net/lib.sh was not exported
along with the tests. The errors were crudely avoided by duplicating some
content between net/lib.sh and net/forwarding/lib.sh in 2114e83381d3.

In order to restore the sourcing of net/lib.sh from net/forwarding/lib.sh
and remove the duplicated content, this series introduces a new selftests
Makefile variable to list extra files to export from other directories and
makes use of it to avoid reintroducing the errors mentioned above.

v2:
* "selftests: Introduce Makefile variable to list shared bash scripts"
Fix rst syntax in Documentation/dev-tools/kselftest.rst (Jakub Kicinski)

v1:
* "selftests: Introduce Makefile variable to list shared bash scripts"
Changed TEST_INCLUDES to take relative paths, like other TEST_* variables.
Paths are adjusted accordingly in the subsequent patches. (Vladimir Oltean)

* selftests: bonding: Change script interpreter
  selftests: forwarding: Remove executable bits from lib.sh
Removed from this series, submitted separately.

Since commit 2114e83381d3 ("selftests: forwarding: Avoid failures to source
net/lib.sh") resolved the test errors, this version of the series is
focused on removing the duplication that was added in that commit. Directly
rebasing the series would reintroduce the problems that 2114e83381d3
avoided before fixing them again. In order to prevent such breakage partway
through the series, patches are reordered and content changed slightly but
there is no diff at the end compared with the simple rebasing approach. I
have dropped most review tags on account of this reordering.

RFC:
https://lore.kernel.org/netdev/20231222135836.992841-1-bpoirier@nvidia.com/

Link: https://lore.kernel.org/netdev/ZXu7dGj7F9Ng8iIX@Laptop-X1/

Benjamin Poirier (5):
  selftests: Introduce Makefile variable to list shared bash scripts
  selftests: bonding: Add net/forwarding/lib.sh to TEST_INCLUDES
  selftests: team: Add shared library scripts to TEST_INCLUDES
  selftests: dsa: Replace test symlinks by wrapper script
  selftests: forwarding: Redefine relative_path variable

Petr Machata (1):
  selftests: forwarding: Remove duplicated lib.sh content

 Documentation/dev-tools/kselftest.rst         | 12 ++++++
 tools/testing/selftests/Makefile              |  7 +++-
 .../selftests/drivers/net/bonding/Makefile    |  7 +++-
 .../net/bonding/bond-eth-type-change.sh       |  2 +-
 .../drivers/net/bonding/bond_topo_2d1c.sh     |  2 +-
 .../drivers/net/bonding/dev_addr_lists.sh     |  2 +-
 .../net/bonding/mode-1-recovery-updelay.sh    |  2 +-
 .../net/bonding/mode-2-recovery-updelay.sh    |  2 +-
 .../drivers/net/bonding/net_forwarding_lib.sh |  1 -
 .../selftests/drivers/net/dsa/Makefile        | 18 ++++++++-
 .../drivers/net/dsa/bridge_locked_port.sh     |  2 +-
 .../selftests/drivers/net/dsa/bridge_mdb.sh   |  2 +-
 .../selftests/drivers/net/dsa/bridge_mld.sh   |  2 +-
 .../drivers/net/dsa/bridge_vlan_aware.sh      |  2 +-
 .../drivers/net/dsa/bridge_vlan_mcast.sh      |  2 +-
 .../drivers/net/dsa/bridge_vlan_unaware.sh    |  2 +-
 .../testing/selftests/drivers/net/dsa/lib.sh  |  1 -
 .../drivers/net/dsa/local_termination.sh      |  2 +-
 .../drivers/net/dsa/no_forwarding.sh          |  2 +-
 .../net/dsa/run_net_forwarding_test.sh        |  9 +++++
 .../selftests/drivers/net/dsa/tc_actions.sh   |  2 +-
 .../selftests/drivers/net/dsa/tc_common.sh    |  1 -
 .../drivers/net/dsa/test_bridge_fdb_stress.sh |  2 +-
 .../selftests/drivers/net/team/Makefile       |  7 ++--
 .../drivers/net/team/dev_addr_lists.sh        |  4 +-
 .../selftests/drivers/net/team/lag_lib.sh     |  1 -
 .../drivers/net/team/net_forwarding_lib.sh    |  1 -
 tools/testing/selftests/lib.mk                | 19 ++++++++++
 .../testing/selftests/net/forwarding/Makefile |  3 ++
 tools/testing/selftests/net/forwarding/lib.sh | 37 +++----------------
 .../net/forwarding/mirror_gre_lib.sh          |  2 +-
 .../net/forwarding/mirror_gre_topo_lib.sh     |  2 +-
 32 files changed, 98 insertions(+), 64 deletions(-)
 delete mode 120000 tools/testing/selftests/drivers/net/bonding/net_forwarding_lib.sh
 delete mode 120000 tools/testing/selftests/drivers/net/dsa/lib.sh
 create mode 100755 tools/testing/selftests/drivers/net/dsa/run_net_forwarding_test.sh
 delete mode 120000 tools/testing/selftests/drivers/net/dsa/tc_common.sh
 delete mode 120000 tools/testing/selftests/drivers/net/team/lag_lib.sh
 delete mode 120000 tools/testing/selftests/drivers/net/team/net_forwarding_lib.sh

-- 
2.43.0


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2024-01-31 11:00 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-26 23:21 [PATCH net-next v2 0/6] selftests: Add TEST_INCLUDES directive and adjust tests to use it Benjamin Poirier
2024-01-26 23:21 ` [PATCH net-next v2 1/6] selftests: Introduce Makefile variable to list shared bash scripts Benjamin Poirier
2024-01-26 23:21 ` [PATCH net-next v2 2/6] selftests: bonding: Add net/forwarding/lib.sh to TEST_INCLUDES Benjamin Poirier
2024-01-27  0:28   ` Jay Vosburgh
2024-01-26 23:21 ` [PATCH net-next v2 3/6] selftests: team: Add shared library scripts " Benjamin Poirier
2024-01-26 23:21 ` [PATCH net-next v2 4/6] selftests: dsa: Replace test symlinks by wrapper script Benjamin Poirier
2024-01-26 23:21 ` [PATCH net-next v2 5/6] selftests: forwarding: Redefine relative_path variable Benjamin Poirier
2024-01-26 23:21 ` [PATCH net-next v2 6/6] selftests: forwarding: Remove duplicated lib.sh content Benjamin Poirier
2024-01-31 11:00 ` [PATCH net-next v2 0/6] selftests: Add TEST_INCLUDES directive and adjust tests to use it patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).