init_B_test.sh (182452) | init_B_test.sh (293436) |
---|---|
1#!/bin/sh | 1#!/bin/sh |
2# $FreeBSD: head/tools/regression/geom_eli/init-B.t 182452 2008-08-29 18:10:18Z pjd $ | 2# $FreeBSD: head/tools/regression/geom_eli/init-B.t 293436 2016-01-08 19:38:59Z ngie $ |
3 | 3 |
4. $(dirname $0)/conf.sh 5 |
|
4base=`basename $0` | 6base=`basename $0` |
5no=45 | |
6sectors=100 | 7sectors=100 |
7keyfile=`mktemp /tmp/$base.XXXXXX` || exit 1 8backupfile=`mktemp /tmp/$base.XXXXXX` || exit 1 | 8keyfile=`mktemp $base.XXXXXX` || exit 1 9backupfile=`mktemp $base.XXXXXX` || exit 1 |
9 10echo "1..13" 11 12dd if=/dev/random of=${keyfile} bs=512 count=16 >/dev/null 2>&1 13 14mdconfig -a -t malloc -s $sectors -u $no || exit 1 15 16# -B none --- 77 unchanged lines hidden (view full) --- 94else 95 echo "not ok 12 - -B file" 96fi 97if [ -c /dev/md${no}.eli ]; then 98 echo "ok 13 - -B file" 99else 100 echo "not ok 13 - -B file" 101fi | 10 11echo "1..13" 12 13dd if=/dev/random of=${keyfile} bs=512 count=16 >/dev/null 2>&1 14 15mdconfig -a -t malloc -s $sectors -u $no || exit 1 16 17# -B none --- 77 unchanged lines hidden (view full) --- 95else 96 echo "not ok 12 - -B file" 97fi 98if [ -c /dev/md${no}.eli ]; then 99 echo "ok 13 - -B file" 100else 101 echo "not ok 13 - -B file" 102fi |
102geli detach md${no} 103rm -f $backupfile | |
104 | 103 |
105mdconfig -d -u $no 106rm -f $keyfile | 104rm -f $backupfile $keyfile |