ngie 95f35ea213 - Use attach_md for memory disks so they can be tracked.
- Add a geom_concat specific cleanup function and trap on that function at
  exit so things are cleaned up properly
- Don't hardcode /tmp for temporary files, which violates the kyua sandbox

MFC after: 3 weeks
Sponsored by: EMC / Isilon Storage Division
2016-01-08 19:10:52 +00:00

16 lines
266 B
Bash

#!/bin/sh
# $FreeBSD$
name="$(mktemp -u concat.XXXXXX)"
class="concat"
base=`basename $0`
gconcat_test_cleanup()
{
[ -c /dev/$class/$name ] && gconcat destroy $name
geom_test_cleanup
}
trap gconcat_test_cleanup ABRT EXIT INT TERM
. `dirname $0`/../geom_subr.sh