summaryrefslogtreecommitdiff
path: root/testsuite/server
diff options
context:
space:
mode:
authorTim Potter <tpot@samba.org>2000-05-24 06:40:11 +0000
committerTim Potter <tpot@samba.org>2000-05-24 06:40:11 +0000
commit5711e0af18426bfb515311a50154b1242f0dd638 (patch)
tree832e03712aca8869585c2a8cf99624b5a3111dc2 /testsuite/server
parentb0953a35959c70f2a9a55149732daa77cf3e5235 (diff)
downloadsamba-5711e0af18426bfb515311a50154b1242f0dd638.tar.gz
samba-5711e0af18426bfb515311a50154b1242f0dd638.tar.bz2
samba-5711e0af18426bfb515311a50154b1242f0dd638.zip
Test transfer of large random file w/o corruption.
(This used to be commit a9790f19612513b667c348d628ab3bf88ec1178e)
Diffstat (limited to 'testsuite/server')
-rw-r--r--testsuite/server/xfer.exp48
1 files changed, 48 insertions, 0 deletions
diff --git a/testsuite/server/xfer.exp b/testsuite/server/xfer.exp
new file mode 100644
index 0000000000..6d00b29885
--- /dev/null
+++ b/testsuite/server/xfer.exp
@@ -0,0 +1,48 @@
+#
+# Test file transfer
+#
+
+# Initialisation
+
+load_lib util-defs.exp
+load_lib smbclient.exp
+load_lib env-single.exp
+
+set timeout 60
+
+# Spawn a connection
+
+if {![spawn_smbclient //$server/$share -U $user]} {
+ perror "error spawning smbclient"
+ return -1
+}
+
+# Create a big file, store it and fetch it again
+
+foreach { op } { "!dd if=/dev/urandom of=/tmp/file bs=1048576 count=1\r" \
+ "lcd /tmp\r" "put file\r" "get file /tmp/file2\r" } {
+
+ set action "doing $op"
+ set output [do_smbclient $op $action]
+
+ if {[regexp "ERR" $output]} {
+ error $action
+ puts $output
+ return -1
+ }
+}
+
+# Compare the two files
+
+set output [util_start "diff" "/tmp/file /tmp/file2" ""]
+
+if {[regexp "differ" $output]} {
+ fail "xfertest"
+ puts $output
+} else {
+ pass "xfertest"
+}
+
+# Clean up temporary files
+
+file delete /tmp/file /tmp/file2