]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Fix geli device cleanup
authorngie <ngie@FreeBSD.org>
Tue, 9 Apr 2019 16:20:36 +0000 (16:20 +0000)
committerngie <ngie@FreeBSD.org>
Tue, 9 Apr 2019 16:20:36 +0000 (16:20 +0000)
commit463d02be4c86470fa21de7c063a15beebcb580a6
treebc71f0db105cbc92ae2eccff305ef75114e447ec
parent6ac6cb13ce85ebbe441be24259ef9ae9fce8902e
Fix geli device cleanup

Final cleanup routines shouldn't be called from testcases; it should be called
from the testcase cleanup routine.

Furthermore, `geli_test_cleanup` should take care of cleaning up geli providers
and the memory disks used for the geli providers. `geli_test_cleanup` will always
be executed whereas the equivalent logic in `geli_test_body`, may not have been
executed if the test failed prior to the logic being run.

Prior to this change, the test case was trying to clean up `$md` twice: once in
at the end of the test case body function, and the other in the cleanup function.
The cleanup function logic was failing because there wasn't anything to clean up
in the cleanup function and the errors weren't being ignored.

This fixes FreeBSD test suite runs after r345864.

PR: 237128
Reviewed by: asomers, pjd
Approved by: emaste (mentor)
MFC with: r345864
Differential Revision: https://reviews.freebsd.org/D19854
tests/sys/geom/class/eli/online_resize_test.sh