geom tests: Fix cleanup of ATF tests since r341392
r341392 changed common test cleanup routines in a way that allowed them to be used by TAP tests as well as ATF tests. However, a late change made during code review resulted in cleanup being broken for ATF tests, which source geom_subr.sh separately during the body and cleanup phases of the test. The result was that md(4) devices wouldn't get cleaned up. MFC after: 2 weeks X-MFC-With: 341392
This commit is contained in:
parent
0b3fcef470
commit
aa7e1df44f
@ -4,7 +4,6 @@
|
||||
class="eli"
|
||||
base=$(atf_get ident)
|
||||
MAX_SECSIZE=8192
|
||||
TEST_MDS_FILE=md.devs
|
||||
|
||||
attach_md()
|
||||
{
|
||||
|
@ -1,8 +1,7 @@
|
||||
#!/bin/sh
|
||||
# $FreeBSD$
|
||||
|
||||
# NOTE: existence is sanity-checked in `geom_verify_temp_mds_file_existence(..)`
|
||||
TEST_MDS_FILE="$(mktemp test_mds.${0##*/}.XXXXXXXX)"
|
||||
TEST_MDS_FILE="${TMPDIR}/test_mds.$(basename $0)"
|
||||
|
||||
devwait()
|
||||
{
|
||||
@ -47,14 +46,6 @@ geom_test_cleanup()
|
||||
fi
|
||||
}
|
||||
|
||||
geom_verify_temp_mds_file_existence()
|
||||
{
|
||||
if [ ! -f $TEST_MDS_FILE ]; then
|
||||
echo "test md(4) devices file creation unsuccessful"
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
geom_load_class_if_needed()
|
||||
{
|
||||
local class=$1
|
||||
@ -71,9 +62,6 @@ geom_load_class_if_needed()
|
||||
|
||||
geom_atf_test_setup()
|
||||
{
|
||||
if ! error_message=$(geom_verify_temp_mds_file_existence); then
|
||||
atf_skip "$error_message"
|
||||
fi
|
||||
if ! error_message=$(geom_load_class_if_needed $class); then
|
||||
atf_skip "$error_message"
|
||||
fi
|
||||
@ -81,10 +69,6 @@ geom_atf_test_setup()
|
||||
|
||||
geom_tap_test_setup()
|
||||
{
|
||||
if ! error_message=$(geom_verify_temp_mds_file_existence); then
|
||||
echo "1..0 # SKIP $error_message"
|
||||
exit 1
|
||||
fi
|
||||
if ! error_message=$(geom_load_class_if_needed $class); then
|
||||
echo "1..0 # SKIP $error_message"
|
||||
exit 0
|
||||
|
Loading…
Reference in New Issue
Block a user