diff options
author | Paolo Abeni <pabeni@redhat.com> | 2024-10-22 13:41:07 +0200 |
---|---|---|
committer | Paolo Abeni <pabeni@redhat.com> | 2024-10-22 13:41:07 +0200 |
commit | 66ffef35680be5595a7817b97b534626dd0dceb2 (patch) | |
tree | c2548d4896c4c375f8594f13e54c9bed13da3a7e /drivers/net/netconsole.c | |
parent | c797cb9c09882195d58989a40cc7d42c9c033a3b (diff) | |
parent | cebd281f3c753dcbd48b455bdbc6549889196aa0 (diff) |
Merge branch 'selftests-net-introduce-deferred-commands'
Petr Machata says:
====================
selftests: net: Introduce deferred commands
Recently, a defer helper was added to Python selftests. The idea is to keep
cleanup commands close to their dirtying counterparts, thereby making it
more transparent what is cleaning up what, making it harder to miss a
cleanup, and make the whole cleanup business exception safe. All these
benefits are applicable to bash as well, exception safety can be
interpreted in terms of safety vs. a SIGINT.
This patchset therefore introduces a framework of several helpers that
serve to schedule cleanups in bash selftests.
- Patch #1 has more details about the primitives being introduced.
Patch #2 adds a fallback cleanup() function to lib.sh, because ideally
selftests wouldn't need to introduce a dedicated cleanup function at all.
- Patch #3 adds a parameter to stop_traffic(), which makes it possible to
start other background processes after the traffic is started without
confusing the cleanup.
- Patches #4 to #10 convert a number of selftests.
The goal was to convert all tests that use start_traffic / stop_traffic
to the defer framework. Leftover traffic generators are a particularly
painful sort of a missed cleanup. Normal unfinished cleanups can usually
be cleaned up simply by rerunning the test and interrupting it early to
let the cleanups run again / in full. This does not work with
stop_traffic, because it is only issued at the end of the test case that
starts the traffic. At the same time, leftover traffic generators
influence follow-up test runs, and are hard to notice.
The tests were however converted whole-sale, not just their traffic bits.
Thus they form a proof of concept of the defer framework.
====================
Link: https://patch.msgid.link/cover.1729157566.git.petrm@nvidia.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Diffstat (limited to 'drivers/net/netconsole.c')
0 files changed, 0 insertions, 0 deletions