diff options
Diffstat (limited to 'testprogs/blackbox/test_smbclient.sh')
-rwxr-xr-x | testprogs/blackbox/test_smbclient.sh | 43 |
1 files changed, 27 insertions, 16 deletions
diff --git a/testprogs/blackbox/test_smbclient.sh b/testprogs/blackbox/test_smbclient.sh index a803d83363..d2c5c675e2 100755 --- a/testprogs/blackbox/test_smbclient.sh +++ b/testprogs/blackbox/test_smbclient.sh @@ -21,20 +21,7 @@ failed=0 samba4bindir=`dirname $0`/../../source/bin smbclient=$samba4bindir/smbclient -testit() { - name="$1" - shift - cmdline="$*" - echo "test: $name" - $cmdline - status=$? - if [ x$status = x0 ]; then - echo "success: $name" - else - echo "failure: $name" - fi - return $status -} +. `dirname $0`/subunit.sh runcmd() { name="$1" @@ -86,11 +73,29 @@ testit "Comparing files" diff tmpfile-old tmpfile || failed=`expr $failed + 1` runcmd "Creating directory, Changing directory, Going back" 'mkdir bla; cd bla; cd ..; rmdir bla' || failed=`expr $failed + 1` # enable recurse, create nested directory runcmd "Creating nested directory" 'mkdir bla/bloe' || failed=`expr $failed + 1` -# remove parent directory -runcmd "Removing directory" 'rmdir bla/bloe' || failed=`expr $failed + 1` # remove child directory +runcmd "Removing directory" 'rmdir bla/bloe' || failed=`expr $failed + 1` +# remove parent directory runcmd "Removing directory" 'rmdir bla'|| failed=`expr $failed + 1` +# enable recurse, create nested directory +runcmd "Creating nested directory" 'mkdir bla' || failed=`expr $failed + 1` +# rename bla to bla2 +runcmd "rename of nested directory" 'rename bla bla2' || failed=`expr $failed + 1` +# deltree +runcmd "deltree of nested directory" 'deltree bla2' || failed=`expr $failed + 1` # run fsinfo +runcmd "Getting file system info" 'fsinfo allocation'|| failed=`expr $failed + 1` +runcmd "Getting file system info" 'fsinfo volume'|| failed=`expr $failed + 1` +runcmd "Getting file system info" 'fsinfo volumeinfo'|| failed=`expr $failed + 1` +runcmd "Getting file system info" 'fsinfo sizeinfo'|| failed=`expr $failed + 1` +runcmd "Getting file system info" 'fsinfo deviceinfo'|| failed=`expr $failed + 1` +runcmd "Getting file system info" 'fsinfo attributeinfo'|| failed=`expr $failed + 1` +runcmd "Getting file system info" 'fsinfo volume-information'|| failed=`expr $failed + 1` +runcmd "Getting file system info" 'fsinfo size-information'|| failed=`expr $failed + 1` +runcmd "Getting file system info" 'fsinfo device-information'|| failed=`expr $failed + 1` +runcmd "Getting file system info" 'fsinfo attribute-information'|| failed=`expr $failed + 1` +runcmd "Getting file system info" 'fsinfo quota-information'|| failed=`expr $failed + 1` +runcmd "Getting file system info" 'fsinfo fullsize-information'|| failed=`expr $failed + 1` runcmd "Getting file system info" 'fsinfo objectid'|| failed=`expr $failed + 1` # put that file @@ -98,6 +103,7 @@ runcmd "Putting file" 'put tmpfile'|| failed=`expr $failed + 1` # get that file mv tmpfile tmpfile-old runcmd "Getting file" 'get tmpfile'|| failed=`expr $failed + 1` +runcmd "Getting file EA info" 'eainfo tmpfile'|| failed=`expr $failed + 1` # remove that file runcmd "Removing file" 'rm tmpfile' || failed=`expr $failed + 1` # compare locally @@ -111,6 +117,11 @@ testit "Comparing files" diff tmpfilex tmpfile || failed=`expr $failed + 1` # remove that file runcmd "Removing file" 'rm tmpfilex'|| failed=`expr $failed + 1` +runcmd "Lookup name" "lookup $DOMAIN\\$USERNAME" || failed=`expr $failed + 1` + +#Fails unless there are privilages +#runcmd "Lookup privs of name" "privileges $DOMAIN\\$USERNAME" || failed=`expr $failed + 1` + # do some simple operations using old protocol versions runcmd "List directory with LANMAN1" 'ls' -m LANMAN1 || failed=`expr $failed + 1` runcmd "List directory with LANMAN2" 'ls' -m LANMAN2 || failed=`expr $failed + 1` |