3 # this runs the file serving tests that are expected to pass with samba3
7 Usage: test_smbclient_s3.sh SERVER SERVER_IP
14 SMBCLIENT
="$VALGRIND ${SMBCLIENT:-$BINDIR/smbclient} $CONFIGURATION"
19 .
$incdir/test_functions.sh
23 # Test that a noninteractive smbclient does not prompt
24 test_noninteractive_no_prompt
()
29 $SMBCLIENT $CONFIGURATION "$@" -U$USERNAME%$PASSWORD //$SERVER/tmp
-I SERVER_IP
$ADDARGS 2>&1 | \
33 # got a prompt .. fail
34 echo matched interactive prompt
in non-interactive mode
41 # Test that an interactive smbclient prompts to stdout
42 test_interactive_prompt_stdout
()
45 tmpfile
=/tmp
/smbclient.
in.$$
52 CLI_FORCE_INTERACTIVE
=yes \
53 $SMBCLIENT $CONFIGURATION "$@" -U$USERNAME%$PASSWORD //$SERVER/tmp
-I $SERVER_IP \
54 $ADDARGS < $tmpfile 2>/dev
/null | \
58 # got a prompt .. succeed
62 echo failed to match interactive prompt on stdout
68 testit
"smbclient -L $SERVER_IP" $SMBCLIENT $CONFIGURATION -L $SERVER_IP -N -p 139 || failed
=`expr $failed + 1`
69 testit
"smbclient -L $SERVER -I $SERVER_IP" $SMBCLIENT $CONFIGURATION -L $SERVER -I $SERVER_IP -N -p 139 || failed
=`expr $failed + 1`
71 testit
"noninteractive smbclient does not prompt" \
72 test_noninteractive_no_prompt || \
73 failed
=`expr $failed + 1`
75 testit
"noninteractive smbclient -l does not prompt" \
76 test_noninteractive_no_prompt
-l /tmp || \
77 failed
=`expr $failed + 1`
79 testit
"interactive smbclient prompts on stdout" \
80 test_interactive_prompt_stdout || \
81 failed
=`expr $failed + 1`
83 testit
"interactive smbclient -l prompts on stdout" \
84 test_interactive_prompt_stdout
-l /tmp || \
85 failed
=`expr $failed + 1`