setkey_test.sh (182452) | setkey_test.sh (293436) |
---|---|
1#!/bin/sh | 1#!/bin/sh |
2# $FreeBSD: head/tools/regression/geom_eli/setkey.t 182452 2008-08-29 18:10:18Z pjd $ | 2# $FreeBSD: head/tools/regression/geom_eli/setkey.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 |
7rnd=`mktemp /tmp/$base.XXXXXX` || exit 1 8keyfile1=`mktemp /tmp/$base.XXXXXX` || exit 1 9keyfile2=`mktemp /tmp/$base.XXXXXX` || exit 1 10keyfile3=`mktemp /tmp/$base.XXXXXX` || exit 1 11keyfile4=`mktemp /tmp/$base.XXXXXX` || exit 1 12keyfile5=`mktemp /tmp/$base.XXXXXX` || exit 1 | 8rnd=`mktemp $base.XXXXXX` || exit 1 9keyfile1=`mktemp $base.XXXXXX` || exit 1 10keyfile2=`mktemp $base.XXXXXX` || exit 1 11keyfile3=`mktemp $base.XXXXXX` || exit 1 12keyfile4=`mktemp $base.XXXXXX` || exit 1 13keyfile5=`mktemp $base.XXXXXX` || exit 1 |
13mdconfig -a -t malloc -s `expr $sectors + 1` -u $no || exit 1 14 15echo "1..16" 16 17dd if=/dev/random of=${rnd} bs=512 count=${sectors} >/dev/null 2>&1 18hash1=`dd if=${rnd} bs=512 count=${sectors} 2>/dev/null | md5` 19dd if=/dev/random of=${keyfile1} bs=512 count=16 >/dev/null 2>&1 20dd if=/dev/random of=${keyfile2} bs=512 count=16 >/dev/null 2>&1 --- 126 unchanged lines hidden (view full) --- 147 echo "not ok 15" 148fi 149if [ ${hash1} = ${hash6} ]; then 150 echo "ok 16" 151else 152 echo "not ok 16" 153fi 154 | 14mdconfig -a -t malloc -s `expr $sectors + 1` -u $no || exit 1 15 16echo "1..16" 17 18dd if=/dev/random of=${rnd} bs=512 count=${sectors} >/dev/null 2>&1 19hash1=`dd if=${rnd} bs=512 count=${sectors} 2>/dev/null | md5` 20dd if=/dev/random of=${keyfile1} bs=512 count=16 >/dev/null 2>&1 21dd if=/dev/random of=${keyfile2} bs=512 count=16 >/dev/null 2>&1 --- 126 unchanged lines hidden (view full) --- 148 echo "not ok 15" 149fi 150if [ ${hash1} = ${hash6} ]; then 151 echo "ok 16" 152else 153 echo "not ok 16" 154fi 155 |
155mdconfig -d -u $no | |
156rm -f $keyfile1 $keyfile2 $keyfile3 $keyfile4 $keyfile5 | 156rm -f $keyfile1 $keyfile2 $keyfile3 $keyfile4 $keyfile5 |