diff options
author | Joseph Sutton <josephsutton@catalyst.net.nz> | 2023-04-11 14:31:59 +1200 |
---|---|---|
committer | Andreas Schneider <asn@cryptomilk.org> | 2023-04-12 13:52:32 +0000 |
commit | ae5fafa902bd3b8564a0e36b75a8ddc7e156f1fa (patch) | |
tree | 31b3294051e6e24d2c01297a0243db7a9e8a5d26 | |
parent | 23d2c9cb72d3aa4593edae40fc6b998c96242dd6 (diff) | |
download | samba-ae5fafa902bd3b8564a0e36b75a8ddc7e156f1fa.tar.gz |
testprogs: Have testfail() return 0 on success
This is more consistent with the other testing functions.
Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andreas Schneider <asn@samba.org>
-rwxr-xr-x | nsswitch/tests/test_wbinfo.sh | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/nsswitch/tests/test_wbinfo.sh b/nsswitch/tests/test_wbinfo.sh index 9b2b6823052..b36e4c63bc1 100755 --- a/nsswitch/tests/test_wbinfo.sh +++ b/nsswitch/tests/test_wbinfo.sh @@ -29,10 +29,11 @@ testfail() status=$? if [ x$status = x0 ]; then echo "failure: $name" + return 1 else echo "success: $name" + return 0 fi - return $status } knownfail() @@ -183,7 +184,7 @@ else echo "success: wbinfo -S check for sane mapping" fi -testfail "wbinfo -S against $TARGET using invalid SID" $wbinfo -S "S-1-22-2-30000" && failed=$(expr $failed + 1) +testfail "wbinfo -S against $TARGET using invalid SID" $wbinfo -S "S-1-22-2-30000" || failed=$(expr $failed + 1) testit "wbinfo -Y against $TARGET" $wbinfo -Y "S-1-22-2-30000" || failed=$(expr $failed + 1) @@ -197,7 +198,7 @@ else echo "success: wbinfo -Y check for sane mapping" fi -testfail "wbinfo -Y against $TARGET using invalid SID" $wbinfo -Y "S-1-22-1-30000" && failed=$(expr $failed + 1) +testfail "wbinfo -Y against $TARGET using invalid SID" $wbinfo -Y "S-1-22-1-30000" || failed=$(expr $failed + 1) testit "wbinfo -t against $TARGET" $wbinfo -t || failed=$(expr $failed + 1) @@ -284,7 +285,7 @@ else failed=$(expr $failed + 1) fi -testfail "wbinfo --group-info against $TARGET with $USERNAME" $wbinfo --group-info $USERNAME && failed=$(expr $failed + 1) +testfail "wbinfo --group-info against $TARGET with $USERNAME" $wbinfo --group-info $USERNAME || failed=$(expr $failed + 1) testit "wbinfo --gid-info against $TARGET" $wbinfo --gid-info $gid || failed=$(expr $failed + 1) |