onetime_d_test.sh revision 148459
1#!/bin/sh 2# $FreeBSD: head/tools/regression/geom_eli/onetime-d.t 148459 2005-07-27 22:27:30Z pjd $ 3 4base=`basename $0` 5no=45 6sectors=100 7mdconfig -a -t malloc -s $sectors -u $no || exit 1 8 9echo "1..3" 10 11geli onetime -d md${no} 12if [ -c /dev/md${no}.eli ]; then 13 echo "ok 1" 14else 15 echo "not ok 1" 16fi 17# Be sure it doesn't detach on read. 18dd if=/dev/md${no}.eli of=/dev/null 2>/dev/null 19sleep 1 20if [ -c /dev/md${no}.eli ]; then 21 echo "ok 2" 22else 23 echo "not ok 2" 24fi 25true > /dev/md${no}.eli 26sleep 1 27if [ ! -c /dev/md${no}.eli ]; then 28 echo "ok 3" 29else 30 echo "not ok 3" 31fi 32 33mdconfig -d -u $no 34