^samba3.blackbox.smbclient_s3.SMB3.*.creating.a.bad.symlink.and.deleting.it
+^samba3.blackbox.smbclient_s3.*.smbclient output goes to stderr when -E is passed
^samba3.blackbox.acl_xattr.SMB3.nt_affects_posix
^samba3.blackbox.acl_xattr.SMB3.nt_affects_chown
^samba3.blackbox.acl_xattr.SMB3.nt_affects_chgrp
return 0
}
+test_smbclient_minus_e_stderr()
+{
+ cmd='$SMBCLIENT "$@" -U$USERNAME%$PASSWORD //$SERVER/tmp -c ls'
+ eval echo "$cmd"
+ out=`eval $cmd`
+ if [ $? != 0 ] ; then
+ echo "$out"
+ echo "command failed"
+ return 1
+ fi
+
+ # test smbclient 'ls' command output went to stdout
+ echo "$out" | grep "blocks available" >/dev/null 2>&1
+ if [ $? != 0 ] ; then
+ # didn't get output to stdout
+ echo "expected output was NOT output to stdout"
+ return 1
+ fi
+
+ # this time execute ls but redirect stdout alone to /dev/null
+ cmd='$SMBCLIENT -E "$@" -U$USERNAME%$PASSWORD //$SERVER/tmp -c "ls" 2>&1 > /dev/null'
+ eval echo "$cmd"
+ out=`eval $cmd`
+ if [ $? != 0 ] ; then
+ echo "$out"
+ echo "command failed"
+ return 1
+ fi
+
+ # test smbclient 'ls' command output went to stderr
+ echo "$out" | grep "blocks available" >/dev/null 2>&1
+ if [ $? != 0 ] ; then
+ # didn't get output to stderr
+ echo "expected output was NOT output to stderr"
+ return 1
+ fi
+
+ return 0
+
+}
+
#
#
LOGDIR_PREFIX=test_smbclient_s3
test_noninteractive_no_prompt -l $LOGDIR || \
failed=`expr $failed + 1`
+testit "smbclient output goes to stderr when -E is passed" \
+ test_smbclient_minus_e_stderr || \
+ failed=`expr $failed + 1`
+
testit "interactive smbclient prompts on stdout" \
test_interactive_prompt_stdout || \
failed=`expr $failed + 1`