diff options
author | Gerald Carter <jerry@samba.org> | 2005-08-25 17:15:23 +0000 |
---|---|---|
committer | Gerald Carter <jerry@samba.org> | 2005-08-25 17:15:23 +0000 |
commit | 049a7a17b14f1d456ce206b2d2e74220ee50b823 (patch) | |
tree | 000fe69e23e64afcb3e0b9f47250a945206b8cfa /source | |
parent | 65632db85b39207aed5cb5d17980ead344901567 (diff) | |
download | samba-049a7a17b14f1d456ce206b2d2e74220ee50b823.tar.gz samba-049a7a17b14f1d456ce206b2d2e74220ee50b823.tar.xz samba-049a7a17b14f1d456ce206b2d2e74220ee50b823.zip |
r9618: adding get/put tests from Don Watson
Diffstat (limited to 'source')
-rw-r--r-- | source/script/tests/functions | 11 | ||||
-rw-r--r-- | source/script/tests/t_001.sh | 22 |
2 files changed, 30 insertions, 3 deletions
diff --git a/source/script/tests/functions b/source/script/tests/functions index 13139f6d8ff..0981d9e29e1 100644 --- a/source/script/tests/functions +++ b/source/script/tests/functions @@ -43,9 +43,18 @@ stop_smbd() fi } +check_ret_value() +{ + ret=$@ + + if test $ret != 0; then + stop_smbd + exit $ret + fi +} ## -## start/stop smbd daemon +## start/stop nmbd daemon ## check_nmbd_running() { diff --git a/source/script/tests/t_001.sh b/source/script/tests/t_001.sh index 6d54d0e4895..7db2abe226e 100644 --- a/source/script/tests/t_001.sh +++ b/source/script/tests/t_001.sh @@ -22,9 +22,27 @@ chmod 1777 $PREFIX_ABS/tmp start_smbd || exit $? +## share enumeration + smbclient $CONFIGURATION -L localhost -N -p 139 -ret=$? +check_ret_value $? + +testfile=`echo $CONFIGURATION | awk '{print $2}'` +filename=`basename $testfile` +dirname=`dirname $testfile` + + +# file get/put + +smbclient //localhost/test $PASSWORD $CONFIGURATION -c "lcd $dirname; put $filename" +check_ret_value $? + +smbclient //localhost/test $PASSWORD $CONFIGURATION -c "get $filename; rm $filename" +check_ret_value $? + +diff $filename $testfile 2> /dev/null > /dev/null +check_ret_value $? stop_smbd +exit 0 -exit $ret |