summaryrefslogtreecommitdiffstats
path: root/sbin/newfs/runtest00.sh
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>2002-03-19 21:05:29 +0000
committerphk <phk@FreeBSD.org>2002-03-19 21:05:29 +0000
commitca2e5c188ee68045b54a86bfefcfd4a75e174221 (patch)
treeefe73699db1df391f9b4fcd88000d3a2f42d5ede /sbin/newfs/runtest00.sh
parent5a84f9883932fbf90adb9dd3951956e85776adb9 (diff)
downloadFreeBSD-src-ca2e5c188ee68045b54a86bfefcfd4a75e174221.zip
FreeBSD-src-ca2e5c188ee68045b54a86bfefcfd4a75e174221.tar.gz
Add the undocumented -R option to disable randomness for regression-testing.
Add a couple of simple regression tests accessible with "make test", they depend on the md(4) driver. FYI I have also tried running the test against a week old newfs and it passed.
Diffstat (limited to 'sbin/newfs/runtest00.sh')
-rw-r--r--sbin/newfs/runtest00.sh19
1 files changed, 19 insertions, 0 deletions
diff --git a/sbin/newfs/runtest00.sh b/sbin/newfs/runtest00.sh
new file mode 100644
index 0000000..a95dbcc
--- /dev/null
+++ b/sbin/newfs/runtest00.sh
@@ -0,0 +1,19 @@
+#!/bin/sh
+# $FreeBSD$
+
+set -e
+
+MD=99
+(
+for s in 1m 4m 60m 120m 240m 1g
+do
+ (
+ mdconfig -d -u $MD || true
+ mdconfig -a -t malloc -s $s -u $MD
+ disklabel -r -w md$MD auto
+ ./newfs -R /dev/md${MD}c
+ ) 1>&2
+ md5 < /dev/md${MD}c
+done
+mdconfig -d -u $MD 1>&2 || true
+)
OpenPOWER on IntegriCloud