Date: Fri, 7 Dec 2018 00:27:39 +0000 (UTC) From: Alan Somers <asomers@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r341667 - in head/tests/sys/geom/class: . eli Message-ID: <201812070027.wB70RdQX073433@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: asomers Date: Fri Dec 7 00:27:38 2018 New Revision: 341667 URL: https://svnweb.freebsd.org/changeset/base/341667 Log: 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 Modified: head/tests/sys/geom/class/eli/conf.sh head/tests/sys/geom/class/geom_subr.sh Modified: head/tests/sys/geom/class/eli/conf.sh ============================================================================== --- head/tests/sys/geom/class/eli/conf.sh Fri Dec 7 00:00:12 2018 (r341666) +++ head/tests/sys/geom/class/eli/conf.sh Fri Dec 7 00:27:38 2018 (r341667) @@ -4,7 +4,6 @@ class="eli" base=$(atf_get ident) MAX_SECSIZE=8192 -TEST_MDS_FILE=md.devs attach_md() { Modified: head/tests/sys/geom/class/geom_subr.sh ============================================================================== --- head/tests/sys/geom/class/geom_subr.sh Fri Dec 7 00:00:12 2018 (r341666) +++ head/tests/sys/geom/class/geom_subr.sh Fri Dec 7 00:27:38 2018 (r341667) @@ -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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201812070027.wB70RdQX073433>