svn commit: r293048 - head/tools/regression

Garrett Cooper ngie at FreeBSD.org
Sat Jan 2 10:07:32 UTC 2016


Author: ngie
Date: Sat Jan  2 10:07:31 2016
New Revision: 293048
URL: https://svnweb.freebsd.org/changeset/base/293048

Log:
  - Use a temporary file for the temporary md(4) devices instead of
    hardcoding it
  - Remove the temporary file in the cleanup routine
  
  MFC after: 2 weeks
  Sponsored by: EMC / Isilon Storage Division

Modified:
  head/tools/regression/geom_subr.sh

Modified: head/tools/regression/geom_subr.sh
==============================================================================
--- head/tools/regression/geom_subr.sh	Sat Jan  2 04:42:53 2016	(r293047)
+++ head/tools/regression/geom_subr.sh	Sat Jan  2 10:07:31 2016	(r293048)
@@ -23,7 +23,7 @@ devwait()
 # a large number of md(4) devices lingering around
 : ${TMPDIR=/tmp}
 export TMPDIR
-TEST_MDS_FILE=${TMPDIR}/test_mds
+TEST_MDS_FILE=$(mktemp ${TMPDIR}/test_mds.XXXXXX) || exit 1
 
 attach_md()
 {
@@ -45,4 +45,5 @@ geom_test_cleanup()
 			mdconfig -d -u $test_md
 		done < $TEST_MDS_FILE
 	fi
+	rm -f $TEST_MDS_FILE
 }


More information about the svn-src-head mailing list