diff options
author | ngie <ngie@FreeBSD.org> | 2015-11-25 01:27:51 +0000 |
---|---|---|
committer | ngie <ngie@FreeBSD.org> | 2015-11-25 01:27:51 +0000 |
commit | da2e89dc44c0dd458438d1f572265d9dc9a8c1ed (patch) | |
tree | b4bc514eae4e7602af6e933d71ee42b01d0ffc59 | |
parent | ab8d38b2870101690f78b0a0760a093de9aa4f75 (diff) | |
download | FreeBSD-src-da2e89dc44c0dd458438d1f572265d9dc9a8c1ed.zip FreeBSD-src-da2e89dc44c0dd458438d1f572265d9dc9a8c1ed.tar.gz |
- Implement gstripe_test_cleanup
- Use a random name for the gstripe
-rwxr-xr-x | sbin/geom/class/tests/stripe/conf.sh | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/sbin/geom/class/tests/stripe/conf.sh b/sbin/geom/class/tests/stripe/conf.sh index 22e5864..fd0f41c 100755 --- a/sbin/geom/class/tests/stripe/conf.sh +++ b/sbin/geom/class/tests/stripe/conf.sh @@ -1,8 +1,15 @@ #!/bin/sh # $FreeBSD$ -name="test" +name="$(mktemp -u stripe.XXXXXX)" class="stripe" base=`basename $0` +gstripe_test_cleanup() +{ + [ -c /dev/$class/$name ] && gstripe destroy $name + geom_test_cleanup +} +trap gstripe_test_cleanup ABRT EXIT INT TERM + . `dirname $0`/../geom_subr.sh |