selftests: forwarding: Add a test for testing lib.sh functionality
authorPetr Machata <petrm@nvidia.com>
Tue, 26 Mar 2024 16:54:41 +0000 (17:54 +0100)
committerJakub Kicinski <kuba@kernel.org>
Fri, 29 Mar 2024 01:03:43 +0000 (18:03 -0700)
commit8ff2d7abfb6f7c01d7161765f4152ecf143c9448
tree988b7a58b8ac54e18f4e5d640a54eaaf423e00b3
parent6db870bbf788e0867d6462f28e8d7385694620b2
selftests: forwarding: Add a test for testing lib.sh functionality

Rerunning various scenarios to make sure lib.sh changes do not impact the
observable behavior is no fun. Add a selftest at least for the bare basics
-- the mechanics of setting RET, retmsg, and EXIT_STATUS.

Since the selftest itself uses lib.sh, it would be possible to break lib.sh
in such a way that invalidates result of the selftest. Since the metatest
only uses the bare basics (just pass/fail), hopefully such fundamental
breakages would be noticed.

Signed-off-by: Petr Machata <petrm@nvidia.com>
Link: https://lore.kernel.org/r/6d25cedbf2d4b83614944809a34fe023fbe8db38.1711464583.git.petrm@nvidia.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
tools/testing/selftests/net/forwarding/Makefile
tools/testing/selftests/net/forwarding/lib_sh_test.sh [new file with mode: 0755]