svn commit: r258983 - user/pho/stress2/misc
Peter Holm
pho at FreeBSD.org
Thu Dec 5 14:43:47 UTC 2013
Author: pho
Date: Thu Dec 5 14:43:46 2013
New Revision: 258983
URL: http://svnweb.freebsd.org/changeset/base/258983
Log:
Use newfs_flags for newfs(8) and test for exit status.
Sponsored by: EMC / Isilon storage division
Modified:
user/pho/stress2/misc/linger4.sh
Modified: user/pho/stress2/misc/linger4.sh
==============================================================================
--- user/pho/stress2/misc/linger4.sh Thu Dec 5 13:58:44 2013 (r258982)
+++ user/pho/stress2/misc/linger4.sh Thu Dec 5 14:43:46 2013 (r258983)
@@ -46,7 +46,7 @@ mdconfig -l | grep -q md$mdstart && mdc
mdconfig -a -t swap -s 2g -u $mdstart
bsdlabel -w md$mdstart auto
[ $# -eq 1 ] && opt="$1"
-[ $# -eq 0 ] && opt=-U # The default is "-U"
+[ $# -eq 0 ] && opt=$newfs_flags # No argument == default flag
echo "newfs $opt md${mdstart}$part"
newfs $opt md${mdstart}$part > /dev/null
mount /dev/md${mdstart}$part $mntpoint
@@ -54,7 +54,8 @@ mount /dev/md${mdstart}$part $mntpoint
cd $mntpoint
chmod 777 $mntpoint
-su $testuser -c "/tmp/linger4"
+su $testuser -c "/tmp/linger4" ||
+ { ls -la $mntpoint; df -i $mntpoint; }
cd $here
@@ -138,13 +139,12 @@ main()
for (i = 0; i < PARALLEL; i++) {
wait(&status);
- e += status;
+ e += WEXITSTATUS(status);
}
if (e != 0)
break;
// sleep(60); /* No problems if this is included */
}
- system("ls -la /mnt; df -i /mnt");
- return (0);
+ return (e);
}
More information about the svn-src-user
mailing list