summaryrefslogtreecommitdiff
path: root/source3/script/tests
diff options
context:
space:
mode:
Diffstat (limited to 'source3/script/tests')
-rwxr-xr-xsource3/script/tests/dlopen.sh2
-rwxr-xr-xsource3/script/tests/selftest.sh27
-rwxr-xr-xsource3/script/tests/test_local_s3.sh17
-rwxr-xr-xsource3/script/tests/test_posix_s3.sh24
-rwxr-xr-xsource3/script/tests/test_smbclient_s3.sh45
-rwxr-xr-xsource3/script/tests/test_smbtorture_s3.sh12
-rwxr-xr-xsource3/script/tests/test_wbinfo_s3.sh2
7 files changed, 21 insertions, 108 deletions
diff --git a/source3/script/tests/dlopen.sh b/source3/script/tests/dlopen.sh
index 6412bc5fcd..edf44719d3 100755
--- a/source3/script/tests/dlopen.sh
+++ b/source3/script/tests/dlopen.sh
@@ -67,7 +67,7 @@ for arg in $@ ; do
esac
done
-${CC:-gcc} $RPM_OPT_FLAGS $CFLAGS -o $tempdir/dlopen $cflags $tempdir/dlopen.c $ldflags
+${CC:-gcc} $RPM_OPT_FLAGS $CFLAGS -o $tempdir/dlopen $cflags $tempdir/dlopen.c $ldflags -ldl
retval=0
for module in $modules ; do
diff --git a/source3/script/tests/selftest.sh b/source3/script/tests/selftest.sh
index c952ef2029..b0de877ab9 100755
--- a/source3/script/tests/selftest.sh
+++ b/source3/script/tests/selftest.sh
@@ -57,15 +57,7 @@ export TORTURE_MAXTIME
WORKGROUP=SAMBA-TEST
SERVER=localhost2
SERVER_IP=127.0.0.2
-if [ ! "x$USER" = "x" ]; then
- USERNAME=$USER
-else
- if [ ! "x$LOGNAME" = "x" ]; then
- USERNAME=$LOGNAME
- else
- USERNAME=`PATH=/usr/ucb:$PATH whoami || id -un`
- fi
-fi
+USERNAME=`PATH=/usr/ucb:$PATH whoami`
USERID=`PATH=/usr/ucb:$PATH id | cut -d ' ' -f1 | sed -e 's/uid=\([0-9]*\).*/\1/g'`
GROUPID=`PATH=/usr/ucb:$PATH id | cut -d ' ' -f2 | sed -e 's/gid=\([0-9]*\).*/\1/g'`
PASSWORD=test
@@ -89,7 +81,6 @@ NSS_WRAPPER_PASSWD="$PRIVATEDIR/passwd"
NSS_WRAPPER_GROUP="$PRIVATEDIR/group"
WINBINDD_SOCKET_DIR=$PREFIX_ABS/winbindd
WINBINDD_PRIV_PIPE_DIR=$LOCKDIR/winbindd_privileged
-TEST_DIRECTORY=$DIRECTORY
export PREFIX PREFIX_ABS
export CONFIGURATION CONFFILE SAMBA4CONFIGURATION SAMBA4CONFFILE
@@ -100,7 +91,6 @@ export USERNAME PASSWORD
export WORKGROUP SERVER SERVER_IP
export NSS_WRAPPER_PASSWD NSS_WRAPPER_GROUP
export WINBINDD_SOCKET_DIR WINBINDD_PRIV_PIPE_DIR
-export TEST_DIRECTORY
PATH=bin:$PATH
export PATH
@@ -249,13 +239,10 @@ cat >$SERVERCONFFILE<<EOF
read only = no
smbd:sharedelay = 100000
-# smbd:writetimeupdatedelay = 500000
- map hidden = no
- map system = no
- map readonly = no
- store dos attributes = yes
+ smbd:writetimeupdatedelay = 500000
+ map hidden = yes
+ map system = yes
create mask = 755
- store create time = yes
vfs objects = $BINDIR/xattr_tdb.so $BINDIR/streams_depot.so
#Include user defined custom parameters if set
@@ -266,9 +253,6 @@ cat >$SERVERCONFFILE<<EOF
[hideunread]
copy = tmp
hide unreadable = yes
-[tmpcase]
- copy = tmp
- case sensitive = yes
[hideunwrite]
copy = tmp
hide unwriteable files = yes
@@ -305,7 +289,6 @@ EOF
cat >$NSS_WRAPPER_GROUP<<EOF
nobody:x:65533:
nogroup:x:65534:nobody
-root:x:65532:
$USERNAME-group:x:$GROUPID:
EOF
@@ -313,7 +296,7 @@ MAKE_TEST_BINARY="bin/smbpasswd"
export MAKE_TEST_BINARY
(echo $PASSWORD; echo $PASSWORD) | \
- bin/smbpasswd -c $SERVERCONFFILE -L -s -a $USERNAME >/dev/null || exit 1
+ bin/smbpasswd -c $CONFFILE -L -s -a $USERNAME >/dev/null || exit 1
echo "DONE";
diff --git a/source3/script/tests/test_local_s3.sh b/source3/script/tests/test_local_s3.sh
index 0c94871ba5..79e48483ef 100755
--- a/source3/script/tests/test_local_s3.sh
+++ b/source3/script/tests/test_local_s3.sh
@@ -16,23 +16,16 @@ incdir=`dirname $0`
failed=0
-
-if test -x bin/talloctort ; then
+test -x $BINDIR/talloctort && {
testit "talloctort" $VALGRIND $BINDIR/talloctort || \
- failed=`expr $failed + 1`
-else
- echo "Skipping talloctort"
-fi
+ failed=`expr $failed + 1`
+}
testit "replacetort" $VALGRIND $BINDIR/replacetort || \
failed=`expr $failed + 1`
-if test -x bin/tdbtorture ; then
- testit "tdbtorture" $VALGRIND $BINDIR/tdbtorture || \
- failed=`expr $failed + 1`
-else
- echo "Skipping tdbtorture"
-fi
+testit "tdbtorture" $VALGRIND $BINDIR/tdbtorture || \
+ failed=`expr $failed + 1`
testit "smbconftort" $VALGRIND $BINDIR/smbconftort $CONFIGURATION || \
failed=`expr $failed + 1`
diff --git a/source3/script/tests/test_posix_s3.sh b/source3/script/tests/test_posix_s3.sh
index 84072f9932..04d0eeb85b 100755
--- a/source3/script/tests/test_posix_s3.sh
+++ b/source3/script/tests/test_posix_s3.sh
@@ -38,26 +38,20 @@ raw="$raw RAW-SAMBA3CASEINSENSITIVE RAW-SAMBA3POSIXTIMEDLOCK"
raw="$raw RAW-SAMBA3ROOTDIRFID"
rpc="RPC-AUTHCONTEXT RPC-BINDSAMBA3 RPC-SAMBA3-SRVSVC RPC-SAMBA3-SHARESEC"
-rpc="$rpc RPC-SAMBA3-SPOOLSS RPC-SAMBA3-WKSSVC RPC-SAMBA3-WINREG"
+rpc="$rpc RPC-SAMBA3-SPOOLSS RPC-SAMBA3-WKSSVC"
rpc="$rpc RPC-NETLOGSAMBA3 RPC-SAMBA3SESSIONKEY RPC-SAMBA3-GETUSERNAME"
rpc="$rpc RPC-SVCCTL RPC-SPOOLSS RPC-SPOOLSS-WIN RPC-NTSVCS"
rpc="$rpc RPC-LSA-GETUSER RPC-LSA-LOOKUPSIDS RPC-LSA-LOOKUPNAMES"
-rpc="$rpc RPC-LSA-PRIVILEGES "
-rpc="$rpc RPC-SAMR RPC-SAMR-USERS RPC-SAMR-USERS-PRIVILEGES RPC-SAMR-PASSWORDS"
+rpc="$rpc RPC-SAMR-USERS RPC-SAMR-USERS-PRIVILEGES RPC-SAMR-PASSWORDS"
rpc="$rpc RPC-SAMR-PASSWORDS-PWDLASTSET RPC-SAMR-LARGE-DC RPC-SAMR-MACHINE-AUTH"
-rpc="$rpc RPC-NETLOGON-S3 RPC-NETLOGON-ADMIN"
rpc="$rpc RPC-SCHANNEL RPC-SCHANNEL2 RPC-BENCH-SCHANNEL1 RPC-JOIN"
-local="LOCAL-NSS-WRAPPER LOCAL-NDR"
-
-winbind="WINBIND-WBCLIENT"
-
# NOTE: to enable the UNIX-WHOAMI test, we need to change the default share
# config to allow guest access. I'm not sure whether this would break other
# tests, so leaving it alone for now -- jpeach
unix="UNIX-INFO2"
-tests="$base $raw $rpc $unix $local $winbind"
+tests="$base $raw $rpc $unix"
if test "x$POSIX_SUBTESTS" != "x" ; then
tests="$POSIX_SUBTESTS"
@@ -72,7 +66,7 @@ skipped="$skipped RAW-SFILEINFO"
echo "WARNING: Skipping tests $skipped"
ADDARGS="$ADDARGS --option=torture:sharedelay=100000"
-#ADDARGS="$ADDARGS --option=torture:writetimeupdatedelay=500000"
+ADDARGS="$ADDARGS --option=torture:writetimeupdatedelay=500000"
failed=0
for t in $tests; do
@@ -91,15 +85,7 @@ for t in $tests; do
fi
start=""
name="$t"
- if [ "$t" = "BASE-DELAYWRITE" ]; then
- testit "$name" $VALGRIND $SMBTORTURE4 $TORTURE4_OPTIONS --maximum-runtime=900 $ADDARGS $unc -U"$username"%"$password" $t || failed=`expr $failed + 1`
- else
- testit "$name" $VALGRIND $SMBTORTURE4 $TORTURE4_OPTIONS $ADDARGS $unc -U"$username"%"$password" $t || failed=`expr $failed + 1`
- fi
- if [ "$t" = "RAW-CHKPATH" ]; then
- echo "Testing with case sensitive"
- testit "$name" $VALGRIND $SMBTORTURE4 $TORTURE4_OPTIONS $ADDARGS "$unc"case -U"$username"%"$password" $t || failed=`expr $failed + 1`
- fi
+ testit "$name" $VALGRIND $SMBTORTURE4 $TORTURE4_OPTIONS $ADDARGS $unc -U"$username"%"$password" $t || failed=`expr $failed + 1`
done
testok $0 $failed
diff --git a/source3/script/tests/test_smbclient_s3.sh b/source3/script/tests/test_smbclient_s3.sh
index ff5022015f..f60c7d7c0b 100755
--- a/source3/script/tests/test_smbclient_s3.sh
+++ b/source3/script/tests/test_smbclient_s3.sh
@@ -86,47 +86,6 @@ EOF
fi
}
-# Test creating a bad symlink and deleting it.
-test_bad_symlink()
-{
- prompt="posix_unlink deleted file /newname"
- tmpfile=/tmp/smbclient.in.$$
-
- cat > $tmpfile <<EOF
-posix
-posix_unlink newname
-symlink badname newname
-posix_unlink newname
-quit
-EOF
-
- cmd='CLI_FORCE_INTERACTIVE=yes $SMBCLIENT $CONFIGURATION "$@" -U$USERNAME%$PASSWORD //$SERVER/tmp -I $SERVER_IP $ADDARGS < $tmpfile 2>&1'
- eval echo "$cmd"
- out=`eval $cmd`
- ret=$?
- rm -f $tmpfile
-
- if [ $ret != 0 ] ; then
- echo "$out"
- echo "failed create then delete bad symlink with error $ret"
- false
- return
- fi
-
- echo "$out" | grep "$prompt" >/dev/null 2>&1
-
- ret=$?
- if [ $ret = 0 ] ; then
- # got the correct prompt .. succeed
- true
- else
- echo "$out"
- echo "failed create then delete bad symlink - grep failed with $ret"
- false
- fi
-}
-
-
testit "smbclient -L $SERVER_IP" $SMBCLIENT $CONFIGURATION -L $SERVER_IP -N -p 139 || failed=`expr $failed + 1`
testit "smbclient -L $SERVER -I $SERVER_IP" $SMBCLIENT $CONFIGURATION -L $SERVER -I $SERVER_IP -N -p 139 || failed=`expr $failed + 1`
@@ -146,8 +105,4 @@ testit "interactive smbclient -l prompts on stdout" \
test_interactive_prompt_stdout -l /tmp || \
failed=`expr $failed + 1`
-testit "creating a bad symlink and deleting it" \
- test_bad_symlink || \
- failed=`expr $failed + 1`
-
testok $0 $failed
diff --git a/source3/script/tests/test_smbtorture_s3.sh b/source3/script/tests/test_smbtorture_s3.sh
index a6ac9482a6..fee9260c7c 100755
--- a/source3/script/tests/test_smbtorture_s3.sh
+++ b/source3/script/tests/test_smbtorture_s3.sh
@@ -21,18 +21,14 @@ incdir=`dirname $0`
. $incdir/test_functions.sh
}
-SMB_CONF_PATH="$CONFFILE"
-export SMB_CONF_PATH
-
-tests="FDPASS LOCK1 LOCK2 LOCK3 LOCK4 LOCK5 LOCK6 LOCK7 LOCK9"
+tests="FDPASS LOCK1 LOCK2 LOCK3 LOCK4 LOCK5 LOCK6 LOCK7"
#tests="$tests UNLINK BROWSE ATTR TRANS2 MAXFID TORTURE "
tests="$tests UNLINK BROWSE ATTR TRANS2 TORTURE "
-tests="$tests OPLOCK1 OPLOCK2 OPLOCK3 STREAMERROR"
+tests="$tests OPLOCK1 OPLOCK2 OPLOCK3"
tests="$tests DIR DIR1 TCON TCONDEV RW1 RW2 RW3"
tests="$tests OPEN XCOPY RENAME DELETE PROPERTIES W2K"
tests="$tests TCON2 IOCTL CHKPATH FDSESS LOCAL-SUBSTITUTE CHAIN1"
-tests="$tests GETADDRINFO POSIX UID-REGRESSION-TEST SHORTNAME-TEST"
-tests="$tests LOCAL-BASE64 LOCAL-GENCACHE"
+tests="$tests POSIX UID-REGRESSION-TEST SHORTNAME-TEST"
skipped1="RANDOMIPC NEGNOWAIT NBENCH ERRMAPEXTRACT TRANS2SCAN NTTRANSSCAN"
skipped2="DENY1 DENY2 OPENATTR CASETABLE EATEST"
@@ -53,7 +49,7 @@ for t in $tests; do
fi
start=""
name="$t"
- testit "$name" $VALGRIND $BINDIR/smbtorture $unc -U"$username"%"$password" -l"$PREFIX_ABS"/tmp $ADDARGS $t || failed=`expr $failed + 1`
+ testit "$name" $VALGRIND $BINDIR/smbtorture $unc -U"$username"%"$password" $ADDARGS $t || failed=`expr $failed + 1`
done
testok $0 $failed
diff --git a/source3/script/tests/test_wbinfo_s3.sh b/source3/script/tests/test_wbinfo_s3.sh
index 9758014a3d..d47953e0f3 100755
--- a/source3/script/tests/test_wbinfo_s3.sh
+++ b/source3/script/tests/test_wbinfo_s3.sh
@@ -46,7 +46,7 @@ NEWIFS=$':'
IFS=$NEWIFS
for t in $tests; do
IFS=$OLDIFS
- testit "wbinfo $t" $VALGRIND $BINDIR/wbinfo $ADDARGS $t || failed=`expr $failed + 1`
+ testit "wbinfo $t" $VALGRIND $BINDIR/wbinfo $CONFIGURATION $ADDARGS $t || failed=`expr $failed + 1`
IFS=$NEWIFS
done
IFS=$OLDIFS