svn commit: r323700 - user/pho/stress2
Peter Holm
pho at FreeBSD.org
Mon Sep 18 08:42:05 UTC 2017
Author: pho
Date: Mon Sep 18 08:42:04 2017
New Revision: 323700
URL: https://svnweb.freebsd.org/changeset/base/323700
Log:
Move start mdconfig unit number to avoid possible collisions.
Trust fsck to report if file system was modified.
Sponsored by: Dell EMC Isilon
Modified:
user/pho/stress2/default.cfg
Modified: user/pho/stress2/default.cfg
==============================================================================
--- user/pho/stress2/default.cfg Mon Sep 18 08:38:38 2017 (r323699)
+++ user/pho/stress2/default.cfg Mon Sep 18 08:42:04 2017 (r323700)
@@ -59,7 +59,7 @@ testcases/tcp/tcp
export diskimage=${diskimage:-/tmp/diskimage} # Location of 1G disk image
export mntpoint=${mntpoint:-/mnt} # Disk image mount point
export testuser=${testuser:-TBD} # Name of non root test user
-export mdstart=${mdstart:-5} # Start of free md units
+export mdstart=${mdstart:-10} # Start of free md units
export part=${part:-a} # Partition to use on a md FS
export newfs_flags=${newfs_flags:-"-U"} # Default file system flags
export stress2origin=${stress2origin:-`pwd`}
@@ -75,20 +75,20 @@ dede () { # file, blocksize, count
return $status
}
-# fsck and dumpfs comparison
+# fsck wrapper
checkfs () {
- dumpfs $1 | sed '/UFS2/s/..:..:../xx:xx:xx/' > /tmp/dumpfs.1
- sleep 1
- fsck -t ufs -y $1 > /tmp/fsck.log 2>&1
- dumpfs $1 | sed '/UFS2/s/..:..:../xx:xx:xx/' > /tmp/dumpfs.2
- if egrep -q "INCONSISTENCY|MODIFIED" /tmp/fsck.log ||
- ! cmp -s /tmp/dumpfs.1 /tmp/dumpfs.2; then
- diff -c /tmp/dumpfs.1 /tmp/dumpfs.2
- echo "fsck -t ufs -y $1"
- cat /tmp/fsck.log
- else
- rm -f /tmp/fsck.log /tmp/dumpfs.[12]
- fi
+ local s
+
+ fsck -t ufs -fy $1 > /tmp/fsck.log 2>&1
+ if egrep -q "BAD|INCONSISTENCY|MODIFIED" /tmp/fsck.log; then
+ echo "fsck -t ufs -fy $1"
+ cat /tmp/fsck.log
+ s=1
+ else
+ rm -f /tmp/fsck.log /tmp/dumpfs.[12]
+ s=0
+ fi
+ return $s
}
# Support for pre-build binaries for stress2/misc tests
More information about the svn-src-user
mailing list