Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
freebsd
GitHub Repository: freebsd/freebsd-src
Path: blob/main/tests/sys/geom/class/union/conf.sh
39636 views
1
#!/bin/sh
2
3
class="union"
4
base=$(atf_get ident)
5
6
attach_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
15
gunion_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
34
gunion_test_setup()
35
{
36
geom_atf_test_setup
37
}
38
39
ATF_TEST=true
40
. `dirname $0`/../geom_subr.sh
41
42