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