9
load_lib env-single.exp
15
if {![spawn_smbclient //$server/$share -U $user]} {
16
perror "error spawning smbclient"
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]} {
35
# Compare the two files
37
set output [util_start "diff" "/tmp/file /tmp/file2" ""]
39
if {[regexp "differ" $output]} {
46
# Clean up temporary files
48
file delete /tmp/file /tmp/file2