summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorJames Peach <jpeach@samba.org>2006-06-16 04:44:59 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:17:31 -0500
commite0055ce8f5b496e7c3490577a68cf4a49e456456 (patch)
tree87695b335e7df01a80849d6f44de067364883759 /source3
parent0eb9bd176eb1f7f22d4c4bcdca95d2ea11b2b154 (diff)
downloadsamba-e0055ce8f5b496e7c3490577a68cf4a49e456456.tar.gz
samba-e0055ce8f5b496e7c3490577a68cf4a49e456456.tar.bz2
samba-e0055ce8f5b496e7c3490577a68cf4a49e456456.zip
r16289: Fix smbclient test hang. This is caused by readline refusing to believe
the end of file it receives when reading from a pipe after we force interactive mode. (This used to be commit 3eee12645883df21efa5175b10854a965fc90422)
Diffstat (limited to 'source3')
-rwxr-xr-xsource3/script/tests/test_smbclient_s3.sh14
1 files changed, 11 insertions, 3 deletions
diff --git a/source3/script/tests/test_smbclient_s3.sh b/source3/script/tests/test_smbclient_s3.sh
index 98b165e735..d95657467d 100755
--- a/source3/script/tests/test_smbclient_s3.sh
+++ b/source3/script/tests/test_smbclient_s3.sh
@@ -40,17 +40,25 @@ test_noninteractive_no_prompt()
test_interactive_prompt_stdout()
{
prompt="smb"
+ tmpfile=/tmp/smbclient.in.$$
- echo du | \
- CLI_FORCE_INTERACTIVE=yes \
- $SMBCLIENT "$@" -U$USERNAME%$PASSWORD //$SERVER/tmp 2>/dev/null | \
+ cat > $tmpfile <<EOF
+du
+quit
+EOF
+
+ CLI_FORCE_INTERACTIVE=yes \
+ $SMBCLIENT "$@" -U$USERNAME%$PASSWORD //$SERVER/tmp \
+ < $tmpfile 2>/dev/null | \
grep $prompt
if [ $? = 0 ] ; then
# got a prompt .. succeed
+ rm -f $tmpfile
true
else
echo failed to match interactive prompt on stdout
+ rm -f $tmpfile
false
fi
}