2011-02-21 08:01:44 +03:00
#!/usr/bin/python
# This script generates a list of testsuites that should be run as part of
# the Samba 3 test suite.
# The output of this script is parsed by selftest.pl, which then decides
# which of the tests to actually run. It will, for example, skip all tests
# listed in selftest/skip or only run a subset during "make quicktest".
# The idea is that this script outputs all of the tests of Samba 3, not
# just those that are known to pass, and list those that should be skipped
2012-04-16 01:33:22 +04:00
# or are known to fail in selftest/skip or selftest/samba3-knownfail. This makes it
2011-02-21 08:01:44 +03:00
# very easy to see what functionality is still missing in Samba 3 and makes
# it possible to run the testsuite against other servers, such as Samba 4 or
# Windows that have a different set of features.
# The syntax for a testsuite is "-- TEST --" on a single line, followed
# by the name of the test, the environment it needs and the command to run, all
# three separated by newlines. All other lines in the output are considered
# comments.
import os , sys
sys . path . insert ( 0 , os . path . normpath ( os . path . join ( os . path . dirname ( __file__ ) , " ../../selftest " ) ) )
from selftesthelpers import *
import subprocess
smb4torture = binpath ( " smbtorture4 " )
samba3srcdir = srcdir ( ) + " /source3 "
configuration = " --configfile=$SMB_CONF_PATH "
scriptdir = os . path . join ( samba3srcdir , " ../script/tests " )
2012-05-29 14:16:12 +04:00
smbclient = binpath ( ' smbclient3 ' )
2012-05-29 14:18:19 +04:00
wbinfo = binpath ( ' wbinfo ' )
2012-05-29 15:44:03 +04:00
net = binpath ( ' net ' )
2012-05-29 15:45:49 +04:00
smbtorture3 = binpath ( ' smbtorture3 ' )
2012-05-29 15:47:32 +04:00
ntlm_auth = binpath ( ' ntlm_auth3 ' )
2012-05-29 15:51:05 +04:00
dbwrap_tool = binpath ( ' dbwrap_tool ' )
2012-08-16 02:37:54 +04:00
vfstest = binpath ( ' vfstest ' )
2012-05-29 14:16:12 +04:00
2011-02-21 08:01:44 +03:00
torture_options = [ configuration , " --maximum-runtime=$SELFTEST_MAXTIME " ,
2012-04-26 02:27:37 +04:00
" --basedir=$SELFTEST_TMPDIR " ,
2011-02-21 08:01:44 +03:00
' --option= " torture:winbindd_netbios_name=$SERVER " ' ,
' --option= " torture:winbindd_netbios_domain=$DOMAIN " ' ,
2012-03-15 20:28:38 +04:00
' --option=torture:sharedelay=100000 ' ,
' --option=torture:writetimeupdatedelay=500000 ' ]
2011-02-21 08:01:44 +03:00
if not os . getenv ( " SELFTEST_VERBOSE " ) :
torture_options . append ( " --option=torture:progress=no " )
torture_options . append ( " --format=subunit " )
if os . getenv ( " SELFTEST_QUICK " ) :
torture_options . append ( " --option=torture:quick=yes " )
2012-02-02 15:02:00 +04:00
smb4torture_testsuite_list = subprocess . Popen ( [ smb4torture , " --list-suites " ] , stdout = subprocess . PIPE , stderr = subprocess . PIPE ) . communicate ( " " ) [ 0 ] . splitlines ( )
2011-02-21 08:01:44 +03:00
smb4torture + = " " + " " . join ( torture_options )
2012-01-09 02:26:57 +04:00
sub = subprocess . Popen ( " %s --version 2> /dev/null " % smb4torture , stdout = subprocess . PIPE , stdin = subprocess . PIPE , shell = True )
sub . communicate ( " " )
smb4torture_possible = ( sub . returncode == 0 )
2012-02-02 15:02:00 +04:00
def smb4torture_testsuites ( prefix ) :
return filter ( lambda x : x . startswith ( prefix ) , smb4torture_testsuite_list )
2011-03-05 03:28:02 +03:00
def plansmbtorturetestsuite ( name , env , options , description = ' ' ) :
2012-04-26 02:27:37 +04:00
target = " samba3 "
2012-04-27 06:49:14 +04:00
if description == ' ' :
modname = " %s . %s " % ( target , name )
else :
modname = " %s . %s %s " % ( target , name , description )
2012-04-26 02:27:37 +04:00
cmdline = " %s $LISTOPT %s --target= %s %s " % ( valgrindify ( smb4torture ) , options , target , name )
2012-01-09 02:26:57 +04:00
if smb4torture_possible :
plantestsuite_loadlist ( modname , env , cmdline )
2011-02-21 08:01:44 +03:00
2012-02-02 15:02:00 +04:00
2011-04-18 09:28:40 +04:00
plantestsuite ( " samba3.blackbox.success " , " s3dc:local " , [ os . path . join ( samba3srcdir , " script/tests/test_success.sh " ) ] )
plantestsuite ( " samba3.blackbox.failure " , " s3dc:local " , [ os . path . join ( samba3srcdir , " script/tests/test_failure.sh " ) ] )
2011-02-21 08:01:44 +03:00
2011-04-18 09:28:40 +04:00
plantestsuite ( " samba3.local_s3 " , " s3dc:local " , [ os . path . join ( samba3srcdir , " script/tests/test_local_s3.sh " ) ] )
2011-02-21 08:01:44 +03:00
2012-05-29 15:51:05 +04:00
plantestsuite ( " samba3.blackbox.registry.upgrade " , " s3dc:local " , [ os . path . join ( samba3srcdir , " script/tests/test_registry_upgrade.sh " ) , net , dbwrap_tool ] )
2011-11-02 23:02:35 +04:00
2011-02-21 08:01:44 +03:00
tests = [ " FDPASS " , " LOCK1 " , " LOCK2 " , " LOCK3 " , " LOCK4 " , " LOCK5 " , " LOCK6 " , " LOCK7 " , " LOCK9 " ,
" UNLINK " , " BROWSE " , " ATTR " , " TRANS2 " , " TORTURE " ,
2011-05-22 16:16:46 +04:00
" OPLOCK1 " , " OPLOCK2 " , " OPLOCK4 " , " STREAMERROR " ,
2011-02-21 08:01:44 +03:00
" DIR " , " DIR1 " , " DIR-CREATETIME " , " TCON " , " TCONDEV " , " RW1 " , " RW2 " , " RW3 " , " RW-SIGNING " ,
" OPEN " , " XCOPY " , " RENAME " , " DELETE " , " DELETE-LN " , " PROPERTIES " , " W2K " ,
2012-02-27 09:29:14 +04:00
" TCON2 " , " IOCTL " , " CHKPATH " , " FDSESS " , " CHAIN1 " , " CHAIN2 " ,
2012-02-28 23:28:55 +04:00
" CHAIN3 " ,
2012-06-05 07:44:56 +04:00
" GETADDRINFO " , " UID-REGRESSION-TEST " , " SHORTNAME-TEST " ,
2011-08-30 20:50:55 +04:00
" CASE-INSENSITIVE-CREATE " , " SMB2-BASIC " , " NTTRANS-FSCTL " , " SMB2-NEGPROT " ,
2012-06-22 16:08:30 +04:00
" SMB2-SESSION-REAUTH " , " SMB2-SESSION-RECONNECT " ,
2012-01-05 15:25:39 +04:00
" CLEANUP1 " ,
2012-01-05 20:47:16 +04:00
" CLEANUP2 " ,
2011-10-26 10:59:47 +04:00
" BAD-NBT-SESSION " ]
2011-02-21 08:01:44 +03:00
for t in tests :
2012-05-29 15:45:49 +04:00
plantestsuite ( " samba3.smbtorture_s3.plain(s3dc). %s " % t , " s3dc " , [ os . path . join ( samba3srcdir , " script/tests/test_smbtorture_s3.sh " ) , t , ' //$SERVER_IP/tmp ' , ' $USERNAME ' , ' $PASSWORD ' , smbtorture3 , " " , " -l $LOCAL_PATH " ] )
2012-08-17 10:50:21 +04:00
plantestsuite ( " samba3.smbtorture_s3.crypt_client(s3dc). %s " % t , " s3dc " , [ os . path . join ( samba3srcdir , " script/tests/test_smbtorture_s3.sh " ) , t , ' //$SERVER_IP/tmp ' , ' $USERNAME ' , ' $PASSWORD ' , smbtorture3 , " -e " , " -l $LOCAL_PATH " ] )
if t == " TORTURE " :
# this is a negative test to verify that the server rejects
# access without encryption
plantestsuite ( " samba3.smbtorture_s3.crypt_server(s3dc). %s " % t , " s3dc " , [ os . path . join ( samba3srcdir , " script/tests/test_smbtorture_s3.sh " ) , t , ' //$SERVER_IP/tmpenc ' , ' $USERNAME ' , ' $PASSWORD ' , smbtorture3 , " " , " -l $LOCAL_PATH " ] )
2012-05-29 15:45:49 +04:00
plantestsuite ( " samba3.smbtorture_s3.plain(dc). %s " % t , " dc " , [ os . path . join ( samba3srcdir , " script/tests/test_smbtorture_s3.sh " ) , t , ' //$SERVER_IP/tmp ' , ' $USERNAME ' , ' $PASSWORD ' , smbtorture3 , " " , " -l $LOCAL_PATH " ] )
2012-05-16 11:11:40 +04:00
2012-08-21 13:22:54 +04:00
tests = [ " RW1 " , " RW2 " , " RW3 " ]
for t in tests :
plantestsuite ( " samba3.smbtorture_s3.vfs_aio_fork(secshare). %s " % t , " secshare " , [ os . path . join ( samba3srcdir , " script/tests/test_smbtorture_s3.sh " ) , t , ' //$SERVER_IP/vfs_aio_fork ' , ' $USERNAME ' , ' $PASSWORD ' , smbtorture3 , " " , " -l $LOCAL_PATH " ] )
2012-06-05 07:44:56 +04:00
posix_tests = [ " POSIX " , " POSIX-APPEND " ]
for t in posix_tests :
plantestsuite ( " samba3.smbtorture_s3.plain(s3dc). %s " % t , " s3dc " , [ os . path . join ( samba3srcdir , " script/tests/test_smbtorture_s3.sh " ) , t , ' //$SERVER_IP/posix_share ' , ' $USERNAME ' , ' $PASSWORD ' , smbtorture3 , " " , " -l $LOCAL_PATH " ] )
plantestsuite ( " samba3.smbtorture_s3.crypt(s3dc). %s " % t , " s3dc " , [ os . path . join ( samba3srcdir , " script/tests/test_smbtorture_s3.sh " ) , t , ' //$SERVER_IP/posix_share ' , ' $USERNAME ' , ' $PASSWORD ' , smbtorture3 , " -e " , " -l $LOCAL_PATH " ] )
plantestsuite ( " samba3.smbtorture_s3.plain(dc). %s " % t , " dc " , [ os . path . join ( samba3srcdir , " script/tests/test_smbtorture_s3.sh " ) , t , ' //$SERVER_IP/posix_share ' , ' $USERNAME ' , ' $PASSWORD ' , smbtorture3 , " " , " -l $LOCAL_PATH " ] )
2012-05-16 11:11:40 +04:00
env = " s3dc:local "
t = " CLEANUP3 "
plantestsuite ( " samba3.smbtorture_s3.plain( %s ). %s " % ( env , t ) , env , [ os . path . join ( samba3srcdir , " script/tests/test_smbtorture_s3.sh " ) , t , ' //$SERVER_IP/tmp ' , ' $USERNAME ' , ' $PASSWORD ' , binpath ( ' smbtorture3 ' ) , " " , " -l $LOCAL_PATH " ] )
2011-02-21 08:01:44 +03:00
2011-10-26 10:59:47 +04:00
local_tests = [
" LOCAL-SUBSTITUTE " ,
" LOCAL-GENCACHE " ,
" LOCAL-TALLOC-DICT " ,
" LOCAL-BASE64 " ,
" LOCAL-RBTREE " ,
" LOCAL-MEMCACHE " ,
" LOCAL-STREAM-NAME " ,
" LOCAL-WBCLIENT " ,
" LOCAL-string_to_sid " ,
" LOCAL-binary_to_sid " ,
" LOCAL-DBTRANS " ,
" LOCAL-TEVENT-SELECT " ,
" LOCAL-CONVERT-STRING " ,
" LOCAL-CONV-AUTH-INFO " ,
2012-04-30 19:02:46 +04:00
" LOCAL-IDMAP-TDB-COMMON " ,
2012-02-03 06:27:19 +04:00
" LOCAL-hex_encode_buf " ,
2012-05-22 01:29:11 +04:00
" LOCAL-sprintf_append " ,
" LOCAL-remove_duplicate_addrs2 " ]
2011-10-26 10:59:47 +04:00
for t in local_tests :
2012-05-29 15:45:49 +04:00
plantestsuite ( " samba3.smbtorture_s3. %s " % t , " s3dc " , [ os . path . join ( samba3srcdir , " script/tests/test_smbtorture_s3.sh " ) , t , ' //$SERVER_IP/tmp ' , ' $USERNAME ' , ' $PASSWORD ' , smbtorture3 , " -e " ] )
2011-10-26 10:59:47 +04:00
2011-02-21 08:01:44 +03:00
tests = [ " --ping " , " --separator " ,
" --own-domain " ,
" --all-domains " ,
" --trusted-domains " ,
" --domain-info=BUILTIN " ,
" --domain-info=$DOMAIN " ,
" --online-status " ,
" --online-status --domain=BUILTIN " ,
" --online-status --domain=$DOMAIN " ,
" --check-secret --domain=$DOMAIN " ,
" --change-secret --domain=$DOMAIN " ,
" --check-secret --domain=$DOMAIN " ,
" --online-status --domain=$DOMAIN " ,
#Didn't pass yet# "--domain-users",
" --domain-groups " ,
2012-02-13 05:36:21 +04:00
" --name-to-sid=$DC_USERNAME " ,
" --name-to-sid=$DOMAIN \\ \\ $DC_USERNAME " ,
2011-02-21 08:01:44 +03:00
#Didn't pass yet# "--user-info=$USERNAME",
2012-02-13 05:36:21 +04:00
" --user-groups=$DOMAIN \\ \\ $DC_USERNAME " ,
2012-03-11 06:00:01 +04:00
" --authenticate=$DOMAIN \\ \\ $DC_USERNAME % $DC_PASSWORD " ,
2011-02-21 08:01:44 +03:00
" --allocate-uid " ,
" --allocate-gid " ]
2012-08-16 02:37:54 +04:00
plantestsuite ( " samba.vfstest.stream_depot " , " s3dc:local " , [ os . path . join ( samba3srcdir , " script/tests/stream-depot/run.sh " ) , binpath ( " vfstest " ) , " $PREFIX " , configuration ] )
2012-08-16 02:55:43 +04:00
plantestsuite ( " samba.vfstest.xattr-tdb-1 " , " s3dc:local " , [ os . path . join ( samba3srcdir , " script/tests/xattr-tdb-1/run.sh " ) , binpath ( " vfstest " ) , " $PREFIX " , configuration ] )
2012-08-16 07:46:02 +04:00
plantestsuite ( " samba.vfstest.acl " , " s3dc:local " , [ os . path . join ( samba3srcdir , " script/tests/vfstest-acl/run.sh " ) , binpath ( " vfstest " ) , " $PREFIX " , configuration ] )
2012-08-16 02:55:43 +04:00
2012-03-08 08:37:29 +04:00
for options in [ " --option=clientusespnego=no " , " --option=clientntlmv2auth=no --option=clientlanmanauth=yes --max-protocol=LANMAN2 " , " " ] :
env = " s3dc "
2012-05-29 14:16:12 +04:00
plantestsuite ( " samba3.blackbox.smbclient_auth.plain ( %s ) %s " % ( env , options ) , env , [ os . path . join ( samba3srcdir , " script/tests/test_smbclient_auth.sh " ) , ' $SERVER ' , ' $SERVER_IP ' , ' $DC_USERNAME ' , ' $DC_PASSWORD ' , smbclient , configuration , options ] )
2012-03-08 08:37:29 +04:00
2012-08-27 15:02:28 +04:00
for env in [ " s3dc " , " member " , " s3member " , " dc " , " s4member " ] :
plantestsuite ( " samba3.blackbox.smbclient_machine_auth.plain ( %s :local) " % env , " %s :local " % env , [ os . path . join ( samba3srcdir , " script/tests/test_smbclient_machine_auth.sh " ) , ' $SERVER ' , smbclient , configuration ] )
2012-02-13 05:16:07 +04:00
for env in [ " s3dc " , " member " , " s3member " ] :
2012-05-29 14:16:12 +04:00
plantestsuite ( " samba3.blackbox.smbclient_auth.plain ( %s ) " % env , env , [ os . path . join ( samba3srcdir , " script/tests/test_smbclient_auth.sh " ) , ' $SERVER ' , ' $SERVER_IP ' , ' $DC_USERNAME ' , ' $DC_PASSWORD ' , smbclient , configuration ] )
plantestsuite ( " samba3.blackbox.smbclient_auth.plain ( %s ) member creds " % env , env , [ os . path . join ( samba3srcdir , " script/tests/test_smbclient_auth.sh " ) , ' $SERVER ' , ' $SERVER_IP ' , ' $SERVER \\ \\ $USERNAME ' , ' $PASSWORD ' , smbclient , configuration ] )
2011-04-11 19:26:35 +04:00
2012-02-13 05:16:07 +04:00
for t in tests :
plantestsuite ( " samba3.wbinfo_s3.( %s :local). %s " % ( env , t ) , " %s :local " % env , [ os . path . join ( samba3srcdir , " script/tests/test_wbinfo_s3.sh " ) , t ] )
2011-02-21 08:01:44 +03:00
2012-02-13 05:16:07 +04:00
plantestsuite (
" samba3.wbinfo_sids2xids.( %s :local) " % env , " %s :local " % env ,
[ os . path . join ( samba3srcdir , " script/tests/test_wbinfo_sids2xids.sh " ) ] )
2012-02-19 04:01:55 +04:00
plantestsuite (
" samba3.ntlm_auth.diagnostics( %s :local) " % env , " %s :local " % env ,
2012-05-29 15:47:32 +04:00
[ os . path . join ( samba3srcdir , " script/tests/test_ntlm_auth_diagnostics.sh " ) , ntlm_auth , ' $DOMAIN ' , ' $DC_USERNAME ' , ' $DC_PASSWORD ' , configuration ] )
2011-02-21 08:01:44 +03:00
2012-05-29 15:47:32 +04:00
plantestsuite ( " samba3.ntlm_auth.( %s :local) " % env , " %s :local " % env , [ os . path . join ( samba3srcdir , " script/tests/test_ntlm_auth_s3.sh " ) , valgrindify ( python ) , samba3srcdir , ntlm_auth , ' $DOMAIN ' , ' $DC_USERNAME ' , ' $DC_PASSWORD ' , configuration ] )
2012-02-13 05:16:07 +04:00
2012-03-11 06:00:01 +04:00
env = " s3member "
t = " --krb5auth=$DOMAIN \\ \\ $DC_USERNAME % $DC_PASSWORD "
plantestsuite ( " samba3.wbinfo_s3.( %s :local). %s " % ( env , t ) , " %s :local " % env , [ os . path . join ( samba3srcdir , " script/tests/test_wbinfo_s3.sh " ) , t ] )
2012-05-29 15:47:32 +04:00
plantestsuite ( " samba3.ntlm_auth.krb5(ktest:local) old ccache " , " ktest:local " , [ os . path . join ( samba3srcdir , " script/tests/test_ntlm_auth_krb5.sh " ) , valgrindify ( python ) , samba3srcdir , ntlm_auth , ' $PREFIX/ktest/krb5_ccache-2 ' , ' $SERVER ' , configuration ] )
2012-03-01 10:26:32 +04:00
2012-05-29 15:47:32 +04:00
plantestsuite ( " samba3.ntlm_auth.krb5(ktest:local) " , " ktest:local " , [ os . path . join ( samba3srcdir , " script/tests/test_ntlm_auth_krb5.sh " ) , valgrindify ( python ) , samba3srcdir , ntlm_auth , ' $PREFIX/ktest/krb5_ccache-3 ' , ' $SERVER ' , configuration ] )
2012-03-01 10:26:32 +04:00
2012-05-15 03:43:03 +04:00
for env in [ " maptoguest " , " secshare " ] :
2012-05-29 14:16:12 +04:00
plantestsuite ( " samba3.blackbox.smbclient_auth.plain ( %s ) local creds " % env , env , [ os . path . join ( samba3srcdir , " script/tests/test_smbclient_auth.sh " ) , ' $SERVER ' , ' $SERVER_IP ' , ' $USERNAME ' , ' $PASSWORD ' , smbclient , configuration + " --option=clientntlmv2auth=no --option=clientlanmanauth=yes " ] )
2011-02-21 08:01:44 +03:00
2011-07-22 07:00:21 +04:00
env = " maptoguest "
2012-05-29 14:16:12 +04:00
plantestsuite ( " samba3.blackbox.smbclient_auth.plain ( %s ) bad username " % env , env , [ os . path . join ( samba3srcdir , " script/tests/test_smbclient_auth.sh " ) , ' $SERVER ' , ' $SERVER_IP ' , ' notmy$USERNAME ' , ' $PASSWORD ' , smbclient , configuration + " --option=clientntlmv2auth=no --option=clientlanmanauth=yes " ] )
2011-07-22 07:00:21 +04:00
2011-02-21 08:01:44 +03:00
# plain
2011-04-18 09:28:40 +04:00
for env in [ " s3dc " ] :
2012-05-29 14:18:19 +04:00
plantestsuite ( " samba3.blackbox.smbclient_s3.plain ( %s ) " % env , env , [ os . path . join ( samba3srcdir , " script/tests/test_smbclient_s3.sh " ) , ' $SERVER ' , ' $SERVER_IP ' , ' $DOMAIN ' , ' $DC_USERNAME ' , ' $DC_PASSWORD ' , ' $USERID ' , ' $LOCAL_PATH ' , ' $PREFIX ' , smbclient , wbinfo , configuration ] )
2011-02-21 08:01:44 +03:00
2012-02-13 05:16:07 +04:00
for env in [ " member " , " s3member " ] :
2012-05-29 14:18:19 +04:00
plantestsuite ( " samba3.blackbox.smbclient_s3.plain ( %s ) member creds " % env , env , [ os . path . join ( samba3srcdir , " script/tests/test_smbclient_s3.sh " ) , ' $SERVER ' , ' $SERVER_IP ' , ' $SERVER ' , ' $SERVER \\ \\ $USERNAME ' , ' $PASSWORD ' , ' $USERID ' , ' $LOCAL_PATH ' , ' $PREFIX ' , smbclient , wbinfo , configuration ] )
2011-02-21 08:01:44 +03:00
2011-04-18 09:28:40 +04:00
for env in [ " s3dc " ] :
2012-05-29 14:18:19 +04:00
plantestsuite ( " samba3.blackbox.smbclient_s3.sign ( %s ) " % env , env , [ os . path . join ( samba3srcdir , " script/tests/test_smbclient_s3.sh " ) , ' $SERVER ' , ' $SERVER_IP ' , ' $DOMAIN ' , ' $DC_USERNAME ' , ' $DC_PASSWORD ' , ' $USERID ' , ' $LOCAL_PATH ' , ' $PREFIX ' , smbclient , wbinfo , configuration , " --signing=required " ] )
2011-02-21 08:01:44 +03:00
2012-02-13 05:16:07 +04:00
for env in [ " member " , " s3member " ] :
2012-05-29 14:18:19 +04:00
plantestsuite ( " samba3.blackbox.smbclient_s3.sign ( %s ) member creds " % env , env , [ os . path . join ( samba3srcdir , " script/tests/test_smbclient_s3.sh " ) , ' $SERVER ' , ' $SERVER_IP ' , ' $SERVER ' , ' $SERVER \\ \\ $USERNAME ' , ' $PASSWORD ' , ' $USERID ' , ' $LOCAL_PATH ' , ' $PREFIX ' , smbclient , wbinfo , configuration , " --signing=required " ] )
2011-02-21 08:01:44 +03:00
2011-04-18 09:28:40 +04:00
for env in [ " s3dc " ] :
2012-08-11 18:48:36 +04:00
# encrypted
2012-05-29 14:18:19 +04:00
plantestsuite ( " samba3.blackbox.smbclient_s3.crypt ( %s ) " % env , env , [ os . path . join ( samba3srcdir , " script/tests/test_smbclient_s3.sh " ) , ' $SERVER ' , ' $SERVER_IP ' , ' $DOMAIN ' , ' $USERNAME ' , ' $PASSWORD ' , ' $USERID ' , ' $LOCAL_PATH ' , ' $PREFIX ' , smbclient , wbinfo , configuration , " -e " ] )
2011-02-21 08:01:44 +03:00
2012-08-11 18:48:36 +04:00
# Test smbclient/tarmode
plantestsuite ( " samba3.blackbox.smbclient_tarmode ( %s ) " % env , env , [ os . path . join ( samba3srcdir , " script/tests/test_smbclient_tarmode.sh " ) , ' $SERVER ' , ' $SERVER_IP ' , ' $USERNAME ' , ' $PASSWORD ' , ' $LOCAL_PATH ' , ' $PREFIX ' , smbclient , configuration ] )
2011-02-21 08:01:44 +03:00
#TODO encrypted against member, with member creds, and with DC creds
2012-05-29 15:59:14 +04:00
plantestsuite ( " samba3.blackbox.net.misc " , " s3dc:local " ,
[ os . path . join ( samba3srcdir , " script/tests/test_net_misc.sh " ) ,
scriptdir , " $SMB_CONF_PATH " , net , configuration ] )
plantestsuite ( " samba3.blackbox.net.local.registry " , " s3dc:local " ,
[ os . path . join ( samba3srcdir , " script/tests/test_net_registry.sh " ) ,
scriptdir , " $SMB_CONF_PATH " , net , configuration ] )
plantestsuite ( " samba3.blackbox.net.registry.check " , " s3dc:local " ,
[ os . path . join ( samba3srcdir , " script/tests/test_net_registry_check.sh " ) ,
scriptdir , " $SMB_CONF_PATH " , net , configuration , dbwrap_tool ] )
plantestsuite ( " samba3.blackbox.net.rpc.registry " , " s3dc " ,
[ os . path . join ( samba3srcdir , " script/tests/test_net_registry.sh " ) ,
scriptdir , " $SMB_CONF_PATH " , net , configuration , ' rpc ' ] )
plantestsuite ( " samba3.blackbox.net.local.registry.roundtrip " , " s3dc:local " ,
[ os . path . join ( samba3srcdir , " script/tests/test_net_registry_roundtrip.sh " ) ,
scriptdir , " $SMB_CONF_PATH " , net , configuration ] )
plantestsuite ( " samba3.blackbox.net.rpc.registry.roundtrip " , " s3dc " ,
[ os . path . join ( samba3srcdir , " script/tests/test_net_registry_roundtrip.sh " ) ,
scriptdir , " $SMB_CONF_PATH " , net , configuration , ' rpc ' ] )
plantestsuite ( " samba3.blackbox.net.local.conf " , " s3dc:local " ,
[ os . path . join ( samba3srcdir , " script/tests/test_net_conf.sh " ) ,
scriptdir , " $SMB_CONF_PATH " , net , configuration ] )
plantestsuite ( " samba3.blackbox.net.rpc.conf " , " s3dc " ,
[ os . path . join ( samba3srcdir , " script/tests/test_net_conf.sh " ) ,
scriptdir , " $SMB_CONF_PATH " , net , configuration , ' rpc ' ] )
plantestsuite ( " samba3.blackbox.testparm " , " s3dc:local " ,
[ os . path . join ( samba3srcdir , " script/tests/test_testparm_s3.sh " ) ,
" $LOCAL_PATH " ] )
2011-02-21 08:01:44 +03:00
2011-04-24 12:36:56 +04:00
plantestsuite (
" samba3.pthreadpool " , " s3dc " ,
[ os . path . join ( samba3srcdir , " script/tests/test_pthreadpool.sh " ) ] )
2011-02-21 08:01:44 +03:00
#smbtorture4 tests
base = [ " base.attr " , " base.charset " , " base.chkpath " , " base.defer_open " , " base.delaywrite " , " base.delete " ,
" base.deny1 " , " base.deny2 " , " base.deny3 " , " base.denydos " , " base.dir1 " , " base.dir2 " ,
" base.disconnect " , " base.fdpass " , " base.lock " ,
" base.mangle " , " base.negnowait " , " base.ntdeny1 " ,
" base.ntdeny2 " , " base.open " , " base.openattr " , " base.properties " , " base.rename " , " base.rw1 " ,
" base.secleak " , " base.tcon " , " base.tcondev " , " base.trans2 " , " base.unlink " , " base.vuid " ,
" base.xcopy " , " base.samba3error " ]
raw = [ " raw.acls " , " raw.chkpath " , " raw.close " , " raw.composite " , " raw.context " , " raw.eas " ,
" raw.ioctl " , " raw.lock " , " raw.mkdir " , " raw.mux " , " raw.notify " , " raw.open " , " raw.oplock "
" raw.qfileinfo " , " raw.qfsinfo " , " raw.read " , " raw.rename " , " raw.search " , " raw.seek " ,
" raw.sfileinfo.base " , " raw.sfileinfo.bug " , " raw.streams " , " raw.unlink " , " raw.write " ,
2012-06-22 14:11:43 +04:00
" raw.samba3hide " , " raw.samba3badpath " , " raw.sfileinfo.rename " , " raw.session " ,
2011-02-21 08:01:44 +03:00
" raw.samba3caseinsensitive " , " raw.samba3posixtimedlock " ,
2011-03-28 10:23:27 +04:00
" raw.samba3rootdirfid " , " raw.sfileinfo.end-of-file " ,
" raw.bench-oplock " , " raw.bench-lock " , " raw.bench-open " , " raw.bench-tcon " ,
" raw.samba3checkfsp " , " raw.samba3closeerr " , " raw.samba3oplocklogoff " ]
2011-02-21 08:01:44 +03:00
2012-02-02 15:02:00 +04:00
smb2 = smb4torture_testsuites ( " smb2. " )
2011-02-21 08:01:44 +03:00
rpc = [ " rpc.authcontext " , " rpc.samba3.bind " , " rpc.samba3.srvsvc " , " rpc.samba3.sharesec " ,
" rpc.samba3.spoolss " , " rpc.samba3.wkssvc " , " rpc.samba3.winreg " ,
" rpc.samba3.getaliasmembership-0 " ,
" rpc.samba3.netlogon " , " rpc.samba3.sessionkey " , " rpc.samba3.getusername " ,
2012-05-28 17:56:14 +04:00
" rpc.samba3.smb1-pipe-name " , " rpc.samba3.smb2-pipe-name " ,
2012-06-22 15:06:41 +04:00
" rpc.samba3.smb-reauth1 " , " rpc.samba3.smb-reauth2 " ,
2011-02-21 08:01:44 +03:00
" rpc.svcctl " , " rpc.ntsvcs " , " rpc.winreg " , " rpc.eventlog " ,
" rpc.spoolss.printserver " , " rpc.spoolss.win " , " rpc.spoolss.notify " , " rpc.spoolss.printer " ,
" rpc.spoolss.driver " ,
2009-11-03 13:48:09 +03:00
" rpc.lsa " , " rpc.lsa-getuser " , " rpc.lsa.lookupsids " , " rpc.lsa.lookupnames " ,
2009-10-30 02:09:25 +03:00
" rpc.lsa.privileges " , " rpc.lsa.secrets " ,
2011-02-21 08:01:44 +03:00
" rpc.samr " , " rpc.samr.users " , " rpc.samr.users.privileges " , " rpc.samr.passwords " ,
" rpc.samr.passwords.pwdlastset " , " rpc.samr.large-dc " , " rpc.samr.machine.auth " ,
2011-09-15 10:54:44 +04:00
" rpc.samr.priv " ,
2011-03-04 18:05:35 +03:00
" rpc.netlogon.admin " ,
2011-07-11 19:02:36 +04:00
" rpc.schannel " , " rpc.schannel2 " , " rpc.bench-schannel1 " , " rpc.join " , " rpc.bind " ]
2011-02-21 08:01:44 +03:00
local = [ " local.nss-wrapper " , " local.ndr " ]
2012-08-24 04:01:42 +04:00
winbind = [ " winbind.struct " , " winbind.wbclient " , " winbind.pac " ]
2011-02-21 08:01:44 +03:00
rap = [ " rap.basic " , " rap.rpc " , " rap.printing " , " rap.sam " ]
unix = [ " unix.info2 " , " unix.whoami " ]
2011-03-11 01:17:54 +03:00
nbt = [ " nbt.dgram " ]
2011-05-11 00:14:34 +04:00
libsmbclient = [ " libsmbclient " ]
tests = base + raw + smb2 + rpc + unix + local + winbind + rap + nbt + libsmbclient
2011-02-21 08:01:44 +03:00
2012-01-09 02:47:47 +04:00
for t in tests :
if t == " base.delaywrite " :
plansmbtorturetestsuite ( t , " s3dc " , ' //$SERVER_IP/tmp -U$USERNAME % $PASSWORD --maximum-runtime=900 ' )
2012-04-30 09:32:08 +04:00
plansmbtorturetestsuite ( t , " plugin_s4_dc " , ' //$SERVER_IP/tmp -U$USERNAME % $PASSWORD --maximum-runtime=900 ' )
2012-01-09 02:47:47 +04:00
elif t == " rap.sam " :
plansmbtorturetestsuite ( t , " s3dc " , ' //$SERVER_IP/tmp -U$USERNAME % $PASSWORD --option=doscharset=ISO-8859-1 ' )
2012-04-30 09:32:08 +04:00
plansmbtorturetestsuite ( t , " plugin_s4_dc " , ' //$SERVER_IP/tmp -U$USERNAME % $PASSWORD --option=doscharset=ISO-8859-1 ' )
2012-08-24 04:01:42 +04:00
elif t == " winbind.pac " :
plansmbtorturetestsuite ( t , " s3member:local " , ' //$SERVER/tmp --realm=$REALM --machine-pass --option=torture:addc=$DC_SERVER ' , description = " machine account " )
2012-01-09 02:47:47 +04:00
elif t == " unix.whoami " :
2012-07-15 05:34:06 +04:00
plansmbtorturetestsuite ( t , " member:local " , ' //$SERVER/tmp --machine-pass ' , description = " machine account " )
plansmbtorturetestsuite ( t , " s3member:local " , ' //$SERVER/tmp --machine-pass --option=torture:addc=$DC_SERVER ' , description = " machine account " )
2012-07-12 06:59:29 +04:00
for env in [ " s3dc " , " member " ] :
plansmbtorturetestsuite ( t , env , ' //$SERVER/tmp -U$DC_USERNAME % $DC_PASSWORD ' )
plansmbtorturetestsuite ( t , env , ' //$SERVER/tmpguest -U % ' , description = ' anonymous connection ' )
for env in [ " plugin_s4_dc " , " s3member " ] :
plansmbtorturetestsuite ( t , env , ' //$SERVER/tmp -U$DC_USERNAME@$REALM % $DC_PASSWORD --option=torture:addc=$DC_SERVER ' )
plansmbtorturetestsuite ( t , env , ' //$SERVER/tmp -k yes -U$DC_USERNAME@$REALM % $DC_PASSWORD --option=torture:addc=$DC_SERVER ' , description = ' kerberos connection ' )
plansmbtorturetestsuite ( t , env , ' //$SERVER/tmpguest -U % --o ption=torture:addc=$DC_SERVER ' , description = ' anonymous connection ' )
2012-01-09 02:47:47 +04:00
elif t == " raw.samba3posixtimedlock " :
plansmbtorturetestsuite ( t , " s3dc " , ' //$SERVER_IP/tmpguest -U$USERNAME % $PASSWORD --option=torture:localdir=$SELFTEST_PREFIX/s3dc/share ' )
2012-04-30 09:32:08 +04:00
plansmbtorturetestsuite ( t , " plugin_s4_dc " , ' //$SERVER_IP/tmpguest -U$USERNAME % $PASSWORD --option=torture:localdir=$SELFTEST_PREFIX/plugin_s4_dc/share ' )
2012-01-09 02:47:47 +04:00
elif t == " raw.chkpath " :
plansmbtorturetestsuite ( t , " s3dc " , ' //$SERVER_IP/tmpcase -U$USERNAME % $PASSWORD ' )
2012-04-30 09:32:08 +04:00
plansmbtorturetestsuite ( t , " plugin_s4_dc " , ' //$SERVER_IP/tmpcase -U$USERNAME % $PASSWORD ' )
2012-05-01 14:11:04 +04:00
elif t == " raw.samba3hide " or t == " raw.samba3checkfsp " or t == " raw.samba3closeerr " :
2012-04-18 10:05:22 +04:00
plansmbtorturetestsuite ( t , " s3dc " , ' //$SERVER_IP/tmp -U$USERNAME % $PASSWORD ' )
plansmbtorturetestsuite ( t , " secshare " , ' //$SERVER_IP/tmp -U$USERNAME % $PASSWORD ' )
2012-04-30 09:32:08 +04:00
plansmbtorturetestsuite ( t , " plugin_s4_dc " , ' //$SERVER/tmp -U$USERNAME % $PASSWORD ' )
2012-06-22 14:11:43 +04:00
elif t == " raw.session " or t == " smb2.session " :
2012-08-17 10:50:21 +04:00
plansmbtorturetestsuite ( t , " s3dc " , ' //$SERVER_IP/tmp -U$USERNAME % $PASSWORD ' , ' plain ' )
plansmbtorturetestsuite ( t , " s3dc " , ' //$SERVER_IP/tmpenc -U$USERNAME % $PASSWORD ' , ' enc ' )
2012-06-22 15:03:16 +04:00
plansmbtorturetestsuite ( t , " plugin_s4_dc " , ' //$SERVER/tmp -k no -U$USERNAME % $PASSWORD ' , ' ntlm ' )
plansmbtorturetestsuite ( t , " plugin_s4_dc " , ' //$SERVER/tmp -k yes -U$USERNAME % $PASSWORD ' , ' krb5 ' )
2012-06-27 13:15:05 +04:00
elif t == " rpc.lsa " :
plansmbtorturetestsuite ( t , " s3dc " , ' //$SERVER_IP/tmp -U$USERNAME % $PASSWORD ' , ' over ncacn_np ' )
plansmbtorturetestsuite ( t , " s3dc " , ' ncacn_ip_tcp:$SERVER_IP -U$USERNAME % $PASSWORD ' , ' over ncacn_ip_tcp ' )
plansmbtorturetestsuite ( t , " plugin_s4_dc " , ' //$SERVER_IP/tmp -U$USERNAME % $PASSWORD ' , ' over ncacn_np ' )
plansmbtorturetestsuite ( t , " plugin_s4_dc " , ' ncacn_ip_tcp:$SERVER_IP -U$USERNAME % $PASSWORD ' , ' over ncacn_ip_tcp ' )
2012-01-09 02:47:47 +04:00
else :
plansmbtorturetestsuite ( t , " s3dc " , ' //$SERVER_IP/tmp -U$USERNAME % $PASSWORD ' )
2012-04-30 09:32:08 +04:00
plansmbtorturetestsuite ( t , " plugin_s4_dc " , ' //$SERVER/tmp -U$USERNAME % $PASSWORD ' )
2012-01-09 02:47:47 +04:00
test = ' rpc.lsa.lookupsids '
auth_options = [ " " , " ntlm " , " spnego " , " spnego,ntlm " ]
signseal_options = [ " " , " ,connect " , " ,sign " , " ,seal " ]
endianness_options = [ " " , " ,bigendian " ]
2012-01-14 14:17:33 +04:00
for s in signseal_options :
for e in endianness_options :
for a in auth_options :
binding_string = " ncacn_np:$SERVER[ %s %s %s ] " % ( a , s , e )
options = binding_string + " -U$USERNAME % $PASSWORD "
plansmbtorturetestsuite ( test , " s3dc " , options , ' over ncacn_np with [ %s %s %s ] ' % ( a , s , e ) )
plantestsuite ( " samba3.blackbox.rpcclient over ncacn_np with [ %s %s %s ] " % ( a , s , e ) , " s3dc:local " , [ os . path . join ( samba3srcdir , " script/tests/test_rpcclient.sh " ) ,
" none " , options , configuration ] )
2012-02-14 02:05:21 +04:00
# We should try more combinations in future, but this is all
# the pre-calculated credentials cache supports at the moment
e = " "
a = " "
binding_string = " ncacn_np:$SERVER[ %s %s %s ] " % ( a , s , e )
options = binding_string + " -k yes --krb5-ccache=$PREFIX/ktest/krb5_ccache-2 "
plansmbtorturetestsuite ( test , " ktest " , options , ' krb5 with old ccache ncacn_np with [ %s %s %s ] ' % ( a , s , e ) )
2012-01-14 14:17:33 +04:00
2012-02-14 02:05:21 +04:00
options = binding_string + " -k yes --krb5-ccache=$PREFIX/ktest/krb5_ccache-3 "
plansmbtorturetestsuite ( test , " ktest " , options , ' krb5 ncacn_np with [ %s %s %s ] ' % ( a , s , e ) )
2012-01-14 14:17:33 +04:00
2012-02-14 02:05:21 +04:00
auth_options2 = [ " krb5 " , " spnego,krb5 " ]
for a in auth_options2 :
binding_string = " ncacn_np:$SERVER[ %s %s %s ] " % ( a , s , e )
2012-01-14 14:17:33 +04:00
2012-02-14 02:05:21 +04:00
plantestsuite ( " samba3.blackbox.rpcclient krb5 ncacn_np with [ %s %s %s ] " % ( a , s , e ) , " ktest:local " , [ os . path . join ( samba3srcdir , " script/tests/test_rpcclient.sh " ) ,
2012-01-14 14:17:33 +04:00
" $PREFIX/ktest/krb5_ccache-3 " , binding_string , " -k " , configuration ] )
2012-01-03 08:57:40 +04:00
2011-04-04 13:13:17 +04:00
2012-01-27 08:20:17 +04:00
options_list = [ " " , " -e " ]
for options in options_list :
2012-02-14 02:05:21 +04:00
plantestsuite ( " samba3.blackbox.smbclient_krb5 old ccache %s " % options , " ktest:local " ,
[ os . path . join ( samba3srcdir , " script/tests/test_smbclient_krb5.sh " ) ,
" $PREFIX/ktest/krb5_ccache-2 " ,
2012-05-29 14:16:12 +04:00
smbclient , " $SERVER " , options , configuration ] )
2012-02-14 02:05:21 +04:00
plantestsuite ( " samba3.blackbox.smbclient_krb5 old ccache %s " % options , " ktest:local " ,
[ os . path . join ( samba3srcdir , " script/tests/test_smbclient_krb5.sh " ) ,
" $PREFIX/ktest/krb5_ccache-2 " ,
2012-05-29 14:16:12 +04:00
smbclient , " $SERVER " , options , configuration ] )
2012-02-14 02:05:21 +04:00
plantestsuite ( " samba3.blackbox.smbclient_large_file %s " % options , " ktest:local " ,
[ os . path . join ( samba3srcdir , " script/tests/test_smbclient_posix_large.sh " ) ,
" $PREFIX/ktest/krb5_ccache-3 " ,
2012-05-29 14:16:12 +04:00
smbclient , " $SERVER " , " $PREFIX " , options , " -k " + configuration ] )
2012-02-14 02:05:21 +04:00
plantestsuite ( " samba3.blackbox.smbclient_posix_large %s krb5 " % options , " ktest:local " ,
[ os . path . join ( samba3srcdir , " script/tests/test_smbclient_posix_large.sh " ) ,
" $PREFIX/ktest/krb5_ccache-3 " ,
2012-05-29 14:16:12 +04:00
smbclient , " $SERVER " , " $PREFIX " , options , " -k " + configuration ] )
2012-01-27 08:20:17 +04:00
plantestsuite ( " samba3.blackbox.smbclient_posix_large %s NTLM " % options , " s3dc:local " ,
[ os . path . join ( samba3srcdir , " script/tests/test_smbclient_posix_large.sh " ) ,
" none " ,
2012-05-29 14:16:12 +04:00
smbclient , " $SERVER " , " $PREFIX " , options , " -U$USERNAME % $PASSWORD " + configuration ] )
2012-01-27 08:20:17 +04:00
2012-01-09 02:47:47 +04:00
for e in endianness_options :
for a in auth_options :
for s in signseal_options :
binding_string = " ncacn_ip_tcp:$SERVER_IP[ %s %s %s ] " % ( a , s , e )
options = binding_string + " -U$USERNAME % $PASSWORD "
plansmbtorturetestsuite ( test , " s3dc " , options , ' over ncacn_ip_tcp with [ %s %s %s ] ' % ( a , s , e ) )
2011-07-11 19:02:36 +04:00
2012-01-09 02:47:47 +04:00
test = ' rpc.epmapper '
env = ' s3dc:local '
binding_string = ' ncalrpc: '
options = binding_string + " -U$USERNAME % $PASSWORD "
2011-07-11 19:02:36 +04:00
2012-01-09 02:47:47 +04:00
plansmbtorturetestsuite ( test , env , options , ' over ncalrpc ' )