1#!/bin/sh 2 3class="union" 4base=$(atf_get ident) 5 6attach_md() 7{ 8 local test_md 9 10 test_md=$(mdconfig -a "$@") || atf_fail "failed to allocate md(4)" 11 echo $test_md >> $TEST_MDS_FILE || exit 12 echo $test_md 13} 14 15gunion_test_cleanup() 16{ 17 if mount | grep -q "/gunionmnt"; then 18 umount gunionmnt 19 fi 20 if mount | grep -q "/uppermnt"; then 21 umount uppermnt 22 fi 23 if mount | grep -q "/lowermnt"; then 24 umount lowermnt 25 fi 26 27 if [ -e "guniondev" ]; then 28 gunion destroy "$(cat guniondev)" 29 fi 30 31 geom_test_cleanup 32} 33 34gunion_test_setup() 35{ 36 geom_atf_test_setup 37} 38 39ATF_TEST=true 40. `dirname $0`/../geom_subr.sh 41