svn commit: r319106 - user/pho/stress2/misc
Peter Holm
pho at FreeBSD.org
Mon May 29 08:47:37 UTC 2017
Author: pho
Date: Mon May 29 08:47:36 2017
New Revision: 319106
URL: https://svnweb.freebsd.org/changeset/base/319106
Log:
Use a larger disk for tests. Added cleanup after test run.
Sponsored by: Dell EMC Isilon
Modified:
user/pho/stress2/misc/cmp.sh
Modified: user/pho/stress2/misc/cmp.sh
==============================================================================
--- user/pho/stress2/misc/cmp.sh Mon May 29 08:43:15 2017 (r319105)
+++ user/pho/stress2/misc/cmp.sh Mon May 29 08:47:36 2017 (r319106)
@@ -46,7 +46,7 @@ rm -f cmp.c
mount | grep $mntpoint | grep -q /dev/md && umount -f $mntpoint
[ -c /dev/md$mdstart ] && mdconfig -d -u $mdstart
-mdconfig -a -t swap -s 1g -u $mdstart || exit 1
+mdconfig -a -t swap -s 2g -u $mdstart || exit 1
bsdlabel -w md$mdstart auto
# Don't use SU due to bogus "out of inodes" messages.
newfs md${mdstart}$part > /dev/null
@@ -70,6 +70,7 @@ while mount | grep $mntpoint | grep -q /
umount $mntpoint || sleep 1
done
mdconfig -d -u $mdstart
+[ -d "$mntpoint" ] && (cd $mntpoint && find . -delete)
# tmpfs
mount -t tmpfs tmpfs $mntpoint
@@ -92,6 +93,7 @@ done > /dev/null 2>&1
while mount | grep $mntpoint | grep -q tmpfs; do
umount $mntpoint || sleep 1
done
+[ -d "$mntpoint" ] && (cd $mntpoint && find . -delete)
rm -f /tmp/cmp
exit 0
EOF
@@ -168,8 +170,10 @@ main(int argc, char **argv)
{
int i, j;
- if (argc != 2)
- errx(1, "Usage: %s <fill path to dir>", argv[0]);
+ if (argc != 2) {
+ fprintf(stderr, "Usage: %s <full path to dir>", argv[0]);
+ exit(1);
+ }
dir = argv[1];
for (j = 0; j < LOOPS; j++) {
More information about the svn-src-user
mailing list