xref: /freebsd/sbin/newfs/runtest01.sh (revision 7fdf597e96a02165cfe22ff357b857d5fa15ed8a)
1#!/bin/sh
2
3set -e
4
5MD=99
6ME=98
7s=1m
8mdconfig -d -u $MD || true
9mdconfig -d -u $ME || true
10mdconfig -a -t malloc -s $s -u $MD
11mdconfig -a -t malloc -s $s -u $ME
12disklabel -w md$MD auto
13disklabel -w md$ME auto
14./newfs -R /dev/md${MD}c
15./newfs -R /dev/md${ME}c
16if cmp /dev/md${MD}c /dev/md${ME}c ; then
17	echo "Test passed"
18	e=0
19else
20	echo "Test failed"
21	e=1
22fi
23mdconfig -d -u $MD || true
24mdconfig -d -u $ME || true
25exit $e
26
27