Make cleanup routines idempotent
authorjmmv <jmmv@FreeBSD.org>
Sat, 4 Jul 2015 02:22:26 +0000 (02:22 +0000)
committerjmmv <jmmv@FreeBSD.org>
Sat, 4 Jul 2015 02:22:26 +0000 (02:22 +0000)
commit5c6b494ea7e8f8ed568b19c5254410decebaaaa8
treeb7a02f0181be743150435ab4e016e5015bfce11e
parentb42f5bb715542b3013303313cb26b813bdc26101
Make cleanup routines idempotent

cleanup routines can be executed at any point during the execution of the
body, including even before the body has done any real work.  In those
cases, cleanup routines should be careful to not raise spurious errors so
as to not "override" the actual result of the test case.

This is just general good coding style but is not a problem in practice
for these specific tests.  (The way I discovered the issue, though, was
due to a regression I introduced in Kyua itself while refactoring some
internals.)

MFC after: 1 week
tests/sys/netinet/fibs_test.sh