86e3671a7e
- Implement a gmirror_test_cleanup function, which in turn calls geom_test_cleanup to clean up all md(4) providers allocated in the test run. - Remove duplicate logic in test scripts for removing md(4) providers. - Don't create files in /tmp (outside the kyua sandbox); use the current directory instead MFC after: 3 weeks Sponsored by: EMC / Isilon Storage Division
16 lines
266 B
Bash
16 lines
266 B
Bash
#!/bin/sh
|
|
# $FreeBSD$
|
|
|
|
name="$(mktemp -u mirror.XXXXXX)"
|
|
class="mirror"
|
|
base=`basename $0`
|
|
|
|
gmirror_test_cleanup()
|
|
{
|
|
[ -c /dev/$class/$name ] && gmirror destroy $name
|
|
geom_test_cleanup
|
|
}
|
|
trap gmirror_test_cleanup ABRT EXIT INT TERM
|
|
|
|
. `dirname $0`/../geom_subr.sh
|