Skip to content

Commit 7f46615

Browse files
pmachataPaolo Abeni
authored andcommitted
selftests: RED: Use defer for test cleanup
Instead of having a suite of dedicated cleanup functions, use the defer framework to schedule cleanups right as their setup functions are run. The sleep after stop_traffic() in mlxsw selftests is necessary, but scheduling it as "defer sleep; defer stop_traffic" is silly. Instead, add a local helper to stop traffic and sleep afterwards. Signed-off-by: Petr Machata <petrm@nvidia.com> Signed-off-by: Paolo Abeni <pabeni@redhat.com>
1 parent 0e07d5d commit 7f46615

File tree

4 files changed

+149
-181
lines changed

4 files changed

+149
-181
lines changed

0 commit comments

Comments
 (0)