1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-14 10:09:48 +00:00
freebsd/sbin/newfs/runtest01.sh
Poul-Henning Kamp 89fb8ee796 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.
2002-03-19 21:05:29 +00:00

28 lines
439 B
Bash

#!/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