diff options
author | phk <phk@FreeBSD.org> | 2002-03-19 21:05:29 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 2002-03-19 21:05:29 +0000 |
commit | ca2e5c188ee68045b54a86bfefcfd4a75e174221 (patch) | |
tree | efe73699db1df391f9b4fcd88000d3a2f42d5ede /sbin/newfs/runtest01.sh | |
parent | 5a84f9883932fbf90adb9dd3951956e85776adb9 (diff) | |
download | FreeBSD-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/runtest01.sh')
-rw-r--r-- | sbin/newfs/runtest01.sh | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/sbin/newfs/runtest01.sh b/sbin/newfs/runtest01.sh new file mode 100644 index 0000000..4712832 --- /dev/null +++ b/sbin/newfs/runtest01.sh @@ -0,0 +1,27 @@ +#!/bin/sh +# $FreeBSD$ + +set -e + +MD=99 +ME=98 +s=1m +mdconfig -d -u $MD || true +mdconfig -d -u $ME || true +mdconfig -a -t malloc -s $s -u $MD +mdconfig -a -t malloc -s $s -u $ME +disklabel -r -w md$MD auto +disklabel -r -w md$ME auto +./newfs -R /dev/md${MD}c +./newfs -R /dev/md${ME}c +if cmp /dev/md${MD}c /dev/md${ME}c ; then + echo "Test passed" + e=0 +else + echo "Test failed" + e=1 +fi +mdconfig -d -u $MD || true +mdconfig -d -u $ME || true +exit $e + |