freebsd-dev/sbin/newfs/runtest01.sh
Mateusz Piotrowski fd06117525 *: Do not use the no-op -r flag for bsdlabel(8)
The -r flag is ignored by the FreeBSD implementation of bsdlabel(8)
(also called disklabel(8) in the past). Remove its use from examples
and tests in the tree.

This commit does not touch historical documentation under share/doc/smm
and files under contrib/netbsd-tests.

Reviewed by:	imp
MFC after:	2 weeks
Approved by:	imp (src)
Fixes:		57dfbec57b More axe-work:
Differential Revision:	https://reviews.freebsd.org/D34585
2022-03-17 17:28:07 +01:00

28 lines
433 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 -w md$MD auto
disklabel -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