svn commit: samba r9618 - in branches/SAMBA_3_0/source/script/tests: .

jerry at samba.org jerry at samba.org
Thu Aug 25 17:15:24 GMT 2005


Author: jerry
Date: 2005-08-25 17:15:23 +0000 (Thu, 25 Aug 2005)
New Revision: 9618

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=9618

Log:
adding get/put tests from Don Watson
Modified:
   branches/SAMBA_3_0/source/script/tests/functions
   branches/SAMBA_3_0/source/script/tests/t_001.sh


Changeset:
Modified: branches/SAMBA_3_0/source/script/tests/functions
===================================================================
--- branches/SAMBA_3_0/source/script/tests/functions	2005-08-25 16:51:43 UTC (rev 9617)
+++ branches/SAMBA_3_0/source/script/tests/functions	2005-08-25 17:15:23 UTC (rev 9618)
@@ -43,9 +43,18 @@
 	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()
 {

Modified: branches/SAMBA_3_0/source/script/tests/t_001.sh
===================================================================
--- branches/SAMBA_3_0/source/script/tests/t_001.sh	2005-08-25 16:51:43 UTC (rev 9617)
+++ branches/SAMBA_3_0/source/script/tests/t_001.sh	2005-08-25 17:15:23 UTC (rev 9618)
@@ -22,9 +22,27 @@
 
 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



More information about the samba-cvs mailing list