2010-09-30 16:55:04 +04:00
#!/usr/bin/python
# This script generates a list of testsuites that should be run as part of
# the Samba 4 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 4, not
# just those that are known to pass, and list those that should be skipped
# or are known to fail in selftest/skip or selftest/knownfail. This makes it
# very easy to see what functionality is still missing in Samba 4 and makes
# it possible to run the testsuite against other servers, such as Samba 3 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.
2011-02-21 03:16:03 +03:00
import os , sys
sys . path . insert ( 0 , os . path . join ( os . path . dirname ( __file__ ) , " ../../selftest " ) )
from selftesthelpers import *
2010-09-30 16:55:04 +04:00
import subprocess
2011-02-21 03:16:03 +03:00
samba4srcdir = source4dir ( )
samba4bindir = bindir ( )
2010-09-30 16:55:04 +04:00
validate = os . getenv ( " VALIDATE " , " " )
2010-09-30 20:23:20 +04:00
if validate :
validate_list = [ validate ]
else :
validate_list = [ ]
2011-02-21 03:16:03 +03:00
2012-05-29 18:35:18 +04:00
nmblookup = binpath ( ' nmblookup4 ' )
2012-05-30 13:48:02 +04:00
smbclient = binpath ( ' smbclient4 ' )
2012-05-29 18:35:18 +04:00
2012-10-26 23:50:41 +04:00
subprocess . call ( [ smbtorture4 , " -V " ] , stdout = sys . stderr )
2010-09-30 16:55:04 +04:00
2011-02-21 03:16:03 +03:00
bbdir = os . path . join ( srcdir ( ) , " testprogs/blackbox " )
2010-09-30 16:55:04 +04:00
2012-10-27 01:12:54 +04:00
torture_options = [ configuration ,
" --maximum-runtime=$SELFTEST_MAXTIME " ,
" --target=samba4 " ,
" --basedir=$SELFTEST_TMPDIR " ,
" --format=subunit " ]
torture_options . extend ( get_env_torture_options ( ) )
2012-10-26 23:50:41 +04:00
smbtorture4 + = " " + " " . join ( torture_options )
2010-09-30 16:55:04 +04:00
2011-11-27 22:58:30 +04:00
print >> sys . stderr , " OPTIONS %s " % " " . join ( torture_options )
2010-09-30 16:55:04 +04:00
# Simple tests for LDAP and CLDAP
2010-09-30 20:23:20 +04:00
for options in [ ' -U " $USERNAME % $PASSWORD " --option=socket:testnonblock=true ' , ' -U " $USERNAME % $PASSWORD " ' , ' -U " $USERNAME % $PASSWORD " -k yes ' , ' -U " $USERNAME % $PASSWORD " -k no ' , ' -U " $USERNAME % $PASSWORD " -k no --sign ' , ' -U " $USERNAME % $PASSWORD " -k no --encrypt ' , ' -U " $USERNAME % $PASSWORD " -k yes --encrypt ' , ' -U " $USERNAME % $PASSWORD " -k yes --sign ' ] :
2010-09-30 16:55:04 +04:00
plantestsuite ( " samba4.ldb.ldap with options %s (dc) " % options , " dc " , " %s /test_ldb.sh ldap $SERVER %s " % ( bbdir , options ) )
2011-06-07 07:22:58 +04:00
# see if we support ADS on the Samba3 side
2010-09-30 16:55:04 +04:00
try :
config_h = os . environ [ " CONFIG_H " ]
except KeyError :
2011-06-07 07:22:58 +04:00
config_h = os . path . join ( samba4bindir , " default/include/config.h " )
# see if we support ldaps
2010-09-30 16:55:04 +04:00
f = open ( config_h , ' r ' )
try :
2010-09-30 20:23:20 +04:00
have_tls_support = ( " ENABLE_GNUTLS 1 " in f . read ( ) )
2010-09-30 16:55:04 +04:00
finally :
f . close ( )
if have_tls_support :
2010-09-30 20:23:20 +04:00
for options in [ ' -U " $USERNAME % $PASSWORD " ' ] :
2010-09-30 16:55:04 +04:00
plantestsuite ( " samba4.ldb.ldaps with options %s (dc) " % options , " dc " ,
" %s /test_ldb.sh ldaps $SERVER_IP %s " % ( bbdir , options ) )
2010-09-30 20:23:20 +04:00
for options in [ ' -U " $USERNAME % $PASSWORD " ' ] :
plantestsuite ( " samba4.ldb.ldapi with options %s (dc:local) " % options , " dc:local " ,
2010-09-30 16:55:04 +04:00
" %s /test_ldb.sh ldapi $PREFIX_ABS/dc/private/ldapi %s " % ( bbdir , options ) )
2012-10-26 23:50:41 +04:00
for t in smbtorture4_testsuites ( " ldap. " ) :
2012-10-26 23:51:19 +04:00
plansmbtorture4testsuite ( t , " dc " , ' -U " $USERNAME % $PASSWORD " //$SERVER_IP/_none_ ' )
2010-09-30 16:55:04 +04:00
2011-07-05 04:01:32 +04:00
ldbdir = os . path . join ( srcdir ( ) , " lib/ldb " )
2010-09-30 16:55:04 +04:00
# Don't run LDB tests when using system ldb, as we won't have ldbtest installed
if os . path . exists ( os . path . join ( samba4bindir , " ldbtest " ) ) :
2012-04-04 12:52:25 +04:00
plantestsuite ( " ldb.base " , " none " , " %s /tests/test-tdb-subunit.sh %s " % ( ldbdir , samba4bindir ) )
2010-09-30 16:55:04 +04:00
else :
skiptestsuite ( " ldb.base " , " Using system LDB, ldbtest not available " )
# Tests for RPC
# add tests to this list as they start passing, so we test
# that they stay passing
2010-12-11 05:26:31 +03:00
ncacn_np_tests = [ " rpc.schannel " , " rpc.join " , " rpc.lsa " , " rpc.dssetup " , " rpc.altercontext " , " rpc.multibind " , " rpc.netlogon " , " rpc.handles " , " rpc.samsync " , " rpc.samba3-sessionkey " , " rpc.samba3-getusername " , " rpc.samba3-lsa " , " rpc.samba3-bind " , " rpc.samba3-netlogon " , " rpc.asyncbind " , " rpc.lsalookup " , " rpc.lsa-getuser " , " rpc.schannel2 " , " rpc.authcontext " ]
ncalrpc_tests = [ " rpc.schannel " , " rpc.join " , " rpc.lsa " , " rpc.dssetup " , " rpc.altercontext " , " rpc.multibind " , " rpc.netlogon " , " rpc.drsuapi " , " rpc.asyncbind " , " rpc.lsalookup " , " rpc.lsa-getuser " , " rpc.schannel2 " , " rpc.authcontext " ]
2012-10-26 23:50:41 +04:00
drs_rpc_tests = smbtorture4_testsuites ( " drs.rpc " )
2012-07-06 10:04:45 +04:00
ncacn_ip_tcp_tests = [ " rpc.schannel " , " rpc.join " , " rpc.lsa " , " rpc.dssetup " , " rpc.multibind " , " rpc.netlogon " , " rpc.asyncbind " , " rpc.lsalookup " , " rpc.lsa-getuser " , " rpc.schannel2 " , " rpc.authcontext " ] + drs_rpc_tests
2010-12-11 05:26:31 +03:00
slow_ncacn_np_tests = [ " rpc.samlogon " , " rpc.samr.users " , " rpc.samr.large-dc " , " rpc.samr.users.privileges " , " rpc.samr.passwords " , " rpc.samr.passwords.pwdlastset " ]
slow_ncacn_ip_tcp_tests = [ " rpc.samr " , " rpc.cracknames " ]
2010-09-30 16:55:04 +04:00
2010-12-11 05:26:31 +03:00
all_rpc_tests = ncalrpc_tests + ncacn_np_tests + ncacn_ip_tcp_tests + slow_ncacn_np_tests + slow_ncacn_ip_tcp_tests + [ " rpc.lsa.secrets " , " rpc.pac " , " rpc.samba3-sharesec " , " rpc.countcalls " ]
2010-09-30 16:55:04 +04:00
# Make sure all tests get run
2012-10-26 23:50:41 +04:00
rpc_tests = smbtorture4_testsuites ( " rpc. " )
2010-09-30 20:23:20 +04:00
auto_rpc_tests = filter ( lambda t : t not in all_rpc_tests , rpc_tests )
2010-09-30 16:55:04 +04:00
2010-09-30 20:23:20 +04:00
for bindoptions in [ " seal,padcheck " ] + validate_list + [ " bigendian " ] :
2010-09-30 16:55:04 +04:00
for transport in [ " ncalrpc " , " ncacn_np " , " ncacn_ip_tcp " ] :
env = " dc "
if transport == " ncalrpc " :
tests = ncalrpc_tests
env = " dc:local "
elif transport == " ncacn_np " :
tests = ncacn_np_tests
elif transport == " ncacn_ip_tcp " :
tests = ncacn_ip_tcp_tests
2011-12-08 05:42:08 +04:00
else :
raise AssertionError ( " invalid transport %r " % transport )
2010-09-30 16:55:04 +04:00
for t in tests :
2012-10-26 23:51:19 +04:00
plansmbtorture4testsuite ( t , env , [ " %s :$SERVER[ %s ] " % ( transport , bindoptions ) , ' -U$USERNAME % $PASSWORD ' , ' --workgroup=$DOMAIN ' ] , " samba4. %s on %s with %s " % ( t , transport , bindoptions ) )
plansmbtorture4testsuite ( ' rpc.samba3-sharesec ' , env , [ " %s :$SERVER[ %s ] " % ( transport , bindoptions ) , ' -U$USERNAME % $PASSWORD ' , ' --workgroup=$DOMAIN ' , ' --option=torture:share=tmp ' ] , " samba4.rpc.samba3.sharesec on %s with %s " % ( transport , bindoptions ) )
2010-09-30 16:55:04 +04:00
2011-07-18 14:26:26 +04:00
#Plugin S4 DC tests (confirms named pipe auth forwarding). This can be expanded once kerberos is supported in the plugin DC
#
2012-02-14 02:05:21 +04:00
for bindoptions in [ " seal,padcheck " ] + validate_list + [ " bigendian " ] :
for t in ncacn_np_tests :
env = " plugin_s4_dc "
transport = " ncacn_np "
2012-10-26 23:51:19 +04:00
plansmbtorture4testsuite ( t , env , [ " %s :$SERVER[ %s ] " % ( transport , bindoptions ) , ' -U$USERNAME % $PASSWORD ' , ' --workgroup=$DOMAIN ' ] , " samba4. %s with %s " % ( t , bindoptions ) )
2011-07-18 14:26:26 +04:00
2010-09-30 20:23:20 +04:00
for bindoptions in [ " " ] + validate_list + [ " bigendian " ] :
2010-09-30 16:55:04 +04:00
for t in auto_rpc_tests :
2012-10-26 23:51:19 +04:00
plansmbtorture4testsuite ( t , " dc " , [ " $SERVER[ %s ] " % bindoptions , ' -U$USERNAME % $PASSWORD ' , ' --workgroup=$DOMAIN ' ] , " samba4. %s with %s " % ( t , bindoptions ) )
2010-09-30 16:55:04 +04:00
2010-12-11 05:26:31 +03:00
t = " rpc.countcalls "
2012-10-26 23:51:19 +04:00
plansmbtorture4testsuite ( t , " dc:local " , [ " $SERVER[ %s ] " % bindoptions , ' -U$USERNAME % $PASSWORD ' , ' --workgroup=$DOMAIN ' ] , modname = " samba4. %s " % t )
2010-09-30 16:55:04 +04:00
for transport in [ " ncacn_np " , " ncacn_ip_tcp " ] :
env = " dc "
if transport == " ncacn_np " :
tests = slow_ncacn_np_tests
elif transport == " ncacn_ip_tcp " :
tests = slow_ncacn_ip_tcp_tests
2011-12-08 05:42:08 +04:00
else :
raise AssertionError ( " Invalid transport %r " % transport )
2010-09-30 16:55:04 +04:00
for t in tests :
2012-10-26 23:51:19 +04:00
plansmbtorture4testsuite ( t , env , [ " %s :$SERVER " % transport , ' -U$USERNAME % $PASSWORD ' , ' --workgroup=$DOMAIN ' ] , " samba4. %s on %s " % ( t , transport ) )
2010-09-30 16:55:04 +04:00
# Tests for the DFS referral calls implementation
2012-10-26 23:50:41 +04:00
for t in smbtorture4_testsuites ( " dfs. " ) :
2012-10-26 23:51:19 +04:00
plansmbtorture4testsuite ( t , " dc " , ' //$SERVER/ipc \ $ -U$USERNAME % $PASSWORD ' )
plansmbtorture4testsuite ( t , " plugin_s4_dc " , ' //$SERVER/ipc \ $ -U$USERNAME % $PASSWORD ' )
2010-09-30 16:55:04 +04:00
2010-12-11 05:26:31 +03:00
# Tests for the NET API (net.api.become.dc tested below against all the roles)
2012-10-26 23:50:41 +04:00
net_tests = filter ( lambda x : " net.api.become.dc " not in x , smbtorture4_testsuites ( " net. " ) )
2010-09-30 16:55:04 +04:00
for t in net_tests :
2012-10-26 23:51:19 +04:00
plansmbtorture4testsuite ( t , " dc " , ' $SERVER[ %s ] -U$USERNAME %% $PASSWORD -W$DOMAIN ' % validate )
2010-09-30 16:55:04 +04:00
# Tests for session keys and encryption of RPC pipes
# FIXME: Integrate these into a single smbtorture test
transport = " ncacn_np "
2012-06-28 14:42:31 +04:00
for env in [ " dc " , " s3dc " ] :
for ntlmoptions in [
" -k no --option=usespnego=yes " ,
" -k no --option=usespnego=yes --option=ntlmssp_client:128bit=no " ,
" -k no --option=usespnego=yes --option=ntlmssp_client:56bit=yes " ,
" -k no --option=usespnego=yes --option=ntlmssp_client:56bit=no " ,
" -k no --option=usespnego=yes --option=ntlmssp_client:128bit=no --option=ntlmssp_client:56bit=yes " ,
" -k no --option=usespnego=yes --option=ntlmssp_client:128bit=no --option=ntlmssp_client:56bit=no " ,
" -k no --option=usespnego=yes --option=clientntlmv2auth=yes " ,
" -k no --option=usespnego=yes --option=clientntlmv2auth=yes --option=ntlmssp_client:128bit=no " ,
" -k no --option=usespnego=yes --option=clientntlmv2auth=yes --option=ntlmssp_client:128bit=no --option=ntlmssp_client:56bit=yes " ,
" -k no --option=usespnego=no --option=clientntlmv2auth=yes " ,
" -k no --option=gensec:spnego=no --option=clientntlmv2auth=yes " ,
" -k no --option=usespnego=no " ] :
name = " rpc.lsa.secrets on %s with with %s " % ( transport , ntlmoptions )
2012-10-26 23:51:19 +04:00
plansmbtorture4testsuite ( ' rpc.lsa.secrets ' , env , [ " %s :$SERVER[] " % ( transport ) , ntlmoptions , ' -U$USERNAME % $PASSWORD ' , ' --workgroup=$DOMAIN ' , ' --option=gensec:target_hostname=$NETBIOSNAME ' ] , " samba4. %s " % name )
2012-08-08 10:02:29 +04:00
plantestsuite ( " samba.blackbox.pdbtest " , " %s :local " % env , [ os . path . join ( bbdir , " test_pdbtest.sh " ) , ' $SERVER ' , " $PREFIX " , smbclient , ' $SMB_CONF_PATH ' , configuration ] )
2010-09-30 16:55:04 +04:00
transports = [ " ncacn_np " , " ncacn_ip_tcp " ]
#Kerberos varies between functional levels, so it is important to check this on all of them
2012-03-05 03:46:23 +04:00
for env in [ " dc " , " fl2000dc " , " fl2003dc " , " fl2008r2dc " , " plugin_s4_dc " ] :
2010-11-02 13:57:13 +03:00
transport = " ncacn_np "
2012-10-26 23:51:19 +04:00
plansmbtorture4testsuite ( ' rpc.pac ' , env , [ " %s :$SERVER[] " % ( transport , ) , ' -U$USERNAME % $PASSWORD ' , ' --workgroup=$DOMAIN ' ] , " samba4.rpc.pac on %s " % ( transport , ) )
plansmbtorture4testsuite ( ' rpc.lsa.secrets ' , env , [ " %s :$SERVER[] " % ( transport , ) , ' -k ' , ' yes ' , ' -U$USERNAME % $PASSWORD ' , ' --workgroup=$DOMAIN ' , ' --option=gensec:target_hostname=$NETBIOSNAME ' , ' rpc.lsa.secrets ' ] , " samba4.rpc.lsa.secrets on %s with Kerberos " % ( transport , ) )
plansmbtorture4testsuite ( ' rpc.lsa.secrets ' , env , [ " %s :$SERVER[] " % ( transport , ) , ' -k ' , ' yes ' , ' -U$USERNAME % $PASSWORD ' , ' --workgroup=$DOMAIN ' , " --option=clientusespnegoprincipal=yes " , ' --option=gensec:target_hostname=$NETBIOSNAME ' ] , " samba4.rpc.lsa.secrets on %s with Kerberos - use target principal " % ( transport , ) )
plansmbtorture4testsuite ( ' rpc.lsa.secrets.none* ' , env , [ " %s :$SERVER " % transport , ' -k ' , ' yes ' , ' -U$USERNAME % $PASSWORD ' , ' --workgroup=$DOMAIN ' , " --option=gensec:fake_gssapi_krb5=yes " , ' --option=gensec:gssapi_krb5=no ' , ' --option=gensec:target_hostname=$NETBIOSNAME ' ] , " samba4.rpc.lsa.secrets on %s with Kerberos - use Samba3 style login " % transport )
plansmbtorture4testsuite ( ' rpc.lsa.secrets.none* ' , env , [ " %s :$SERVER " % transport , ' -k ' , ' yes ' , ' -U$USERNAME % $PASSWORD ' , ' --workgroup=$DOMAIN ' , " --option=clientusespnegoprincipal=yes " , ' --option=gensec:fake_gssapi_krb5=yes ' , ' --option=gensec:gssapi_krb5=no ' , ' --option=gensec:target_hostname=$NETBIOSNAME ' ] , " samba4.rpc.lsa.secrets on %s with Kerberos - use Samba3 style login, use target principal " % transport )
2010-09-30 16:55:04 +04:00
for transport in transports :
2012-10-26 23:51:19 +04:00
plansmbtorture4testsuite ( ' rpc.echo ' , env , [ " %s :$SERVER[] " % ( transport , ) , ' -U$USERNAME % $PASSWORD ' , ' --workgroup=$DOMAIN ' ] , " samba4.rpc.echo on %s " % ( transport , ) )
2010-09-30 16:55:04 +04:00
# Echo tests test bulk Kerberos encryption of DCE/RPC
2010-09-30 20:23:20 +04:00
for bindoptions in [ " connect " , " spnego " , " spnego,sign " , " spnego,seal " ] + validate_list + [ " padcheck " , " bigendian " , " bigendian,seal " ] :
2010-09-30 16:55:04 +04:00
echooptions = " --option=socket:testnonblock=True --option=torture:quick=yes -k yes "
2012-10-26 23:51:19 +04:00
plansmbtorture4testsuite ( ' rpc.echo ' , env , [ " %s :$SERVER[ %s ] " % ( transport , bindoptions ) , echooptions , ' -U$USERNAME % $PASSWORD ' , ' --workgroup=$DOMAIN ' ] , " samba4.rpc.echo on %s with %s and %s " % ( transport , bindoptions , echooptions ) )
plansmbtorture4testsuite ( " net.api.become.dc " , env , ' $SERVER[ %s ] -U$USERNAME %% $PASSWORD -W$DOMAIN ' % validate )
2010-09-30 16:55:04 +04:00
2011-01-09 15:55:24 +03:00
for bindoptions in [ " sign " , " seal " ] :
2012-10-26 23:51:19 +04:00
plansmbtorture4testsuite ( ' rpc.backupkey ' , " dc " , [ " ncacn_np:$SERVER[ %s ] " % ( bindoptions ) , ' -U$USERNAME % $PASSWORD ' , ' --workgroup=$DOMAIN ' ] , " samba4.rpc.backupkey with %s " % ( bindoptions ) )
2011-01-09 15:55:24 +03:00
2010-09-30 16:55:04 +04:00
for transport in transports :
for bindoptions in [ " sign " , " seal " ] :
for ntlmoptions in [
" --option=ntlmssp_client:ntlm2=yes --option=torture:quick=yes " ,
" --option=ntlmssp_client:ntlm2=no --option=torture:quick=yes " ,
" --option=ntlmssp_client:ntlm2=yes --option=ntlmssp_client:128bit=no --option=torture:quick=yes " ,
" --option=ntlmssp_client:ntlm2=no --option=ntlmssp_client:128bit=no --option=torture:quick=yes " ,
" --option=ntlmssp_client:ntlm2=yes --option=ntlmssp_client:keyexchange=no --option=torture:quick=yes " ,
2010-09-30 20:23:20 +04:00
" --option=ntlmssp_client:ntlm2=no --option=ntlmssp_client:keyexchange=no --option=torture:quick=yes " ,
" --option=clientntlmv2auth=yes --option=ntlmssp_client:keyexchange=no --option=torture:quick=yes " ,
2010-09-30 16:55:04 +04:00
" --option=clientntlmv2auth=yes --option=ntlmssp_client:128bit=no --option=ntlmssp_client:keyexchange=yes --option=torture:quick=yes " ,
" --option=clientntlmv2auth=yes --option=ntlmssp_client:128bit=no --option=ntlmssp_client:keyexchange=no --option=torture:quick=yes " ] :
if transport == " ncalrpc " :
env = " dc:local "
else :
env = " dc "
2012-10-26 23:51:19 +04:00
plansmbtorture4testsuite ( ' rpc.echo ' , env , [ " %s :$SERVER[ %s ] " % ( transport , bindoptions ) , ntlmoptions , ' -U$USERNAME % $PASSWORD ' , ' --workgroup=$DOMAIN ' ] , " samba4.rpc.echo on %s with %s and %s " % ( transport , bindoptions , ntlmoptions ) )
2010-09-30 16:55:04 +04:00
2012-10-26 23:51:19 +04:00
plansmbtorture4testsuite ( ' rpc.echo ' , " dc " , [ ' ncacn_np:$SERVER[smb2] ' , ' -U$USERNAME % $PASSWORD ' , ' --workgroup=$DOMAIN ' ] , " samba4.rpc.echo on ncacn_np over smb2 " )
2010-09-30 16:55:04 +04:00
2012-10-26 23:51:19 +04:00
plansmbtorture4testsuite ( ' ntp.signd ' , " dc:local " , [ ' ncacn_np:$SERVER ' , ' -U$USERNAME % $PASSWORD ' , ' --workgroup=$DOMAIN ' ] , " samba4.ntp.signd " )
2010-09-30 16:55:04 +04:00
2012-10-26 23:50:41 +04:00
nbt_tests = smbtorture4_testsuites ( " nbt. " )
2011-09-19 07:11:50 +04:00
for t in nbt_tests :
2012-10-26 23:51:19 +04:00
plansmbtorture4testsuite ( t , " dc " , " //$SERVER/_none_ -U \" $USERNAME % $PASSWORD \" " )
2011-09-19 07:11:50 +04:00
2010-09-30 16:55:04 +04:00
# Tests against the NTVFS POSIX backend
ntvfsargs = [ " --option=torture:sharedelay=10000 " , " --option=torture:oplocktimeout=3 " , " --option=torture:writetimeupdatedelay=50000 " ]
2012-10-26 23:50:41 +04:00
smb2 = smbtorture4_testsuites ( " smb2. " )
2010-09-30 16:55:04 +04:00
#The QFILEINFO-IPC test needs to be on ipc$
2012-10-26 23:50:41 +04:00
raw = filter ( lambda x : " raw.qfileinfo.ipc " not in x , smbtorture4_testsuites ( " raw. " ) )
base = smbtorture4_testsuites ( " base. " )
2010-09-30 16:55:04 +04:00
2012-10-26 23:50:41 +04:00
netapi = smbtorture4_testsuites ( " netapi. " )
2011-05-11 00:14:34 +04:00
2012-10-26 23:50:41 +04:00
libsmbclient = smbtorture4_testsuites ( " libsmbclient. " )
2011-05-11 00:14:34 +04:00
for t in base + raw + smb2 + netapi + libsmbclient :
2012-10-26 23:51:19 +04:00
plansmbtorture4testsuite ( t , " dc " , [ ' //$SERVER/tmp ' , ' -U$USERNAME % $PASSWORD ' ] + ntvfsargs )
2010-09-30 16:55:04 +04:00
2012-10-26 23:51:19 +04:00
plansmbtorture4testsuite ( " raw.qfileinfo.ipc " , " dc " , ' //$SERVER/ipc \ $ -U$USERNAME % $PASSWORD ' )
2010-09-30 16:55:04 +04:00
2012-10-26 23:50:41 +04:00
for t in smbtorture4_testsuites ( " rap. " ) :
2012-10-26 23:51:19 +04:00
plansmbtorture4testsuite ( t , " dc " , ' //$SERVER/IPC \ $ -U$USERNAME % $PASSWORD ' )
2010-09-30 16:55:04 +04:00
# Tests against the NTVFS CIFS backend
for t in base + raw :
2012-10-26 23:51:19 +04:00
plansmbtorture4testsuite ( t , " dc " , [ ' //$NETBIOSNAME/cifs ' , ' -U$USERNAME % $PASSWORD ' , ' --kerberos=yes ' ] + ntvfsargs , modname = " samba4.ntvfs.cifs.krb5. %s " % t )
2011-03-18 21:13:43 +03:00
# Test NTVFS CIFS backend with S4U2Self and S4U2Proxy
t = " base.unlink "
2012-10-26 23:51:19 +04:00
plansmbtorture4testsuite ( t , " dc " , [ ' //$NETBIOSNAME/cifs ' , ' -U$USERNAME % $PASSWORD ' , ' --kerberos=no ' ] + ntvfsargs , " samba4.ntvfs.cifs.ntlm. %s " % t )
plansmbtorture4testsuite ( t , " rpc_proxy " , [ ' //$NETBIOSNAME/cifs_to_dc ' , ' -U$DC_USERNAME % $DC_PASSWORD ' , ' --kerberos=yes ' ] + ntvfsargs , " samba4.ntvfs.cifs.krb5. %s " % t )
plansmbtorture4testsuite ( t , " rpc_proxy " , [ ' //$NETBIOSNAME/cifs_to_dc ' , ' -U$DC_USERNAME % $DC_PASSWORD ' , ' --kerberos=no ' ] + ntvfsargs , " samba4.ntvfs.cifs.ntlm. %s " % t )
2010-09-30 16:55:04 +04:00
2012-10-26 23:51:19 +04:00
plansmbtorture4testsuite ( ' echo.udp ' , ' dc:local ' , ' //$SERVER/whatever ' )
2010-11-16 01:01:57 +03:00
2010-09-30 16:55:04 +04:00
# Local tests
2012-10-26 23:50:41 +04:00
for t in smbtorture4_testsuites ( " local. " ) :
2011-12-13 23:55:53 +04:00
#The local.resolve test needs a name to look up using real system (not emulated) name routines
2012-10-26 23:51:19 +04:00
plansmbtorture4testsuite ( t , " none " , " ncalrpc:localhost " )
2010-09-30 16:55:04 +04:00
2011-09-10 03:53:29 +04:00
# Confirm these tests with the system iconv too
for t in [ " local.convert_string_handle " , " local.convert_string " , " local.ndr " ] :
2011-11-14 04:54:26 +04:00
options = " ncalrpc: --option= ' iconv:use_builtin_handlers=false ' "
2012-10-26 23:51:19 +04:00
plansmbtorture4testsuite ( t , " none " , options ,
2011-11-14 04:54:26 +04:00
modname = " samba4. %s .system.iconv " % t )
2011-09-10 03:53:29 +04:00
2010-09-30 16:55:04 +04:00
tdbtorture4 = binpath ( " tdbtorture " )
if os . path . exists ( tdbtorture4 ) :
plantestsuite ( " tdb.stress " , " none " , valgrindify ( tdbtorture4 ) )
else :
skiptestsuite ( " tdb.stress " , " Using system TDB, tdbtorture not available " )
2012-10-26 23:51:19 +04:00
plansmbtorture4testsuite ( " drs.unit " , " none " , " ncalrpc: " )
2010-09-30 16:55:04 +04:00
# Pidl tests
2010-09-30 20:23:20 +04:00
for f in sorted ( os . listdir ( os . path . join ( samba4srcdir , " ../pidl/tests " ) ) ) :
2010-09-30 16:55:04 +04:00
if f . endswith ( " .pl " ) :
2010-09-30 20:29:58 +04:00
planperltestsuite ( " pidl. %s " % f [ : - 3 ] , os . path . normpath ( os . path . join ( samba4srcdir , " ../pidl/tests " , f ) ) )
2010-09-30 16:55:04 +04:00
2011-11-11 03:32:09 +04:00
# DNS tests
2012-09-11 02:14:39 +04:00
planpythontestsuite ( " fl2003dc " , " samba.tests.dns " )
2012-10-26 23:50:41 +04:00
for t in smbtorture4_testsuites ( " dns_internal. " ) :
2012-10-26 23:51:19 +04:00
plansmbtorture4testsuite ( t , " dc:local " , ' //$SERVER/whavever ' )
2012-09-11 02:14:39 +04:00
2012-09-06 08:26:57 +04:00
# Local tests
2012-10-26 23:50:41 +04:00
for t in smbtorture4_testsuites ( " dlz_bind9. " ) :
2012-09-06 08:26:57 +04:00
#The dlz_bind9 tests needs to look at the DNS database
2012-10-26 23:51:19 +04:00
plansmbtorture4testsuite ( t , " chgdcpass:local " , " ncalrpc:localhost " )
2011-11-11 03:32:09 +04:00
2012-08-15 16:08:45 +04:00
planpythontestsuite ( " s3dc " , " samba.tests.libsmb_samba_internal " ) ;
2010-09-30 16:55:04 +04:00
# Blackbox Tests:
# tests that interact directly with the command-line tools rather than using
# the API. These mainly test that the various command-line options of commands
# work correctly.
2012-08-29 03:10:40 +04:00
for env in [ " s3member " , " s4member " , " dc " , " chgdcpass " ] :
2012-08-27 15:02:28 +04:00
plantestsuite ( " samba4.blackbox.smbclient( %s :local) " % env , " %s :local " % env , [ os . path . join ( samba4srcdir , " utils/tests/test_smbclient.sh " ) , ' $SERVER ' , ' $SERVER_IP ' , ' $USERNAME ' , ' $PASSWORD ' , ' $DOMAIN ' , smbclient ] )
2012-05-30 14:04:30 +04:00
plantestsuite ( " samba4.blackbox.samba_tool(dc:local) " , " dc:local " , [ os . path . join ( samba4srcdir , " utils/tests/test_samba_tool.sh " ) , ' $SERVER ' , ' $SERVER_IP ' , ' $USERNAME ' , ' $PASSWORD ' , ' $DOMAIN ' , smbclient ] )
2012-05-30 14:16:49 +04:00
plantestsuite ( " samba4.blackbox.pkinit(dc:local) " , " dc:local " , [ os . path . join ( bbdir , " test_pkinit.sh " ) , ' $SERVER ' , ' $USERNAME ' , ' $PASSWORD ' , ' $REALM ' , ' $DOMAIN ' , ' $PREFIX ' , " aes256-cts-hmac-sha1-96 " , smbclient , configuration ] )
2012-05-30 14:15:10 +04:00
plantestsuite ( " samba4.blackbox.kinit(dc:local) " , " dc:local " , [ os . path . join ( bbdir , " test_kinit.sh " ) , ' $SERVER ' , ' $USERNAME ' , ' $PASSWORD ' , ' $REALM ' , ' $DOMAIN ' , ' $PREFIX ' , " aes256-cts-hmac-sha1-96 " , smbclient , configuration ] )
plantestsuite ( " samba4.blackbox.kinit(fl2000dc:local) " , " fl2000dc:local " , [ os . path . join ( bbdir , " test_kinit.sh " ) , ' $SERVER ' , ' $USERNAME ' , ' $PASSWORD ' , ' $REALM ' , ' $DOMAIN ' , ' $PREFIX ' , " arcfour-hmac-md5 " , smbclient , configuration ] )
plantestsuite ( " samba4.blackbox.kinit(fl2008r2dc:local) " , " fl2008r2dc:local " , [ os . path . join ( bbdir , " test_kinit.sh " ) , ' $SERVER ' , ' $USERNAME ' , ' $PASSWORD ' , ' $REALM ' , ' $DOMAIN ' , ' $PREFIX ' , " aes256-cts-hmac-sha1-96 " , smbclient , configuration ] )
2010-09-30 20:23:20 +04:00
plantestsuite ( " samba4.blackbox.ktpass(dc) " , " dc " , [ os . path . join ( bbdir , " test_ktpass.sh " ) , ' $PREFIX ' ] )
2012-05-30 14:18:35 +04:00
plantestsuite ( " samba4.blackbox.passwords(dc:local) " , " dc:local " , [ os . path . join ( bbdir , " test_passwords.sh " ) , ' $SERVER ' , ' $USERNAME ' , ' $PASSWORD ' , ' $REALM ' , ' $DOMAIN ' , " $PREFIX " , smbclient ] )
2012-05-30 14:09:25 +04:00
plantestsuite ( " samba4.blackbox.export.keytab(dc:local) " , " dc:local " , [ os . path . join ( bbdir , " test_export_keytab.sh " ) , ' $SERVER ' , ' $USERNAME ' , ' $REALM ' , ' $DOMAIN ' , " $PREFIX " , smbclient ] )
2010-09-30 20:23:20 +04:00
plantestsuite ( " samba4.blackbox.cifsdd(dc) " , " dc " , [ os . path . join ( samba4srcdir , " client/tests/test_cifsdd.sh " ) , ' $SERVER ' , ' $USERNAME ' , ' $PASSWORD ' , " $DOMAIN " ] )
2012-05-29 18:35:18 +04:00
plantestsuite ( " samba4.blackbox.nmblookup(dc) " , " dc " , [ os . path . join ( samba4srcdir , " utils/tests/test_nmblookup.sh " ) , ' $NETBIOSNAME ' , ' $NETBIOSALIAS ' , ' $SERVER ' , ' $SERVER_IP ' , nmblookup ] )
2010-09-30 20:23:20 +04:00
plantestsuite ( " samba4.blackbox.locktest(dc) " , " dc " , [ os . path . join ( samba4srcdir , " torture/tests/test_locktest.sh " ) , ' $SERVER ' , ' $USERNAME ' , ' $PASSWORD ' , ' $DOMAIN ' , ' $PREFIX ' ] )
plantestsuite ( " samba4.blackbox.masktest " , " dc " , [ os . path . join ( samba4srcdir , " torture/tests/test_masktest.sh " ) , ' $SERVER ' , ' $USERNAME ' , ' $PASSWORD ' , ' $DOMAIN ' , ' $PREFIX ' ] )
plantestsuite ( " samba4.blackbox.gentest(dc) " , " dc " , [ os . path . join ( samba4srcdir , " torture/tests/test_gentest.sh " ) , ' $SERVER ' , ' $USERNAME ' , ' $PASSWORD ' , ' $DOMAIN ' , " $PREFIX " ] )
plantestsuite ( " samba4.blackbox.wbinfo(dc:local) " , " dc:local " , [ os . path . join ( samba4srcdir , " ../nsswitch/tests/test_wbinfo.sh " ) , ' $DOMAIN ' , ' $USERNAME ' , ' $PASSWORD ' , " dc " ] )
2011-04-18 12:57:22 +04:00
plantestsuite ( " samba4.blackbox.wbinfo(s4member:local) " , " s4member:local " , [ os . path . join ( samba4srcdir , " ../nsswitch/tests/test_wbinfo.sh " ) , ' $DOMAIN ' , ' $DC_USERNAME ' , ' $DC_PASSWORD ' , " s4member " ] )
2012-05-30 14:07:18 +04:00
plantestsuite ( " samba4.blackbox.chgdcpass " , " chgdcpass " , [ os . path . join ( bbdir , " test_chgdcpass.sh " ) , ' $SERVER ' , " CHGDCPASS \ $ " , ' $REALM ' , ' $DOMAIN ' , ' $PREFIX ' , " aes256-cts-hmac-sha1-96 " , ' $SELFTEST_PREFIX/chgdcpass ' , smbclient ] )
2012-10-26 23:50:41 +04:00
plantestsuite_loadlist ( " samba4.rpc.echo against NetBIOS alias " , " dc " , [ valgrindify ( smbtorture4 ) , " $LISTOPT " , ' ncacn_np:$NETBIOSALIAS ' , ' -U$DOMAIN/$USERNAME % $PASSWORD ' , ' rpc.echo ' ] )
2010-09-30 16:55:04 +04:00
# Tests using the "Simple" NTVFS backend
2010-12-11 05:26:31 +03:00
for t in [ " base.rw1 " ] :
2012-10-26 23:51:19 +04:00
plansmbtorture4testsuite ( t , " dc " , [ " //$SERVER/simple " , ' -U$USERNAME % $PASSWORD ' ] , modname = " samba4.ntvfs.simple. %s " % t )
2010-09-30 16:55:04 +04:00
2011-04-18 12:57:22 +04:00
# Domain S4member Tests
2012-10-26 23:51:19 +04:00
plansmbtorture4testsuite ( ' rpc.echo ' , " s4member " , [ ' ncacn_np:$NETBIOSNAME ' , ' -U$NETBIOSNAME/$USERNAME % $PASSWORD ' ] , " samba4.rpc.echo against s4member server with local creds " )
plansmbtorture4testsuite ( ' rpc.echo ' , " s4member " , [ ' ncacn_np:$NETBIOSNAME ' , ' -U$DOMAIN/$DC_USERNAME % $DC_PASSWORD ' ] , " samba4.rpc.echo against s4member server with domain creds " )
plansmbtorture4testsuite ( ' rpc.samr ' , " s4member " , [ ' ncacn_np:$NETBIOSNAME ' , ' -U$NETBIOSNAME/$USERNAME % $PASSWORD ' ] , " samba4.rpc.samr against s4member server with local creds " )
plansmbtorture4testsuite ( ' rpc.samr.users ' , " s4member " , [ ' ncacn_np:$NETBIOSNAME ' , ' -U$NETBIOSNAME/$USERNAME % $PASSWORD ' ] , " samba4.rpc.samr.users against s4member server with local creds " , )
plansmbtorture4testsuite ( ' rpc.samr.passwords ' , " s4member " , [ ' ncacn_np:$NETBIOSNAME ' , ' -U$NETBIOSNAME/$USERNAME % $PASSWORD ' ] , " samba4.rpc.samr.passwords against s4member server with local creds " )
2012-05-30 13:48:02 +04:00
plantestsuite ( " samba4.blackbox.smbclient against s4member server with local creds " , " s4member " , [ os . path . join ( samba4srcdir , " client/tests/test_smbclient.sh " ) , ' $NETBIOSNAME ' , ' $USERNAME ' , ' $PASSWORD ' , ' $NETBIOSNAME ' , ' $PREFIX ' , smbclient ] )
2010-09-30 16:55:04 +04:00
# RPC Proxy
2012-10-26 23:51:19 +04:00
plansmbtorture4testsuite ( " rpc.echo " , " rpc_proxy " , [ ' ncacn_ip_tcp:$NETBIOSNAME ' , ' -U$DOMAIN/$DC_USERNAME % $DC_PASSWORD ' ] , modname = " samba4.rpc.echo against rpc proxy with domain creds " )
2010-09-30 16:55:04 +04:00
# Tests SMB signing
for mech in [
" -k no " ,
" -k no --option=usespnego=no " ,
" -k no --option=gensec:spengo=no " ,
" -k yes " ,
" -k yes --option=gensec:fake_gssapi_krb5=yes --option=gensec:gssapi_krb5=no " ] :
for signing in [ " --signing=on " , " --signing=required " ] :
signoptions = " %s %s " % ( mech , signing )
name = " smb.signing on with %s " % signoptions
2012-10-26 23:51:19 +04:00
plansmbtorture4testsuite ( ' base.xcopy ' , " dc " , [ ' //$NETBIOSNAME/xcopy_share ' , signoptions , ' -U$USERNAME % $PASSWORD ' ] , modname = " samba4. %s " % name )
2010-09-30 16:55:04 +04:00
for mech in [
" -k no " ,
" -k no --option=usespnego=no " ,
" -k no --option=gensec:spengo=no " ,
2011-04-19 10:38:46 +04:00
" -k yes " ] :
2010-09-30 16:55:04 +04:00
signoptions = " %s --signing=off " % mech
2011-04-19 10:38:46 +04:00
name = " smb.signing disabled on with %s " % signoptions
2012-10-26 23:51:19 +04:00
plansmbtorture4testsuite ( ' base.xcopy ' , " s4member " , [ ' //$NETBIOSNAME/xcopy_share ' , signoptions , ' -U$DC_USERNAME % $DC_PASSWORD ' ] , " samba4. %s domain-creds " % name )
plansmbtorture4testsuite ( ' base.xcopy ' , " s3member " , [ ' //$NETBIOSNAME/xcopy_share ' , signoptions , ' -U$DC_USERNAME % $DC_PASSWORD ' ] , " samba4. %s domain-creds " % name )
plansmbtorture4testsuite ( ' base.xcopy ' , " plugin_s4_dc " , [ ' //$NETBIOSNAME/xcopy_share ' , signoptions , ' -U$USERNAME % $PASSWORD ' ] , " samba4. %s " % name )
plansmbtorture4testsuite ( ' base.xcopy ' , " plugin_s4_dc " ,
2012-02-14 02:05:21 +04:00
[ ' //$NETBIOSNAME/xcopy_share ' , signoptions , ' -U$DC_USERNAME % $DC_PASSWORD ' ] , " samba4. %s administrator " % name )
2010-09-30 16:55:04 +04:00
2012-05-30 13:57:16 +04:00
plantestsuite ( " samba4.blackbox.bogusdomain " , " s3member " , [ " testprogs/blackbox/bogus.sh " , " $NETBIOSNAME " , " xcopy_share " , ' $USERNAME ' , ' $PASSWORD ' , ' $DC_USERNAME ' , ' $DC_PASSWORD ' , smbclient ] )
2010-09-30 16:55:04 +04:00
for mech in [
" -k no " ,
" -k no --option=usespnego=no " ,
" -k no --option=gensec:spengo=no " ] :
signoptions = " %s --signing=off " % mech
2012-10-26 23:51:19 +04:00
plansmbtorture4testsuite ( ' base.xcopy ' , " s4member " , [ ' //$NETBIOSNAME/xcopy_share ' , signoptions , ' -U$NETBIOSNAME/$USERNAME % $PASSWORD ' ] , modname = " samba4.smb.signing on with %s local-creds " % signoptions )
2011-07-26 10:17:30 +04:00
2012-10-26 23:51:19 +04:00
plansmbtorture4testsuite ( ' base.xcopy ' , " dc " , [ ' //$NETBIOSNAME/xcopy_share ' , ' -k ' , ' no ' , ' --signing=yes ' , ' -U % ' ] , modname = " samba4.smb.signing --signing=yes anon " )
plansmbtorture4testsuite ( ' base.xcopy ' , " dc " , [ ' //$NETBIOSNAME/xcopy_share ' , ' -k ' , ' no ' , ' --signing=required ' , ' -U % ' ] , modname = " samba4.smb.signing --signing=required anon " )
plansmbtorture4testsuite ( ' base.xcopy ' , " s4member " , [ ' //$NETBIOSNAME/xcopy_share ' , ' -k ' , ' no ' , ' --signing=no ' , ' -U % ' ] , modname = " samba4.smb.signing --signing=no anon " )
2010-09-30 16:55:04 +04:00
wb_opts = [ " --option= \" torture:strict mode=no \" " , " --option= \" torture:timelimit=1 \" " , " --option= \" torture:winbindd_separator=/ \" " , " --option= \" torture:winbindd_netbios_name=$SERVER \" " , " --option= \" torture:winbindd_netbios_domain=$DOMAIN \" " ]
2012-10-26 23:50:41 +04:00
winbind_struct_tests = smbtorture4_testsuites ( " winbind.struct " )
winbind_ndr_tests = smbtorture4_testsuites ( " winbind.ndr " )
2012-02-29 05:48:21 +04:00
for env in [ " plugin_s4_dc " , " dc " , " s4member " ] :
2010-09-30 16:55:04 +04:00
for t in winbind_struct_tests :
2012-10-26 23:51:19 +04:00
plansmbtorture4testsuite ( t , env , wb_opts + [ ' //_none_/_none_ ' ] )
2010-09-30 16:55:04 +04:00
for t in winbind_ndr_tests :
2012-10-26 23:51:19 +04:00
plansmbtorture4testsuite ( t , env , wb_opts + [ ' //_none_/_none_ ' ] )
2010-09-30 16:55:04 +04:00
nsstest4 = binpath ( " nsstest " )
2012-02-29 05:48:21 +04:00
for env in [ " plugin_s4_dc " , " dc " , " s4member " , " s3dc " , " s3member " , " member " ] :
2012-02-16 08:10:00 +04:00
if os . path . exists ( nsstest4 ) :
plantestsuite ( " samba4.nss.test using winbind( %s ) " % env , env , [ os . path . join ( bbdir , " nsstest.sh " ) , nsstest4 , os . path . join ( samba4bindir , " default/nsswitch/libnss-winbind.so " ) ] )
else :
skiptestsuite ( " samba4.nss.test using winbind( %s ) " % env , " nsstest not available " )
2010-09-30 16:55:04 +04:00
subunitrun = valgrindify ( python ) + " " + os . path . join ( samba4srcdir , " scripting/bin/subunitrun " )
2011-11-11 00:50:38 +04:00
def planoldpythontestsuite ( env , module , name = None , extra_path = [ ] , environ = { } , extra_args = [ ] ) :
2010-12-09 18:28:31 +03:00
environ = dict ( environ )
2011-11-10 23:39:34 +04:00
py_path = list ( extra_path )
if py_path :
environ [ " PYTHONPATH " ] = " : " . join ( [ " $PYTHONPATH " ] + py_path )
2010-12-09 18:28:31 +03:00
args = [ " %s = %s " % item for item in environ . iteritems ( ) ]
args + = [ subunitrun , " $LISTOPT " , module ]
args + = extra_args
2011-11-10 23:39:34 +04:00
if name is None :
name = module
2010-12-09 18:28:31 +03:00
plantestsuite ( name , env , args )
2011-11-10 23:39:34 +04:00
planoldpythontestsuite ( " dc:local " , " samba.tests.gensec " , extra_args = [ ' -U " $USERNAME % $PASSWORD " ' ] )
planoldpythontestsuite ( " none " , " simple " , extra_path = [ " %s /lib/tdb/python/tests " % srcdir ( ) ] , name = " tdb.python " )
2010-09-30 16:55:04 +04:00
planpythontestsuite ( " dc:local " , " samba.tests.dcerpc.sam " )
planpythontestsuite ( " dc:local " , " samba.tests.dsdb " )
planpythontestsuite ( " dc:local " , " samba.tests.dcerpc.bare " )
planpythontestsuite ( " dc:local " , " samba.tests.dcerpc.unix " )
2011-12-08 05:42:28 +04:00
planpythontestsuite ( " dc:local " , " samba.tests.dcerpc.srvsvc " )
2011-11-02 18:02:47 +04:00
planpythontestsuite ( " dc:local " , " samba.tests.samba_tool.timecmd " )
planpythontestsuite ( " dc:local " , " samba.tests.samba_tool.user " )
2012-03-19 01:19:46 +04:00
planpythontestsuite ( " dc:local " , " samba.tests.samba_tool.group " )
2012-08-22 15:19:41 +04:00
planpythontestsuite ( " plugin_s4_dc:local " , " samba.tests.samba_tool.ntacl " )
2011-11-02 18:02:47 +04:00
2010-09-30 16:55:04 +04:00
planpythontestsuite ( " dc:local " , " samba.tests.dcerpc.rpcecho " )
2011-11-10 23:39:34 +04:00
planoldpythontestsuite ( " dc:local " , " samba.tests.dcerpc.registry " , extra_args = [ ' -U " $USERNAME % $PASSWORD " ' ] )
planoldpythontestsuite ( " dc " , " samba.tests.dcerpc.dnsserver " , extra_args = [ ' -U " $USERNAME % $PASSWORD " ' ] )
2012-03-05 03:46:23 +04:00
planoldpythontestsuite ( " plugin_s4_dc " , " samba.tests.dcerpc.dnsserver " , extra_args = [ ' -U " $USERNAME % $PASSWORD " ' ] )
2011-11-28 00:05:09 +04:00
plantestsuite ( " samba4.ldap.python(dc) " , " dc " , [ python , os . path . join ( samba4srcdir , " dsdb/tests/python/ldap.py " ) , ' $SERVER ' , ' -U " $USERNAME % $PASSWORD " ' , ' --workgroup=$DOMAIN ' ] )
plantestsuite ( " samba4.tokengroups.python(dc) " , " dc:local " , [ python , os . path . join ( samba4srcdir , " dsdb/tests/python/token_group.py " ) , ' $SERVER ' , ' -U " $USERNAME % $PASSWORD " ' , ' --workgroup=$DOMAIN ' ] )
plantestsuite ( " samba4.sam.python(dc) " , " dc " , [ python , os . path . join ( samba4srcdir , " dsdb/tests/python/sam.py " ) , ' $SERVER ' , ' -U " $USERNAME % $PASSWORD " ' , ' --workgroup=$DOMAIN ' ] )
2011-11-10 23:39:34 +04:00
planoldpythontestsuite ( " dc " , " dsdb_schema_info " ,
extra_path = [ os . path . join ( samba4srcdir , ' dsdb/tests/python ' ) ] ,
name = " samba4.schemaInfo.python(dc) " ,
extra_args = [ ' -U " $DOMAIN/$DC_USERNAME % $DC_PASSWORD " ' ] )
2011-11-14 13:51:56 +04:00
plantestsuite ( " samba4.urgent_replication.python(dc) " , " dc:local " , [ python , os . path . join ( samba4srcdir , " dsdb/tests/python/urgent_replication.py " ) , ' $PREFIX_ABS/dc/private/sam.ldb ' ] , allow_empty_output = True )
2011-11-28 00:05:09 +04:00
plantestsuite ( " samba4.ldap.dirsync.python(dc) " , " dc " , [ python , os . path . join ( samba4srcdir , " dsdb/tests/python/dirsync.py " ) , ' $SERVER ' , ' -U " $USERNAME % $PASSWORD " ' , ' --workgroup=$DOMAIN ' ] )
plantestsuite ( " samba4.ldap.sites.python(dc) " , " dc " , [ python , os . path . join ( samba4srcdir , " dsdb/tests/python/sites.py " ) , ' $SERVER ' , ' -U " $USERNAME % $PASSWORD " ' , ' --workgroup=$DOMAIN ' ] )
2010-09-30 16:55:04 +04:00
for env in [ " dc " , " fl2000dc " , " fl2003dc " , " fl2008r2dc " ] :
2011-11-28 00:05:09 +04:00
plantestsuite ( " samba4.ldap_schema.python( %s ) " % env , env , [ python , os . path . join ( samba4srcdir , " dsdb/tests/python/ldap_schema.py " ) , ' $SERVER ' , ' -U " $USERNAME % $PASSWORD " ' , ' --workgroup=$DOMAIN ' ] )
plantestsuite ( " samba4.ldap.possibleInferiors.python( %s ) " % env , env , [ python , os . path . join ( samba4srcdir , " dsdb/samdb/ldb_modules/tests/possibleinferiors.py " ) , " ldap://$SERVER " , ' -U " $USERNAME % $PASSWORD " ' , " -W$DOMAIN " ] )
plantestsuite ( " samba4.ldap.secdesc.python( %s ) " % env , env , [ python , os . path . join ( samba4srcdir , " dsdb/tests/python/sec_descriptor.py " ) , ' $SERVER ' , ' -U " $USERNAME % $PASSWORD " ' , ' --workgroup=$DOMAIN ' ] )
plantestsuite ( " samba4.ldap.acl.python( %s ) " % env , env , [ python , os . path . join ( samba4srcdir , " dsdb/tests/python/acl.py " ) , ' $SERVER ' , ' -U " $USERNAME % $PASSWORD " ' , ' --workgroup=$DOMAIN ' ] )
2010-11-11 12:01:26 +03:00
if env != " fl2000dc " :
2011-11-10 23:39:34 +04:00
# This test makes excessive use of the "userPassword" attribute which
2010-11-11 12:01:26 +03:00
# isn't available on DCs with Windows 2000 domain function level -
# therefore skip it in that configuration
2011-11-28 00:05:09 +04:00
plantestsuite ( " samba4.ldap.passwords.python( %s ) " % env , env , [ python , os . path . join ( samba4srcdir , " dsdb/tests/python/passwords.py " ) , " $SERVER " , ' -U " $USERNAME % $PASSWORD " ' , " -W$DOMAIN " ] )
2012-06-16 05:56:53 +04:00
2010-09-30 16:55:04 +04:00
planpythontestsuite ( " dc:local " , " samba.tests.upgradeprovisionneeddc " )
2012-08-23 09:52:04 +04:00
planpythontestsuite ( " plugin_s4_dc:local " , " samba.tests.posixacl " )
2011-02-21 03:16:03 +03:00
plantestsuite ( " samba4.deletetest.python(dc) " , " dc " , [ ' PYTHONPATH= " $PYTHONPATH: %s /lib/subunit/python: %s /lib/testtools " ' % ( srcdir ( ) , srcdir ( ) ) ,
2011-02-03 09:36:36 +03:00
python , os . path . join ( samba4srcdir , " dsdb/tests/python/deletetest.py " ) ,
2011-11-28 00:05:09 +04:00
' $SERVER ' , ' -U " $USERNAME % $PASSWORD " ' , ' --workgroup=$DOMAIN ' ] )
2010-11-04 04:07:57 +03:00
plantestsuite ( " samba4.blackbox.samba3dump " , " none " , [ python , os . path . join ( samba4srcdir , " scripting/bin/samba3dump " ) , os . path . join ( samba4srcdir , " ../testdata/samba3 " ) ] , allow_empty_output = True )
2011-08-12 11:47:49 +04:00
plantestsuite ( " samba4.blackbox.upgrade " , " none " , [ " PYTHON= %s " % python , os . path . join ( samba4srcdir , " setup/tests/blackbox_s3upgrade.sh " ) , ' $PREFIX/provision ' ] )
2010-09-30 20:23:20 +04:00
plantestsuite ( " samba4.blackbox.provision.py " , " none " , [ " PYTHON= %s " % python , os . path . join ( samba4srcdir , " setup/tests/blackbox_provision.sh " ) , ' $PREFIX/provision ' ] )
plantestsuite ( " samba4.blackbox.upgradeprovision.py " , " none " , [ " PYTHON= %s " % python , os . path . join ( samba4srcdir , " setup/tests/blackbox_upgradeprovision.sh " ) , ' $PREFIX/provision ' ] )
plantestsuite ( " samba4.blackbox.setpassword.py " , " none " , [ " PYTHON= %s " % python , os . path . join ( samba4srcdir , " setup/tests/blackbox_setpassword.sh " ) , ' $PREFIX/provision ' ] )
plantestsuite ( " samba4.blackbox.newuser.py " , " none " , [ " PYTHON= %s " % python , os . path . join ( samba4srcdir , " setup/tests/blackbox_newuser.sh " ) , ' $PREFIX/provision ' ] )
plantestsuite ( " samba4.blackbox.group.py " , " none " , [ " PYTHON= %s " % python , os . path . join ( samba4srcdir , " setup/tests/blackbox_group.sh " ) , ' $PREFIX/provision ' ] )
plantestsuite ( " samba4.blackbox.spn.py(dc:local) " , " dc:local " , [ " PYTHON= %s " % python , os . path . join ( samba4srcdir , " setup/tests/blackbox_spn.sh " ) , ' $PREFIX/dc ' ] )
2011-10-07 10:20:33 +04:00
plantestsuite ( " samba4.ldap.bind(dc) " , " dc " , [ python , os . path . join ( srcdir ( ) , " auth/credentials/tests/bind.py " ) , ' $SERVER ' , ' -U " $USERNAME % $PASSWORD " ' ] )
2010-09-30 16:55:04 +04:00
# DRS python tests
2011-11-10 23:39:34 +04:00
planoldpythontestsuite ( " vampire_dc " , " samba.tests.blackbox.samba_tool_drs " ,
environ = { ' DC1 ' : ' $DC_SERVER ' , ' DC2 ' : ' $VAMPIRE_DC_SERVER ' } ,
extra_args = [ ' -U$DOMAIN/$DC_USERNAME % $DC_PASSWORD ' ] )
2012-06-08 07:37:49 +04:00
planoldpythontestsuite ( " vampire_dc:local " , " replica_sync " ,
2011-11-10 23:39:34 +04:00
extra_path = [ os . path . join ( samba4srcdir , ' torture/drs/python ' ) ] ,
name = " samba4.drs.replica_sync.python(vampire_dc) " ,
environ = { ' DC1 ' : ' $DC_SERVER ' , ' DC2 ' : ' $VAMPIRE_DC_SERVER ' } ,
extra_args = [ ' -U$DOMAIN/$DC_USERNAME % $DC_PASSWORD ' ] )
planoldpythontestsuite ( " vampire_dc " , " delete_object " ,
extra_path = [ os . path . join ( samba4srcdir , ' torture/drs/python ' ) ] ,
name = " samba4.drs.delete_object.python(vampire_dc) " ,
environ = { ' DC1 ' : ' $DC_SERVER ' , ' DC2 ' : ' $VAMPIRE_DC_SERVER ' } ,
extra_args = [ ' -U$DOMAIN/$DC_USERNAME % $DC_PASSWORD ' ] )
planoldpythontestsuite ( " vampire_dc " , " fsmo " ,
name = " samba4.drs.fsmo.python(vampire_dc) " ,
extra_path = [ os . path . join ( samba4srcdir , ' torture/drs/python ' ) ] ,
environ = { ' DC1 ' : " $DC_SERVER " , ' DC2 ' : " $VAMPIRE_DC_SERVER " } ,
extra_args = [ ' -U$DOMAIN/$DC_USERNAME % $DC_PASSWORD ' ] )
planoldpythontestsuite ( " vampire_dc " , " repl_schema " ,
extra_path = [ os . path . join ( samba4srcdir , ' torture/drs/python ' ) ] ,
name = " samba4.drs.repl_schema.python(vampire_dc) " ,
environ = { ' DC1 ' : " $DC_SERVER " , ' DC2 ' : ' $VAMPIRE_DC_SERVER ' } ,
extra_args = [ ' -U$DOMAIN/$DC_USERNAME % $DC_PASSWORD ' ] )
2010-09-30 16:55:04 +04:00
# This makes sure we test the rid allocation code
2010-12-11 05:26:31 +03:00
t = " rpc.samr.large-dc "
2012-10-26 23:51:19 +04:00
plansmbtorture4testsuite ( t , " vampire_dc " , [ ' $SERVER ' , ' -U$USERNAME % $PASSWORD ' , ' --workgroup=$DOMAIN ' ] , modname = ( " samba4. %s .one " % t ) )
plansmbtorture4testsuite ( t , " vampire_dc " , [ ' $SERVER ' , ' -U$USERNAME % $PASSWORD ' , ' --workgroup=$DOMAIN ' ] , modname = " samba4. %s .two " % t )
2010-09-30 16:55:04 +04:00
# some RODC testing
2011-08-25 15:47:03 +04:00
for env in [ ' rodc ' ] :
2012-10-26 23:51:19 +04:00
plansmbtorture4testsuite ( ' rpc.echo ' , env , [ ' ncacn_np:$SERVER ' , " -k " , " yes " , ' -U$USERNAME % $PASSWORD ' , ' --workgroup=$DOMAIN ' ] , modname = " samba4.rpc.echo " )
plansmbtorture4testsuite ( ' rpc.echo ' , " %s :local " % env , [ ' ncacn_np:$SERVER ' , " -k " , " yes " , ' -P ' , ' --workgroup=$DOMAIN ' ] , modname = " samba4.rpc.echo " )
2011-11-14 04:54:43 +04:00
plantestsuite ( " samba4.blackbox.provision-backend " , " none " , [ " PYTHON= %s " % python , os . path . join ( samba4srcdir , " setup/tests/blackbox_provision-backend.sh " ) , ' $PREFIX/provision ' ] )
2011-05-20 23:50:55 +04:00
# Test renaming the DC
plantestsuite ( " samba4.blackbox.renamedc.sh " , " none " , [ " PYTHON= %s " % python , os . path . join ( bbdir , " renamedc.sh " ) , ' $PREFIX/provision ' ] )
2011-07-13 04:50:24 +04:00
2011-12-05 03:43:09 +04:00
# Demote the vampire DC, it must be the last test on the VAMPIRE DC
2012-07-06 09:39:09 +04:00
for env in [ ' vampire_dc ' , ' promoted_vampire_dc ' ] :
plantestsuite ( " samba4.blackbox.samba_tool_demote( %s ) " % env , env , [ os . path . join ( samba4srcdir , " utils/tests/test_demote.sh " ) , ' $SERVER ' , ' $SERVER_IP ' , ' $USERNAME ' , ' $PASSWORD ' , ' $DOMAIN ' , ' $DC_SERVER ' , ' $PREFIX/ %s ' % env , smbclient ] )
2011-08-15 09:58:27 +04:00
# check the databases are all OK. PLEASE LEAVE THIS AS THE LAST TEST
2012-07-06 14:55:43 +04:00
for env in [ " dc " , " fl2000dc " , " fl2003dc " , " fl2008r2dc " , ' vampire_dc ' , ' promoted_vampire_dc ' ] :
2011-08-15 09:58:27 +04:00
plantestsuite ( " samba4.blackbox.dbcheck( %s ) " % env , env + " :local " , [ " PYTHON= %s " % python , os . path . join ( bbdir , " dbcheck.sh " ) , ' $PREFIX/provision ' , configuration ] )