Author: jelmer
Date: 2007-01-14 01:39:34 +0000 (Sun, 14 Jan 2007)
New Revision: 20747

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

Log:
Move cifsdd to blackbox section
Added:
   branches/SAMBA_4_0/testprogs/blackbox/test_cifsdd.sh
Removed:
   branches/SAMBA_4_0/source/script/tests/test_cifsdd.sh
Modified:
   branches/SAMBA_4_0/source/script/tests/tests_all.sh


Changeset:
Deleted: branches/SAMBA_4_0/source/script/tests/test_cifsdd.sh
===================================================================
--- branches/SAMBA_4_0/source/script/tests/test_cifsdd.sh       2007-01-14 
01:33:16 UTC (rev 20746)
+++ branches/SAMBA_4_0/source/script/tests/test_cifsdd.sh       2007-01-14 
01:39:34 UTC (rev 20747)
@@ -1,79 +0,0 @@
-#!/bin/sh
-
-# Basic script to make sure that cifsdd can do both local and remote I/O.
-
-if [ $# -lt 4 ]; then
-cat <<EOF
-Usage: test_cifsdd.sh SERVER USERNAME PASSWORD DOMAIN
-EOF
-exit 1;
-fi
-
-SERVER=$1
-USERNAME=$2
-PASSWORD=$3
-DOMAIN=$4
-
-DD=bin/cifsdd
-
-SHARE=tmp
-DEBUGLEVEL=1
-
-failed=0
-
-failtest() {
-       failed=`expr $failed + 1`
-}
-
-runcopy() {
-       message="$1"
-       shift
-       
-       testit "$message" $VALGRIND $DD $CONFIGURATION --debuglevel=$DEBUGLEVEL 
-W "$DOMAIN" -U "$USERNAME"%"$PASSWORD" \
-           "$@"
-}
-
-compare() {
-    cmp "$1" "$2"
-}
-
-incdir=`dirname $0`
-. $incdir/test_functions.sh
-
-sourcepath=tempfile.src.$$
-destpath=tempfile.dst.$$
-
-# Create a source file with arbitrary contents
-dd if=$DD of=$sourcepath bs=1024 count=50 > /dev/null
-
-ls -l $sourcepath
-
-for bs in 512 4k 48k ; do
-
-echo "Testing $bs block size ..."
-
-# Check whether we can do local IO
-runcopy "Testing local -> local copy" if=$sourcepath of=$destpath bs=$bs || 
failtest
-compare $sourcepath $destpath || failtest
-
-# Check whether we can do a round trip
-runcopy "Testing local -> remote copy" \
-           if=$sourcepath of=//$SERVER/$SHARE/$sourcepath bs=$bs || failtest
-runcopy "Testing remote -> local copy" \
-           if=//$SERVER/$SHARE/$sourcepath of=$destpath bs=$bs || failtest
-compare $sourcepath $destpath || failtest
-
-# Check that copying within the remote server works
-runcopy "Testing local -> remote copy" \
-           if=//$SERVER/$SHARE/$sourcepath of=//$SERVER/$SHARE/$sourcepath 
bs=$bs || failtest
-runcopy "Testing remote -> remote copy" \
-           if=//$SERVER/$SHARE/$sourcepath of=//$SERVER/$SHARE/$destpath 
bs=$bs || failtest
-runcopy "Testing remote -> local copy" \
-           if=//$SERVER/$SHARE/$destpath of=$destpath bs=$bs || failtest
-compare $sourcepath $destpath || failtest
-
-done
-
-rm -f $sourcepath $destpath
-
-testok $0 $failed

Modified: branches/SAMBA_4_0/source/script/tests/tests_all.sh
===================================================================
--- branches/SAMBA_4_0/source/script/tests/tests_all.sh 2007-01-14 01:33:16 UTC 
(rev 20746)
+++ branches/SAMBA_4_0/source/script/tests/tests_all.sh 2007-01-14 01:39:34 UTC 
(rev 20747)
@@ -10,7 +10,6 @@
  $SRCDIR/script/tests/test_echo.sh $SERVER $USERNAME $PASSWORD $DOMAIN || 
totalfailed=`expr $totalfailed + $?`
  $SRCDIR/script/tests/test_posix.sh //$SERVER/tmp $USERNAME $PASSWORD "" || 
totalfailed=`expr $totalfailed + $?`
  $SRCDIR/script/tests/test_local.sh || totalfailed=`expr $totalfailed + $?`
- $SRCDIR/script/tests/test_pidl.sh || totalfailed=`expr $totalfailed + $?`
  $SRCDIR/script/tests/test_blackbox.sh $SERVER $USERNAME $PASSWORD $DOMAIN 
$PREFIX || totalfailed=`expr $totalfailed + $?`
- $SRCDIR/script/tests/test_cifsdd.sh $SERVER $USERNAME $PASSWORD $DOMAIN || 
totalfailed=`expr $totalfailed + $?`
+ $SRCDIR/script/tests/test_pidl.sh || totalfailed=`expr $totalfailed + $?`
  $SRCDIR/script/tests/test_simple.sh //$SERVER/simple $USERNAME $PASSWORD "" 
|| totalfailed=`expr $totalfailed + $?`

Copied: branches/SAMBA_4_0/testprogs/blackbox/test_cifsdd.sh (from rev 20745, 
branches/SAMBA_4_0/source/script/tests/test_cifsdd.sh)
===================================================================
--- branches/SAMBA_4_0/source/script/tests/test_cifsdd.sh       2007-01-14 
00:08:31 UTC (rev 20745)
+++ branches/SAMBA_4_0/testprogs/blackbox/test_cifsdd.sh        2007-01-14 
01:39:34 UTC (rev 20747)
@@ -0,0 +1,90 @@
+#!/bin/sh
+
+# Basic script to make sure that cifsdd can do both local and remote I/O.
+
+if [ $# -lt 4 ]; then
+cat <<EOF
+Usage: test_cifsdd.sh SERVER USERNAME PASSWORD DOMAIN
+EOF
+exit 1;
+fi
+
+SERVER=$1
+USERNAME=$2
+PASSWORD=$3
+DOMAIN=$4
+
+DD=bin/cifsdd
+
+SHARE=tmp
+DEBUGLEVEL=1
+
+failed=0
+
+testit() {
+       name="$1"
+       shift
+       cmdline="$*"
+       echo "test: $name"
+       $cmdline
+       status=$?
+       if [ x$status = x0 ]; then
+               echo "success: $name"
+       else
+               echo "failure: $name"
+               failed=`expr $failed + 1`
+       fi
+       return $status
+}
+
+
+
+runcopy() {
+       message="$1"
+       shift
+       
+       testit "$message" $VALGRIND $DD $CONFIGURATION --debuglevel=$DEBUGLEVEL 
-W "$DOMAIN" -U "$USERNAME"%"$PASSWORD" \
+           "$@"
+}
+
+compare() {
+    tesit "$1" cmp "$2" "$3"
+}
+
+sourcepath=tempfile.src.$$
+destpath=tempfile.dst.$$
+
+# Create a source file with arbitrary contents
+dd if=$DD of=$sourcepath bs=1024 count=50 > /dev/null
+
+ls -l $sourcepath
+
+for bs in 512 4k 48k ; do
+
+echo "Testing $bs block size ..."
+
+# Check whether we can do local IO
+runcopy "Testing local -> local copy" if=$sourcepath of=$destpath bs=$bs
+compare "Checking local differences" $sourcepath $destpath
+
+# Check whether we can do a round trip
+runcopy "Testing local -> remote copy" \
+           if=$sourcepath of=//$SERVER/$SHARE/$sourcepath bs=$bs 
+runcopy "Testing remote -> local copy" \
+           if=//$SERVER/$SHARE/$sourcepath of=$destpath bs=$bs 
+compare "Checking differences" $sourcepath $destpath 
+
+# Check that copying within the remote server works
+runcopy "Testing local -> remote copy" \
+           if=//$SERVER/$SHARE/$sourcepath of=//$SERVER/$SHARE/$sourcepath 
bs=$bs
+runcopy "Testing remote -> remote copy" \
+           if=//$SERVER/$SHARE/$sourcepath of=//$SERVER/$SHARE/$destpath 
bs=$bs 
+runcopy "Testing remote -> local copy" \
+           if=//$SERVER/$SHARE/$destpath of=$destpath bs=$bs
+compare "Checking differences" $sourcepath $destpath
+
+done
+
+rm -f $sourcepath $destpath
+
+exit $failed

Reply via email to