summaryrefslogtreecommitdiffstats
path: root/sbin
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>2003-04-22 21:04:48 +0000
committerphk <phk@FreeBSD.org>2003-04-22 21:04:48 +0000
commit00bb631612e9d3526f8c2ac1383ea97a86a4dbb8 (patch)
treecb1dba54ed5540db4e16be0b9bf4632b3445e566 /sbin
parentc5dae9372be4269fbaa287712666047e8836309b (diff)
downloadFreeBSD-src-00bb631612e9d3526f8c2ac1383ea97a86a4dbb8.zip
FreeBSD-src-00bb631612e9d3526f8c2ac1383ea97a86a4dbb8.tar.gz
Add "-r" when we initialize the label first time.
Add two more tests.
Diffstat (limited to 'sbin')
-rw-r--r--sbin/sunlabel/runtest.sh19
1 files changed, 18 insertions, 1 deletions
diff --git a/sbin/sunlabel/runtest.sh b/sbin/sunlabel/runtest.sh
index d6ba1a5..8bddd67 100644
--- a/sbin/sunlabel/runtest.sh
+++ b/sbin/sunlabel/runtest.sh
@@ -6,7 +6,7 @@ set -e
MD=`mdconfig -a -t malloc -s 2m`
trap "exec 7</dev/null; rm -f ${TMP}* ; mdconfig -d -u ${MD}" EXIT INT TERM
-./sunlabel -w $MD auto
+./sunlabel -r -w $MD auto
dd if=/dev/$MD of=${TMP}i0 count=16 > /dev/null 2>&1
./sunlabel $MD > ${TMP}l0
@@ -20,6 +20,23 @@ s/3969/1024/
' ${TMP}l0 > ${TMP}l1
./sunlabel -R $MD ${TMP}l1
+if [ -c /dev/${MD}a ] ; then
+ echo "PASS: Created a: partition" 1>&2
+else
+ echo "FAIL: Did not create a: partition" 1>&2
+ exit 2
+fi
+
+# Spoil and rediscover
+
+true > /dev/${MD}
+if [ -c /dev/${MD}a ] ; then
+ echo "PASS: Recreated a: partition after spoilage" 1>&2
+else
+ echo "FAIL: Did not recreate a: partition after spoilage" 1>&2
+ exit 2
+fi
+
dd if=/dev/$MD of=${TMP}i1 count=16 > /dev/null 2>&1
sed '
/ c:/{
OpenPOWER on IntegriCloud