]> www.infradead.org Git - users/hch/blktests.git/commit
check: Add the ability to call a cleanup function after a test ends
authorLogan Gunthorpe <logang@deltatee.com>
Wed, 17 Jul 2019 17:12:55 +0000 (11:12 -0600)
committerOmar Sandoval <osandov@osandov.com>
Mon, 29 Jul 2019 17:13:14 +0000 (10:13 -0700)
commite25f27939668a79ffdad8040701d3d3e0956de33
tree2ebb4082cf1322e9a422f36c972bd81007bd30f3
parent1aee5f430b30c0d691ddbb41a005bafdfcf4d38c
check: Add the ability to call a cleanup function after a test ends

In order to ensure tests properly clean themselves up, even if
they are subject to interruption, add the ability to call a test
specified function at cleanup time.

Any test can call _register_test_cleanup with the first argument
as a function to call after the test ends or is interrupted
(similar to using 'trap <func> EXIT').

Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: Logan Gunthorpe <logang@deltatee.com>
check