mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-26 20:22:14 +03:00
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:
@@ -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 ))
|
||||
|
||||
Reference in New Issue
Block a user