Skip to content

Commit

Permalink
testprogs: Add a common test_smbclient_expect_failure() function
Browse files Browse the repository at this point in the history
Signed-off-by: Andreas Schneider <[email protected]>
Reviewed-by: Jeremy Allison <[email protected]>
  • Loading branch information
cryptomilk authored and jrasamba committed Sep 11, 2016
1 parent b3e324a commit 4899ece
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions testprogs/blackbox/common_test_fns.inc
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,21 @@ test_smbclient() {
fi
return $status
}

test_smbclient_expect_failure() {
name="$1"
cmd="$2"
unc="$3"
shift
shift
shift
echo "test: $name"
$VALGRIND $smbclient $CONFIGURATION "$unc" -c "$cmd" $@
status=$?
if [ x$status = x0 ]; then
echo "failure: $name"
else
echo "success: $name"
fi
return $status
}

0 comments on commit 4899ece

Please sign in to comment.