mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-27 04:32:16 +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:
@@ -34,8 +34,7 @@
|
||||
# (it can cause useradd to take a long time, hitting our TIMEOUT)
|
||||
if is_illumos; then
|
||||
USES_NIS=false
|
||||
svcs svc:/network/nis/client:default | grep online > /dev/null
|
||||
if [ $? -eq 0 ]
|
||||
if svcs svc:/network/nis/client:default | grep -q online
|
||||
then
|
||||
svcadm disable -t svc:/network/nis/client:default
|
||||
USES_NIS=true
|
||||
|
||||
@@ -126,12 +126,8 @@ if is_illumos; then
|
||||
log_must mkdir $TESTDIR/noxattrs
|
||||
log_must touch $TESTDIR/noxattrs/no-xattr
|
||||
|
||||
find $TESTDIR -xattr | grep myfile.$$
|
||||
[[ $? -ne 0 ]] && \
|
||||
log_fail "find -xattr didn't find our file that had an xattr."
|
||||
find $TESTDIR -xattr | grep no-xattr
|
||||
[[ $? -eq 0 ]] && \
|
||||
log_fail "find -xattr found a file that didn't have an xattr."
|
||||
log_must eval "find $TESTDIR -xattr | grep -q myfile.$$"
|
||||
log_mustnot eval "find $TESTDIR -xattr | grep -q no-xattr"
|
||||
log_must rm -rf $TESTDIR/noxattrs
|
||||
else
|
||||
log_note "Checking find - unsupported"
|
||||
|
||||
@@ -52,12 +52,6 @@ function cleanup {
|
||||
log_assert "The noxattr mount option functions as expected"
|
||||
log_onexit cleanup
|
||||
|
||||
zfs set 2>&1 | grep xattr > /dev/null
|
||||
if [ $? -ne 0 ]
|
||||
then
|
||||
log_unsupported "noxattr mount option not supported on this release."
|
||||
fi
|
||||
|
||||
log_must touch $TESTDIR/myfile.$$
|
||||
create_xattr $TESTDIR/myfile.$$ passwd /etc/passwd
|
||||
|
||||
|
||||
Reference in New Issue
Block a user