svn commit: r274544 - stable/9/tools/regression/zfs

Garrett Cooper ngie at FreeBSD.org
Sat Nov 15 05:35:25 UTC 2014


Author: ngie
Date: Sat Nov 15 05:35:24 2014
New Revision: 274544
URL: https://svnweb.freebsd.org/changeset/base/274544

Log:
  MFC r273627,r273628:
  
  r273627:
  
    - Print out "Bail out!" in die(..) so prove terminates immediately
    - Handle the output from newer versions of openssl md5, similar to what
      pjd@ did in r248304
  
    Sponsored by: EMC / Isilon Storage Division
  
  r273628:
  
    Move the redirection to stderr out of the cmd variable assignment
  
    Putting 2>/dev/null in cmd= escapes the redirection operation, which causes
    mdconfig to think it's a filename
  
    Sponsored by: EMC / Isilon Storage Division

Modified:
  stable/9/tools/regression/zfs/misc.sh
Directory Properties:
  stable/9/   (props changed)
  stable/9/tools/   (props changed)
  stable/9/tools/regression/   (props changed)

Modified: stable/9/tools/regression/zfs/misc.sh
==============================================================================
--- stable/9/tools/regression/zfs/misc.sh	Sat Nov 15 05:16:16 2014	(r274543)
+++ stable/9/tools/regression/zfs/misc.sh	Sat Nov 15 05:35:24 2014	(r274544)
@@ -39,6 +39,7 @@ fi
 die()
 {
 	echo "${1}" > /dev/stderr
+	echo "Bail out!"
 	exit 1
 }
 
@@ -166,8 +167,8 @@ create_memdisk()
 		if [ -n "${devname}" ]; then
 			devparam="-u ${devname}"
 		fi
-		cmd="mdconfig -a -t swap -s ${size} ${devparam} 2>/dev/null"
-		DISKNAME=`${cmd}` || die "failed: ${cmd}"
+		cmd="mdconfig -a -t swap -s ${size} ${devparam}"
+		DISKNAME=`$cmd 2>/dev/null` || die "failed: ${cmd}"
 		if [ -n "${devname}" ]; then
 			DISKNAME="${devname}"
 		fi
@@ -363,7 +364,7 @@ files_destroy()
 
 name_create()
 {
-	echo "zfstest_`dd if=/dev/urandom bs=1k count=1 2>/dev/null | openssl md5 | cut -b -8`"
+	echo "zfstest_`dd if=/dev/urandom bs=1k count=1 2>/dev/null | openssl md5 | awk '{ print $NF }'`"
 }
 
 names_create()


More information about the svn-src-all mailing list