Lines Matching +full:fault +full:- +full:inject
36 [[ -d $TESTDIR ]] && \
37 log_must $RM -rf $TESTDIR
41 # Inject an error into object
52 typeset error=${3:-io}
53 typeset -i expect=${4:-0}
56 log_must eval '$ZINJECT -t $type -e $error \
57 -m -a -q $object > /dev/null 2>&1'
59 log_mustnot eval '$ZINJECT -t $type -e $error \
60 -m -a -q $object > /dev/null 2>&1'
71 log_must eval '$ZINJECT -c all > /dev/null 2>&1'
87 # Inject a fault into a particular device
98 log_must eval '$ZINJECT -d $device -e $errno -q $pool > /dev/null 2>&1'
110 typeset -i i=0
111 typeset -i maxtimes=20
119 ereport=$($FMDUMP -t "$etime" -e -v -c $type | \
121 if [[ -n $ereport ]]; then
124 $FMDUMP -t "$etime" -e -v
134 # Check if the fault is occurred after the given timestamp
140 typeset -i i=0
141 typeset -i maxtimes=20
145 for fault in $@ ; do
149 ereport=$($FMDUMP -av -t "$after_time" | $GREP $fault)
150 if [[ -n $ereport ]]; then
153 $FMDUMP -av -t "$after_time"
154 log_fail "$fault not found"
163 # Check if 'zpool status -v' contain the permanent error as expected
171 ereport=$($ZPOOL status -v $poolname | $GREP "$err")
172 if [[ -z $ereport ]]; then
173 $ZPOOL status -v $poolname
181 # Invoke the trigger function according to the fault type corresponded
190 $ECHO "ZFS Fault Harness" > $object
195 $LS -l $object > /dev/null 2>&1
206 typeset -i count=$2
207 typeset -i i=1
209 if [[ -d $basedir ]]; then
210 log_must $RM -rf $basedir/*
212 log_must $MKDIR -p $basedir
216 $ECHO "ZFS Fault Harness" > $basedir/testfile.$i
217 $MKDIR -p $basedir/testdir.$i