freebsd-nq/tools/regression/geom_mirror/conf.sh
Enji Cooper 86e3671a7e - Use attach_md instead of hardcoding md(4) provider unit numbers
- 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
2016-01-03 06:02:56 +00:00

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