r18857: Re-enable the CC checks from libreplace after Tridge's fix. Thanks for that!
[Samba.git] / testsuite / server / xfer.exp
blob6d00b29885c29e722c124928fd412a230199c1b1
2 # Test file transfer
5 # Initialisation
7 load_lib util-defs.exp
8 load_lib smbclient.exp
9 load_lib env-single.exp
11 set timeout 60
13 # Spawn a connection
15 if {![spawn_smbclient //$server/$share -U $user]} {
16 perror "error spawning smbclient"
17 return -1
20 # Create a big file, store it and fetch it again
22 foreach { op } { "!dd if=/dev/urandom of=/tmp/file bs=1048576 count=1\r" \
23 "lcd /tmp\r" "put file\r" "get file /tmp/file2\r" } {
25 set action "doing $op"
26 set output [do_smbclient $op $action]
28 if {[regexp "ERR" $output]} {
29 error $action
30 puts $output
31 return -1
35 # Compare the two files
37 set output [util_start "diff" "/tmp/file /tmp/file2" ""]
39 if {[regexp "differ" $output]} {
40 fail "xfertest"
41 puts $output
42 } else {
43 pass "xfertest"
46 # Clean up temporary files
48 file delete /tmp/file /tmp/file2