tests: review every instance of $?

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: John Kennedy <john.kennedy@delphix.com>
Reviewed-by: Ryan Moeller <ryan@iXsystems.com>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #13259
This commit is contained in:
наб
2022-03-23 01:52:39 +01:00
committed by Brian Behlendorf
parent 6586085673
commit 23914a3b91
147 changed files with 560 additions and 1485 deletions
@@ -51,8 +51,7 @@ verify_runnable "both"
function cleanup
{
snapexists $SNAPFS
[[ $? -eq 0 ]] && \
snapexists $SNAPFS &&
log_must zfs destroy $SNAPFS
[ -e $TESTDIR ] && log_must rm -rf $TESTDIR/*
@@ -51,12 +51,10 @@ verify_runnable "both"
function cleanup
{
snapexists $SNAPFS.1
[[ $? -eq 0 ]] && \
snapexists $SNAPFS.1 &&
log_must zfs destroy $SNAPFS.1
snapexists $SNAPFS
[[ $? -eq 0 ]] && \
snapexists $SNAPFS &&
log_must zfs destroy $SNAPFS
[ -e $TESTDIR ] && log_must rm -rf $TESTDIR/*
@@ -48,8 +48,7 @@ function cleanup
{
typeset -i i=1
while [[ $i -lt $COUNT ]]; do
snapexists $SNAPFS.$i
[[ $? -eq 0 ]] && \
snapexists $SNAPFS.$i &&
log_must zfs destroy $SNAPFS.$i
(( i = i + 1 ))