From e0055ce8f5b496e7c3490577a68cf4a49e456456 Mon Sep 17 00:00:00 2001 From: James Peach Date: Fri, 16 Jun 2006 04:44:59 +0000 Subject: 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) --- source3/script/tests/test_smbclient_s3.sh | 14 +++++++++++--- 1 file 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 </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 } -- cgit