]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Fix up concurrent test zpool setup and teardown
authorngie <ngie@FreeBSD.org>
Tue, 12 Feb 2019 23:35:46 +0000 (23:35 +0000)
committerngie <ngie@FreeBSD.org>
Tue, 12 Feb 2019 23:35:46 +0000 (23:35 +0000)
commit81b0e470dde9b4450ea8091b059427b762915a53
tree1ee19fa836053d83efdcacb06f63e82de77cf162
parentc04e572b13215458415ecfabbb94ce6cb6b613f5
Fix up concurrent test zpool setup and teardown

Set up zpools with a more unique name, stash the zpool name away in a file pointed
to by `$ZPOOL_NAME_FILE` (which is relative to a per-testcase generated temporary
directory), then remove the file based on `$ZPOOL_NAME_FILE` in the cleanup
routines.

This is a more concurrency-safe solution and will allow the testcases to be safely
executed in parallel.

Reviewed by: kevans, jtl
Approved by: jtl (mentor)
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D19024
sbin/bectl/tests/bectl_test.sh