kill_test.sh (182452) | kill_test.sh (293436) |
---|---|
1#!/bin/sh | 1#!/bin/sh |
2# $FreeBSD: head/tools/regression/geom_eli/kill.t 182452 2008-08-29 18:10:18Z pjd $ | 2# $FreeBSD: head/tools/regression/geom_eli/kill.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 |
7keyfile1=`mktemp /tmp/$base.XXXXXX` || exit 1 8keyfile2=`mktemp /tmp/$base.XXXXXX` || exit 1 | 8keyfile1=`mktemp $base.XXXXXX` || exit 1 9keyfile2=`mktemp $base.XXXXXX` || exit 1 |
9mdconfig -a -t malloc -s `expr $sectors + 1` -u $no || exit 1 10 11echo "1..9" 12 13dd if=/dev/random of=${keyfile1} bs=512 count=16 >/dev/null 2>&1 14dd if=/dev/random of=${keyfile2} bs=512 count=16 >/dev/null 2>&1 15 16geli init -B none -P -K $keyfile1 md${no} --- 71 unchanged lines hidden (view full) --- 88# We cannot use keyfile2 anymore. 89geli attach -p -k $keyfile2 md${no} 2>/dev/null 90if [ $? -ne 0 ]; then 91 echo "ok 9" 92else 93 echo "not ok 9" 94fi 95 | 10mdconfig -a -t malloc -s `expr $sectors + 1` -u $no || exit 1 11 12echo "1..9" 13 14dd if=/dev/random of=${keyfile1} bs=512 count=16 >/dev/null 2>&1 15dd if=/dev/random of=${keyfile2} bs=512 count=16 >/dev/null 2>&1 16 17geli init -B none -P -K $keyfile1 md${no} --- 71 unchanged lines hidden (view full) --- 89# We cannot use keyfile2 anymore. 90geli attach -p -k $keyfile2 md${no} 2>/dev/null 91if [ $? -ne 0 ]; then 92 echo "ok 9" 93else 94 echo "not ok 9" 95fi 96 |
96mdconfig -d -u $no | |
97rm -f $keyfile1 $keyfile2 | 97rm -f $keyfile1 $keyfile2 |