diff --git a/testprogs/blackbox/common_test_fns.inc b/testprogs/blackbox/common_test_fns.inc index ca7ed25b4a2..df8fee0e032 100755 --- a/testprogs/blackbox/common_test_fns.inc +++ b/testprogs/blackbox/common_test_fns.inc @@ -82,7 +82,7 @@ test_rpcclient_expect_failure_grep() status=$? if [ x$status = x0 ]; then printf '%s' "$output" | subunit_fail_test "$name" - return $status + return 1 fi printf '%s' "$output" | grep -q "$grep" gstatus=$? @@ -91,7 +91,7 @@ test_rpcclient_expect_failure_grep() else printf '%s' "$output" | subunit_fail_test "$name" fi - return $status + return $gstatus } kerberos_kinit() diff --git a/testprogs/blackbox/test_trust_ntlm.sh b/testprogs/blackbox/test_trust_ntlm.sh index ae84aebd85b..0220c82b38c 100755 --- a/testprogs/blackbox/test_trust_ntlm.sh +++ b/testprogs/blackbox/test_trust_ntlm.sh @@ -71,7 +71,7 @@ WBCREDS="$USERNAME@$DOMAIN%$PASSWORD" if [ x"$TYPE" = x"member" ]; then EXPFAIL="NT_STATUS_LOGON_FAILURE" # rpcclient doesn't handle -Uuser@domain yet - #test_rpcclient_expect_failure_grep "Fail03 rpcclient getusername with $CREDS" getusername "$SERVER" "$EXPFAIL" -U$CREDS && failed=`expr $failed + 1` + #test_rpcclient_expect_failure_grep "Fail03 rpcclient getusername with $CREDS" getusername "$SERVER" "$EXPFAIL" -U$CREDS || failed=`expr $failed + 1` test_smbclient_expect_failure "Fail03 smbclient with $CREDS" 'ls' "$unc" -U$CREDS || failed=$(expr $failed + 1) # winbindd doesn't handle user@domain yet #testit_expect_failure "Fail03 wbinfo -a with $WBCREDS" $VALGRIND $wbinfo -a $WBCREDS || failed=`expr $failed + 1` @@ -89,7 +89,7 @@ WBCREDS="$USERNAME@$REALM%$PASSWORD" if [ x"$TYPE" = x"member" ]; then EXPFAIL="NT_STATUS_LOGON_FAILURE" # rpcclient doesn't handle -Uuser@domain yet - #test_rpcclient_expect_failure_grep "Fail04 rpcclient getusername with $CREDS" getusername "$SERVER" "$EXPFAIL" -U$CREDS && failed=`expr $failed + 1` + #test_rpcclient_expect_failure_grep "Fail04 rpcclient getusername with $CREDS" getusername "$SERVER" "$EXPFAIL" -U$CREDS || failed=`expr $failed + 1` test_smbclient_expect_failure "Fail04 smbclient with $CREDS" 'ls' "$unc" -U$CREDS || failed=$(expr $failed + 1) # winbindd doesn't handle user@domain yet #testit_expect_failure "Fail04 wbinfo -a with $WBCREDS" $VALGRIND $wbinfo -a $WBCREDS || failed=`expr $failed + 1` @@ -120,7 +120,7 @@ test_rpcclient_expect_failure_grep "Test05 rpcclient lookupnames with $DNAME" "l CREDS="$TRUST_DOMAIN\\$USERNAME%$PASSWORD" WBCREDS="$TRUST_DOMAIN/$USERNAME%$PASSWORD" EXPFAIL="$TRUST_ERROR" -test_rpcclient_expect_failure_grep "Fail06 rpcclient getusername with $CREDS" getusername "$SERVER" "$EXPFAIL" -U$CREDS && failed=$(expr $failed + 1) +test_rpcclient_expect_failure_grep "Fail06 rpcclient getusername with $CREDS" getusername "$SERVER" "$EXPFAIL" -U$CREDS || failed=$(expr $failed + 1) test_smbclient_expect_failure "Fail06 smbclient with $CREDS" 'ls' "$unc" -U$CREDS || failed=$(expr $failed + 1) testit_expect_failure "Fail06 wbinfo -a with $WBCREDS" $VALGRIND $wbinfo -a $WBCREDS || failed=$(expr $failed + 1) @@ -160,7 +160,7 @@ if [ x"$TRUST_REALM" = x"$TRUST_DOMAIN" ]; then # NT4 domain EXPFAIL="NT_STATUS_LOGON_FAILURE" # rpcclient doesn't handle -Uuser@domain yet - #test_rpcclient_expect_failure_grep "Fail09 rpcclient getusername with $CREDS" getusername "$SERVER" "$EXPFAIL" -U$CREDS && failed=`expr $failed + 1` + #test_rpcclient_expect_failure_grep "Fail09 rpcclient getusername with $CREDS" getusername "$SERVER" "$EXPFAIL" -U$CREDS || failed=`expr $failed + 1` test_smbclient_expect_failure "Fail09 smbclient with $CREDS" 'ls' "$unc" -U$CREDS || failed=$(expr $failed + 1) # winbindd doesn't handle user@domain yet #testit_expect_failure "Fail09 wbinfo -a with $WBCREDS" $VALGRIND $wbinfo -a $WBCREDS || failed=`expr $failed + 1` @@ -179,7 +179,7 @@ if [ x"$TRUST_REALM" = x"$TRUST_DOMAIN" ]; then # NT4 domain EXPFAIL="NT_STATUS_LOGON_FAILURE" # rpcclient doesn't handle -Uuser@domain yet - #test_rpcclient_expect_failure_grep "Fail10 rpcclient getusername with $CREDS" getusername "$SERVER" "$EXPFAIL" -U$CREDS && failed=`expr $failed + 1` + #test_rpcclient_expect_failure_grep "Fail10 rpcclient getusername with $CREDS" getusername "$SERVER" "$EXPFAIL" -U$CREDS || failed=`expr $failed + 1` test_smbclient_expect_failure "Fail10 smbclient with $CREDS" 'ls' "$unc" -U$CREDS || failed=$(expr $failed + 1) # winbindd doesn't handle user@domain yet #testit_expect_failure "Fail10 wbinfo -a with $WBCREDS" $VALGRIND $wbinfo -a $WBCREDS || failed=`expr $failed + 1`