Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 2 Jan 2016 10:07:31 +0000 (UTC)
From:      Garrett Cooper <ngie@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r293048 - head/tools/regression
Message-ID:  <201601021007.u02A7VHn017649@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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
 }



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201601021007.u02A7VHn017649>