diff options
author | Petr Machata <petrm@nvidia.com> | 2024-11-14 15:09:56 +0100 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2024-11-16 01:39:19 +0100 |
commit | 601d9d70a40a8ccf93f41a153dd4c9aa1db60d57 (patch) | |
tree | 0c282915c6797d875000704186183e0fc2655dff /tools/testing/selftests/net/lib.sh | |
parent | selftests: net: lib: Move logging from forwarding/lib.sh here (diff) | |
download | linux-601d9d70a40a8ccf93f41a153dd4c9aa1db60d57.tar.xz linux-601d9d70a40a8ccf93f41a153dd4c9aa1db60d57.zip |
selftests: net: lib: Move tests_run from forwarding/lib.sh here
It would be good to use the same mechanism for scheduling and dispatching
general net tests as the many forwarding tests already use. To that end,
move the logging helpers to net/lib.sh so that every net test can use them.
Existing lib.sh users might be using the name themselves. However lib.sh is
always sourced near the top of the file (checked), and whatever new
definition will simply override the one provided by lib.sh.
Signed-off-by: Petr Machata <petrm@nvidia.com>
Reviewed-by: Amit Cohen <amcohen@nvidia.com>
Acked-by: Shuah Khan <skhan@linuxfoundation.org>
Link: https://patch.msgid.link/a6fc083486493425b2c61185c327845b6ce3233a.1731589511.git.petrm@nvidia.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'tools/testing/selftests/net/lib.sh')
-rw-r--r-- | tools/testing/selftests/net/lib.sh | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tools/testing/selftests/net/lib.sh b/tools/testing/selftests/net/lib.sh index 691318b1ec55..4f52b8e48a3a 100644 --- a/tools/testing/selftests/net/lib.sh +++ b/tools/testing/selftests/net/lib.sh @@ -351,3 +351,13 @@ log_info() echo "INFO: $msg" } + +tests_run() +{ + local current_test + + for current_test in ${TESTS:-$ALL_TESTS}; do + in_defer_scope \ + $current_test + done +} |