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.
import os
import subprocess
def binpath ( name ) :
return os . path . join ( samba4bindir , " %s %s " % ( name , os . getenv ( " EXEEXT " , " " ) ) )
perl = os . getenv ( " PERL " , " perl " )
if subprocess . call ( [ perl , " -e " , " eval require Test::More; " ] ) == 0 :
has_perl_test_more = True
else :
has_perl_test_more = False
try :
2010-12-09 20:49:38 +03:00
from subunit . run import TestProgram
2010-09-30 16:55:04 +04:00
except ImportError :
has_system_subunit_run = False
else :
has_system_subunit_run = True
python = os . getenv ( " PYTHON " , " python " )
def valgrindify ( cmdline ) :
""" Run a command under valgrind, if $VALGRIND was set. """
valgrind = os . getenv ( " VALGRIND " )
if valgrind is None :
return cmdline
return valgrind + " " + cmdline
2010-11-04 04:07:57 +03:00
def plantestsuite ( name , env , cmdline , allow_empty_output = False ) :
2010-09-30 16:55:04 +04:00
""" Plan a test suite.
: param name : Testsuite name
: param env : Environment to run the testsuite in
: param cmdline : Command line to run
"""
print " -- TEST -- "
print name
print env
if isinstance ( cmdline , list ) :
cmdline = " " . join ( cmdline )
2010-11-04 04:07:57 +03:00
filter_subunit_args = [ ]
if not allow_empty_output :
filter_subunit_args . append ( " --fail-on-empty " )
print " %s 2>&1 | ../selftest/filter-subunit %s --prefix= \" %s . \" " % ( cmdline , " " . join ( filter_subunit_args ) , name )
if allow_empty_output :
print " WARNING: allowing empty subunit output from %s " % name
2010-09-30 16:55:04 +04:00
def plantestsuite_loadlist ( name , env , cmdline ) :
print " -- TEST-LOADLIST -- "
if env == " none " :
fullname = name
else :
fullname = " %s ( %s ) " % ( name , env )
print fullname
print env
if isinstance ( cmdline , list ) :
cmdline = " " . join ( cmdline )
2010-11-04 04:07:57 +03:00
print " %s $LOADLIST 2>&1 | ../selftest/filter-subunit --fail-on-empty --prefix= \" %s . \" " % ( cmdline , fullname )
2010-09-30 16:55:04 +04:00
def plantestsuite_idlist ( name , env , cmdline ) :
print " -- TEST-IDLIST -- "
print name
print env
if isinstance ( cmdline , list ) :
cmdline = " " . join ( cmdline )
print cmdline
def skiptestsuite ( name , reason ) :
""" Indicate that a testsuite was skipped.
: param name : Test suite name
: param reason : Reason the test suite was skipped
"""
# FIXME: Report this using subunit, but re-adjust the testsuite count somehow
print " skipping %s ( %s ) " % ( name , reason )
def normalize_testname ( name ) :
""" Normalize a smbtorture test suite name.
"""
return name . lower ( ) . replace ( " " , " _ " ) . replace ( " - " , " . " )
def planperltestsuite ( name , path ) :
""" Run a perl test suite.
: param name : Name of the test suite
: param path : Path to the test runner
"""
if has_perl_test_more :
plantestsuite ( name , " none " , " %s %s | %s " % ( perl , path , tap2subunit ) )
else :
skiptestsuite ( name , " Test::More not available " )
def planpythontestsuite ( env , module ) :
if has_system_subunit_run :
2010-12-09 17:41:17 +03:00
plantestsuite_idlist ( module , env , [ python , " -m " , " subunit.run " , " $LISTOPT " , module ] )
2010-09-30 16:55:04 +04:00
else :
2010-12-09 17:41:17 +03:00
plantestsuite_idlist ( module , env , " PYTHONPATH=$PYTHONPATH: %s /../lib/subunit/python: %s /../lib/testtools %s -m subunit.run $LISTOPT %s " % ( samba4srcdir , samba4srcdir , python , module ) )
2010-09-30 16:55:04 +04:00
def plansmbtorturetestsuite ( name , env , options ) :
modname = " samba4. %s " % normalize_testname ( name )
cmdline = " %s %s %s " % ( valgrindify ( smb4torture ) , options , name )
plantestsuite_loadlist ( modname , env , cmdline )
2010-10-05 03:45:38 +04:00
samba4srcdir = os . path . normpath ( os . path . join ( os . path . dirname ( os . path . abspath ( __file__ ) ) , " .. " ) )
2010-09-30 16:55:04 +04:00
builddir = os . getenv ( " BUILDDIR " , samba4srcdir )
2010-09-30 20:29:58 +04:00
samba4bindir = os . path . normpath ( os . path . join ( builddir , " bin " ) )
2010-09-30 16:55:04 +04:00
smb4torture = binpath ( " smbtorture " )
2010-12-09 18:57:45 +03:00
smb4torture_testsuite_list = subprocess . Popen ( [ smb4torture , " --list-suites " ] , stdout = subprocess . PIPE , stderr = subprocess . PIPE ) . communicate ( " " ) [ 0 ] . splitlines ( )
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 = [ ]
2010-09-30 16:55:04 +04:00
def smb4torture_testsuites ( prefix ) :
return filter ( lambda x : x . startswith ( prefix ) , smb4torture_testsuite_list )
2010-10-03 01:21:11 +04:00
sub = subprocess . Popen ( " tap2subunit 2> /dev/null " , stdout = subprocess . PIPE , stdin = subprocess . PIPE , shell = True )
2010-09-30 16:55:04 +04:00
sub . communicate ( " " )
2010-09-30 20:23:20 +04:00
if sub . returncode != 0 :
2010-09-30 16:55:04 +04:00
tap2subunit = " PYTHONPATH= %s /../lib/subunit/python: %s /../lib/testtools %s %s /../lib/subunit/filters/tap2subunit " % ( samba4srcdir , samba4srcdir , python , samba4srcdir )
else :
2010-11-20 12:22:57 +03:00
cmd = " echo -ne \" 1..1 \n ok 1 # skip doesn ' t seem to work yet \n \" | tap2subunit 2> /dev/null | grep skip "
2010-11-28 06:58:52 +03:00
sub = subprocess . Popen ( cmd , stdout = subprocess . PIPE , stdin = subprocess . PIPE , stderr = subprocess . PIPE , shell = True )
2010-11-20 12:22:57 +03:00
if sub . returncode == 0 :
tap2subunit = " tap2subunit "
else :
tap2subunit = " PYTHONPATH= %s /../lib/subunit/python: %s /../lib/testtools %s %s /../lib/subunit/filters/tap2subunit " % ( samba4srcdir , samba4srcdir , python , samba4srcdir )
2010-09-30 16:55:04 +04:00
2010-10-11 23:03:10 +04:00
subprocess . call ( [ smb4torture , " -V " ] )
2010-09-30 16:55:04 +04:00
bbdir = " ../testprogs/blackbox "
configuration = " --configfile=$SMB_CONF_PATH "
2010-10-01 05:31:06 +04:00
torture_options = [ configuration , " --maximum-runtime=$SELFTEST_MAXTIME " , " --target=$SELFTEST_TARGET " , " --basedir=$SELFTEST_TMPDIR " ]
2010-09-30 16:55:04 +04:00
if not os . getenv ( " SELFTEST_VERBOSE " ) :
torture_options . append ( " --option=torture:progress=no " )
2010-09-30 20:23:20 +04:00
torture_options . append ( " --format=subunit " )
2010-09-30 16:55:04 +04:00
if os . getenv ( " SELFTEST_QUICK " ) :
torture_options . append ( " --option=torture:quick=yes " )
smb4torture + = " " + " " . join ( torture_options )
2010-09-30 20:23:20 +04:00
print " 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 ) )
# see if we support ldaps
try :
config_h = os . environ [ " CONFIG_H " ]
except KeyError :
config_h = os . path . join ( samba4bindir , " default/source4/include/config.h " )
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 ) )
for t in smb4torture_testsuites ( " LDAP- " ) :
2010-09-30 20:23:20 +04:00
plansmbtorturetestsuite ( t , " dc " , ' -U " $USERNAME % $PASSWORD " //$SERVER_IP/_none_ ' )
2010-09-30 16:55:04 +04:00
ldbdir = os . path . join ( samba4srcdir , " lib/ldb " )
# 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 " ) ) :
2010-11-27 05:13:08 +03:00
plantestsuite ( " ldb.base " , " none " ,
" TEST_DATA_PREFIX=$PREFIX %s /tests/test-tdb.sh " % ldbdir ,
allow_empty_output = True )
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
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 " ]
drs_rpc_tests = smb4torture_testsuites ( " DRS-RPC " )
ncacn_ip_tcp_tests = [ " RPC-SCHANNEL " , " RPC-JOIN " , " RPC-LSA " , " RPC-DSSETUP " , " RPC-ALTERCONTEXT " , " RPC-MULTIBIND " , " RPC-NETLOGON " , " RPC-HANDLES " , " RPC-ASYNCBIND " , " RPC-LSALOOKUP " , " RPC-LSA-GETUSER " , " RPC-SCHANNEL2 " , " RPC-AUTHCONTEXT " , " RPC-OBJECTUUID " ] + drs_rpc_tests
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-11-02 13:57:13 +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
rpc_tests = smb4torture_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
for t in tests :
2010-09-30 20:23:20 +04:00
plantestsuite_loadlist ( " samba4. %s on %s with %s " % ( normalize_testname ( t ) , transport , bindoptions ) , env , [ valgrindify ( smb4torture ) , " %s :$SERVER[ %s ] " % ( transport , bindoptions ) , ' -U$USERNAME % $PASSWORD ' , ' -W ' , ' $DOMAIN ' , t ] )
plantestsuite_loadlist ( " samba4.rpc.samba3.sharesec on %s with %s " % ( transport , bindoptions ) , env , [ valgrindify ( smb4torture ) , " %s :$SERVER[ %s ] " % ( transport , bindoptions ) , ' -U$USERNAME % $PASSWORD ' , ' -W ' , ' $DOMAIN ' , ' --option=torture:share=tmp ' , ' RPC-SAMBA3-SHARESEC ' ] )
2010-09-30 16:55:04 +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 :
2010-09-30 20:23:20 +04:00
plantestsuite_loadlist ( " samba4. %s with %s " % ( normalize_testname ( t ) , bindoptions ) , " dc " , [ valgrindify ( smb4torture ) , " $SERVER[ %s ] " % bindoptions , ' -U$USERNAME % $PASSWORD ' , ' -W ' , ' $DOMAIN ' , t ] )
2010-09-30 16:55:04 +04:00
t = " RPC-COUNTCALLS "
2010-09-30 20:23:20 +04:00
plantestsuite_loadlist ( " samba4. %s " % normalize_testname ( t ) , " dc:local " , [ valgrindify ( smb4torture ) , " $SERVER[ %s ] " % bindoptions , ' -U$USERNAME % $PASSWORD ' , ' -W ' , ' $DOMAIN ' , 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
for t in tests :
2010-09-30 20:23:20 +04:00
plantestsuite_loadlist ( " samba4. %s on %s " % ( normalize_testname ( t ) , transport ) , env , [ valgrindify ( smb4torture ) , " %s :$SERVER " % transport , ' -U$USERNAME % $PASSWORD ' , ' -W ' , ' $DOMAIN ' , t ] )
2010-09-30 16:55:04 +04:00
# Tests for the DFS referral calls implementation
for t in smb4torture_testsuites ( " DFS- " ) :
2010-09-30 20:23:20 +04:00
plansmbtorturetestsuite ( t , " dc " , ' //$SERVER/ipc \ $ -U$USERNAME % $PASSWORD ' )
2010-09-30 16:55:04 +04:00
# Tests for the NET API (NET-API-BECOME-DC tested below against all the roles)
net_tests = filter ( lambda x : " NET-API-BECOME-DC " not in x , smb4torture_testsuites ( " NET- " ) )
for t in net_tests :
2010-09-30 20:23:20 +04:00
plansmbtorturetestsuite ( 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 "
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 " ] :
2010-09-30 20:23:20 +04:00
name = " rpc.lsa.secrets on %s with with %s " % ( transport , ntlmoptions )
plantestsuite_loadlist ( " samba4. %s " % name , " dc " , [ smb4torture , " %s :$SERVER[] " % ( transport ) , ntlmoptions , ' -U$USERNAME % $PASSWORD ' , ' -W ' , ' $DOMAIN ' , ' --option=gensec:target_hostname=$NETBIOSNAME ' , ' RPC-LSA-SECRETS ' ] )
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
for env in [ " dc " , " fl2000dc " , " fl2003dc " , " fl2008r2dc " ] :
2010-11-02 13:57:13 +03:00
transport = " ncacn_np "
plantestsuite_loadlist ( " samba4.rpc.pac on %s " % ( transport , ) , env , [ smb4torture , " %s :$SERVER[] " % ( transport , ) , ' -U$USERNAME % $PASSWORD ' , ' -W ' , ' $DOMAIN ' , ' RPC-PAC ' ] )
2010-09-30 16:55:04 +04:00
for transport in transports :
2010-09-30 20:23:20 +04:00
plantestsuite_loadlist ( " samba4.rpc.lsa.secrets on %s with Kerberos " % ( transport , ) , env , [ smb4torture , " %s :$SERVER[] " % ( transport , ) , ' -k ' , ' yes ' , ' -U$USERNAME % $PASSWORD ' , ' -W ' , ' $DOMAIN ' , ' --option=gensec:target_hostname=$NETBIOSNAME ' , ' RPC-LSA-SECRETS ' ] )
plantestsuite_loadlist ( " samba4.rpc.lsa.secrets on %s with Kerberos - use target principal " % ( transport , ) , env , [ smb4torture , " %s :$SERVER[] " % ( transport , ) , ' -k ' , ' yes ' , ' -U$USERNAME % $PASSWORD ' , ' -W ' , ' $DOMAIN ' , " --option=clientusespnegoprincipal=yes " , ' --option=gensec:target_hostname=$NETBIOSNAME ' , ' RPC-LSA-SECRETS ' ] )
plantestsuite_loadlist ( " samba4.rpc.lsa.secrets on %s with Kerberos - use Samba3 style login " % transport , env , [ smb4torture , " %s :$SERVER " % transport , ' -k ' , ' yes ' , ' -U$USERNAME % $PASSWORD ' , ' -W ' , ' $DOMAIN ' , " --option=gensec:fake_gssapi_krb5=yes " , ' --option=gensec:gssapi_krb5=no ' , ' --option=gensec:target_hostname=$NETBIOSNAME ' , " RPC-LSA-SECRETS-none* " ] )
plantestsuite_loadlist ( " samba4.rpc.lsa.secrets on %s with Kerberos - use Samba3 style login, use target principal " % transport , env , [ smb4torture , " %s :$SERVER " % transport , ' -k ' , ' yes ' , ' -U$USERNAME % $PASSWORD ' , ' -W ' , ' $DOMAIN ' , " --option=clientusespnegoprincipal=yes " , ' --option=gensec:fake_gssapi_krb5=yes ' , ' --option=gensec:gssapi_krb5=no ' , ' --option=gensec:target_hostname=$NETBIOSNAME ' , " RPC-LSA-SECRETS-none* " ] )
plantestsuite_loadlist ( " samba4.rpc.echo on %s " % ( transport , ) , env , [ smb4torture , " %s :$SERVER[] " % ( transport , ) , ' -U$USERNAME % $PASSWORD ' , ' -W ' , ' $DOMAIN ' , ' RPC-ECHO ' ] )
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 "
2010-09-30 20:23:20 +04:00
plantestsuite_loadlist ( " samba4.rpc.echo on %s with %s and %s " % ( transport , bindoptions , echooptions ) , env , [ smb4torture , " %s :$SERVER[ %s ] " % ( transport , bindoptions ) , echooptions , ' -U$USERNAME % $PASSWORD ' , ' -W ' , ' $DOMAIN ' , ' RPC-ECHO ' ] )
plansmbtorturetestsuite ( " NET-API-BECOME-DC " , env , ' $SERVER[ %s ] -U$USERNAME %% $PASSWORD -W $DOMAIN ' % validate )
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 "
2010-09-30 20:23:20 +04:00
plantestsuite_loadlist ( " samba4.rpc.echo on %s with %s and %s " % ( transport , bindoptions , ntlmoptions ) , env , [ smb4torture , " %s :$SERVER[ %s ] " % ( transport , bindoptions ) , ntlmoptions , ' -U$USERNAME % $PASSWORD ' , ' -W ' , ' $DOMAIN ' , ' RPC-ECHO ' ] )
2010-09-30 16:55:04 +04:00
2010-09-30 20:23:20 +04:00
plantestsuite_loadlist ( " samba4.rpc.echo on ncacn_np over smb2 " , " dc " , [ smb4torture , ' ncacn_np:$SERVER[smb2] ' , ' -U$USERNAME % $PASSWORD ' , ' -W ' , ' $DOMAIN ' , ' RPC-ECHO ' ] )
2010-09-30 16:55:04 +04:00
2010-09-30 20:23:20 +04:00
plantestsuite_loadlist ( " samba4.ntp.signd " , " dc:local " , [ smb4torture , ' ncacn_np:$SERVER ' , ' -U$USERNAME % $PASSWORD ' , ' -W ' , ' $DOMAIN ' , ' NTP-SIGND ' ] )
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 " ]
2010-10-28 12:20:28 +04:00
smb2 = smb4torture_testsuites ( " SMB2- " )
2010-09-30 16:55:04 +04:00
#The QFILEINFO-IPC test needs to be on ipc$
raw = filter ( lambda x : " RAW-QFILEINFO-IPC " not in x , smb4torture_testsuites ( " RAW- " ) )
base = smb4torture_testsuites ( " BASE- " )
for t in base + raw + smb2 :
2010-09-30 20:23:20 +04:00
plansmbtorturetestsuite ( t , " dc " , ' //$SERVER/tmp -U$USERNAME % $PASSWORD ' + " " + " " . join ( ntvfsargs ) )
2010-09-30 16:55:04 +04:00
2010-09-30 20:23:20 +04:00
plansmbtorturetestsuite ( " RAW-QFILEINFO-IPC " , " dc " , ' //$SERVER/ipc \ $ -U$USERNAME % $PASSWORD ' )
2010-09-30 16:55:04 +04:00
for t in smb4torture_testsuites ( " RAP- " ) :
2010-09-30 20:23:20 +04:00
plansmbtorturetestsuite ( 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 :
2010-09-30 20:23:20 +04:00
plantestsuite_loadlist ( " samba4.ntvfs.cifs. %s " % normalize_testname ( t ) , " dc " , [ valgrindify ( smb4torture ) , ' //$NETBIOSNAME/cifs ' , ' -U$USERNAME % $PASSWORD ' ] + ntvfsargs + [ t ] )
2010-09-30 16:55:04 +04:00
2010-11-16 01:01:57 +03:00
plansmbtorturetestsuite ( ' ECHO-UDP ' , ' dc:local ' , ' //$SERVER/whatever ' )
2010-09-30 16:55:04 +04:00
# Local tests
for t in smb4torture_testsuites ( " LOCAL- " ) :
plansmbtorturetestsuite ( t , " none " , " ncalrpc: " )
tdbtorture4 = binpath ( " tdbtorture " )
if os . path . exists ( tdbtorture4 ) :
plantestsuite ( " tdb.stress " , " none " , valgrindify ( tdbtorture4 ) )
else :
skiptestsuite ( " tdb.stress " , " Using system TDB, tdbtorture not available " )
plansmbtorturetestsuite ( " DRS-UNIT " , " none " , " ncalrpc: " )
# 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 ) ) )
planperltestsuite ( " selftest.samba4 " , os . path . normpath ( os . path . join ( samba4srcdir , " ../selftest/test_samba4.pl " ) ) )
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.
planpythontestsuite ( " none " , " samba.tests.blackbox.ndrdump " )
2010-11-03 21:14:02 +03:00
plantestsuite ( " samba4.blackbox.samba_tool(dc:local) " , " dc:local " , [ os . path . join ( samba4srcdir , " utils/tests/test_samba_tool.sh " ) , ' $SERVER ' , " $USERNAME " , " $PASSWORD " , " $DOMAIN " ] )
2010-09-30 20:23:20 +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 " , configuration ] )
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 " , 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 " , 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 " , configuration ] )
plantestsuite ( " samba4.blackbox.ktpass(dc) " , " dc " , [ os . path . join ( bbdir , " test_ktpass.sh " ) , ' $PREFIX ' ] )
plantestsuite ( " samba4.blackbox.passwords(dc:local) " , " dc:local " , [ os . path . join ( bbdir , " test_passwords.sh " ) , ' $SERVER ' , ' $USERNAME ' , ' $PASSWORD ' , ' $REALM ' , ' $DOMAIN ' , " $PREFIX " ] )
plantestsuite ( " samba4.blackbox.export.keytab(dc:local) " , " dc:local " , [ os . path . join ( bbdir , " test_export_keytab.sh " ) , ' $SERVER ' , ' $USERNAME ' , ' $REALM ' , ' $DOMAIN ' , " $PREFIX " ] )
plantestsuite ( " samba4.blackbox.cifsdd(dc) " , " dc " , [ os . path . join ( samba4srcdir , " client/tests/test_cifsdd.sh " ) , ' $SERVER ' , ' $USERNAME ' , ' $PASSWORD ' , " $DOMAIN " ] )
plantestsuite ( " samba4.blackbox.nmblookup(dc) " , " dc " , [ os . path . join ( samba4srcdir , " utils/tests/test_nmblookup.sh " ) , ' $NETBIOSNAME ' , ' $NETBIOSALIAS ' , ' $SERVER ' , ' $SERVER_IP ' ] )
plantestsuite ( " samba4.blackbox.nmblookup(member) " , " member " , [ os . path . join ( samba4srcdir , " utils/tests/test_nmblookup.sh " ) , ' $NETBIOSNAME ' , ' $NETBIOSALIAS ' , ' $SERVER ' , ' $SERVER_IP ' ] )
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 " ] )
plantestsuite ( " samba4.blackbox.wbinfo(member:local) " , " member:local " , [ os . path . join ( samba4srcdir , " ../nsswitch/tests/test_wbinfo.sh " ) , ' $DOMAIN ' , ' $DC_USERNAME ' , ' $DC_PASSWORD ' , " member " ] )
plantestsuite ( " samba4.blackbox.chgdcpass(dc) " , " dc " , [ os . path . join ( bbdir , " test_chgdcpass.sh " ) , ' $SERVER ' , " LOCALDC \ $ " , ' $REALM ' , ' $DOMAIN ' , ' $PREFIX ' , " aes256-cts-hmac-sha1-96 " , ' $SELFTEST_PREFIX/dc ' ] )
2010-09-30 16:55:04 +04:00
# Tests using the "Simple" NTVFS backend
for t in [ " BASE-RW1 " ] :
2010-09-30 20:23:20 +04:00
plantestsuite_loadlist ( " samba4.ntvfs.simple. %s " % normalize_testname ( t ) , " dc " , [ valgrindify ( smb4torture ) , " //$SERVER/simple " , ' -U$USERNAME % $PASSWORD ' , t ] )
2010-09-30 16:55:04 +04:00
# Domain Member Tests
2010-09-30 20:23:20 +04:00
plantestsuite_loadlist ( " samba4.rpc.echo against member server with local creds " , " member " , [ valgrindify ( smb4torture ) , ' ncacn_np:$NETBIOSNAME ' , ' -U$NETBIOSNAME/$USERNAME % $PASSWORD ' , ' RPC-ECHO ' ] )
plantestsuite_loadlist ( " samba4.rpc.echo against member server with domain creds " , " member " , [ valgrindify ( smb4torture ) , ' ncacn_np:$NETBIOSNAME ' , ' -U$DOMAIN/$DC_USERNAME % $DC_PASSWORD ' , ' RPC-ECHO ' ] )
plantestsuite_loadlist ( " samba4.rpc.samr against member server with local creds " , " member " , [ valgrindify ( smb4torture ) , ' ncacn_np:$NETBIOSNAME ' , ' -U$NETBIOSNAME/$USERNAME % $PASSWORD ' , " RPC-SAMR " ] )
plantestsuite_loadlist ( " samba4.rpc.samr.users against member server with local creds " , " member " , [ valgrindify ( smb4torture ) , ' ncacn_np:$NETBIOSNAME ' , ' -U$NETBIOSNAME/$USERNAME % $PASSWORD ' , " RPC-SAMR-USERS " ] )
plantestsuite_loadlist ( " samba4.rpc.samr.passwords against member server with local creds " , " member " , [ valgrindify ( smb4torture ) , ' ncacn_np:$NETBIOSNAME ' , ' -U$NETBIOSNAME/$USERNAME % $PASSWORD ' , " RPC-SAMR-PASSWORDS " ] )
plantestsuite ( " samba4.blackbox.smbclient against member server with local creds " , " member " , [ os . path . join ( samba4srcdir , " client/tests/test_smbclient.sh " ) , ' $NETBIOSNAME ' , ' $USERNAME ' , ' $PASSWORD ' , ' $NETBIOSNAME ' , ' $PREFIX ' ] )
2010-09-30 16:55:04 +04:00
# RPC Proxy
2010-09-30 20:23:20 +04:00
plantestsuite_loadlist ( " samba4.rpc.echo against rpc proxy with domain creds " , " rpc_proxy " , [ valgrindify ( smb4torture ) , ' ncacn_ip_tcp:$NETBIOSNAME ' , ' -U$DOMAIN/$DC_USERNAME % $DC_PASSWORD ' , " RPC-ECHO " ] )
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
2010-09-30 20:23:20 +04:00
plantestsuite_loadlist ( " samba4. %s " % name , " dc " , [ valgrindify ( smb4torture ) , ' //$NETBIOSNAME/tmp ' , signoptions , ' -U$USERNAME % $PASSWORD ' , ' BASE-XCOPY ' ] )
2010-09-30 16:55:04 +04:00
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 " ] :
signoptions = " %s --signing=off " % mech
name = " smb.signing on with %s " % signoptions
2010-09-30 20:23:20 +04:00
plantestsuite_loadlist ( " samba4. %s domain-creds " % name , " member " , [ valgrindify ( smb4torture ) , ' //$NETBIOSNAME/tmp ' , signoptions , ' -U$DC_USERNAME % $DC_PASSWORD ' , ' BASE-XCOPY ' ] )
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
name = " smb.signing on with %s " % signoptions
2010-09-30 20:23:20 +04:00
plantestsuite_loadlist ( " samba4. %s local-creds " % name , " member " , [ valgrindify ( smb4torture ) , ' //$NETBIOSNAME/tmp ' , signoptions , ' -U$NETBIOSNAME/$USERNAME % $PASSWORD ' , ' BASE-XCOPY ' ] )
plantestsuite_loadlist ( " samba4.smb.signing --signing=yes anon " , " dc " , [ valgrindify ( smb4torture ) , ' //$NETBIOSNAME/tmp ' , ' -k ' , ' no ' , ' --signing=yes ' , ' -U % ' , ' BASE-XCOPY ' ] )
plantestsuite_loadlist ( " samba4.smb.signing --signing=required anon " , " dc " , [ valgrindify ( smb4torture ) , ' //$NETBIOSNAME/tmp ' , ' -k ' , ' no ' , ' --signing=required ' , ' -U % ' , ' BASE-XCOPY ' ] )
plantestsuite_loadlist ( " samba4.smb.signing --signing=no anon " , " member " , [ valgrindify ( smb4torture ) , ' //$NETBIOSNAME/tmp ' , ' -k ' , ' no ' , ' --signing=no ' , ' -U % ' , ' BASE-XCOPY ' ] )
2010-09-30 16:55:04 +04:00
nbt_tests = smb4torture_testsuites ( " NBT- " )
for t in nbt_tests :
2010-09-30 20:23:20 +04:00
plansmbtorturetestsuite ( t , " dc " , " //$SERVER/_none_ -U \" $USERNAME % $PASSWORD \" " )
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 \" " ]
winbind_struct_tests = smb4torture_testsuites ( " WINBIND-STRUCT " )
winbind_ndr_tests = smb4torture_testsuites ( " WINBIND-NDR " )
for env in [ " dc " , " member " ] :
for t in winbind_struct_tests :
2010-09-30 20:23:20 +04:00
plansmbtorturetestsuite ( t , env , " %s //_none_/_none_ " % " " . join ( wb_opts ) )
2010-09-30 16:55:04 +04:00
for t in winbind_ndr_tests :
2010-09-30 20:23:20 +04:00
plansmbtorturetestsuite ( t , env , " %s //_none_/_none_ " % " " . join ( wb_opts ) )
2010-09-30 16:55:04 +04:00
nsstest4 = binpath ( " nsstest " )
if os . path . exists ( nsstest4 ) :
plantestsuite ( " samba4.nss.test using winbind(member) " , " member " , [ valgrindify ( nsstest4 ) , os . path . join ( samba4bindir , " shared/libnss_winbind.so " ) ] )
else :
skiptestsuite ( " samba4.nss.test using winbind(member) " , " nsstest not available " )
subunitrun = valgrindify ( python ) + " " + os . path . join ( samba4srcdir , " scripting/bin/subunitrun " )
2010-12-09 18:28:31 +03:00
def plansambapythontestsuite ( name , env , path , module , environ = { } , extra_args = [ ] ) :
environ = dict ( environ )
environ [ " PYTHONPATH " ] = " $PYTHONPATH: " + path
args = [ " %s = %s " % item for item in environ . iteritems ( ) ]
args + = [ subunitrun , " $LISTOPT " , module ]
args + = extra_args
plantestsuite ( name , env , args )
plansambapythontestsuite ( " ldb.python " , " none " , " ./lib/ldb/tests/python/ " , ' api ' )
2010-09-30 16:55:04 +04:00
planpythontestsuite ( " none " , " samba.tests.credentials " )
planpythontestsuite ( " none " , " samba.tests.gensec " )
planpythontestsuite ( " none " , " samba.tests.registry " )
2010-12-09 18:28:31 +03:00
plansambapythontestsuite ( " tdb.python " , " none " , " ../lib/tdb/python/tests " , ' simple ' )
2010-09-30 16:55:04 +04:00
planpythontestsuite ( " none " , " samba.tests.auth " )
planpythontestsuite ( " none " , " samba.tests.security " )
planpythontestsuite ( " none " , " samba.tests.dcerpc.misc " )
planpythontestsuite ( " none " , " samba.tests.param " )
planpythontestsuite ( " none " , " samba.tests.upgrade " )
planpythontestsuite ( " none " , " samba.tests.core " )
planpythontestsuite ( " none " , " samba.tests.provision " )
planpythontestsuite ( " none " , " samba.tests.samba3 " )
planpythontestsuite ( " dc:local " , " samba.tests.dcerpc.sam " )
planpythontestsuite ( " dc:local " , " samba.tests.dsdb " )
planpythontestsuite ( " none " , " samba.tests.netcmd " )
planpythontestsuite ( " dc:local " , " samba.tests.dcerpc.bare " )
planpythontestsuite ( " dc:local " , " samba.tests.dcerpc.unix " )
planpythontestsuite ( " none " , " samba.tests.dcerpc.rpc_talloc " )
planpythontestsuite ( " none " , " samba.tests.samdb " )
2010-11-28 15:39:12 +03:00
planpythontestsuite ( " none " , " samba.tests.hostconfig " )
2010-09-30 16:55:04 +04:00
planpythontestsuite ( " none " , " samba.tests.messaging " )
planpythontestsuite ( " none " , " samba.tests.samba3sam " )
2010-09-30 20:23:20 +04:00
planpythontestsuite ( " none " , " subunit " )
2010-09-30 16:55:04 +04:00
planpythontestsuite ( " dc:local " , " samba.tests.dcerpc.rpcecho " )
2010-12-09 18:28:31 +03:00
plantestsuite_idlist ( " samba.tests.dcerpc.registry " , " dc:local " , [ subunitrun , " $LISTOPT " , ' -U " $USERNAME % $PASSWORD " ' , " samba.tests.dcerpc.registry " ] )
2010-10-01 03:05:12 +04:00
plantestsuite ( " samba4.ldap.python(dc) " , " dc " , [ python , os . path . join ( samba4srcdir , " dsdb/tests/python/ldap.py " ) , ' $SERVER ' , ' -U " $USERNAME % $PASSWORD " ' , ' -W ' , ' $DOMAIN ' ] )
2010-10-07 11:42:07 +04:00
plantestsuite ( " samba4.sam.python(dc) " , " dc " , [ python , os . path . join ( samba4srcdir , " dsdb/tests/python/sam.py " ) , ' $SERVER ' , ' -U " $USERNAME % $PASSWORD " ' , ' -W ' , ' $DOMAIN ' ] )
2010-12-09 18:28:31 +03:00
plansambapythontestsuite ( " samba4.schemaInfo.python(dc) " , " dc " , os . path . join ( samba4srcdir , ' dsdb/tests/python ' ) , ' dsdb_schema_info ' , extra_args = [ ' -U " $DOMAIN/$DC_USERNAME % $DC_PASSWORD " ' ] )
2010-11-04 04:07:57 +03:00
plantestsuite ( " samba4.urgent_replication.python(dc) " , " dc " , [ python , os . path . join ( samba4srcdir , " dsdb/tests/python/urgent_replication.py " ) , ' $PREFIX_ABS/dc/private/sam.ldb ' ] , allow_empty_output = True )
2010-09-30 16:55:04 +04:00
for env in [ " dc " , " fl2000dc " , " fl2003dc " , " fl2008r2dc " ] :
2010-10-01 03:05:12 +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 " ' , ' -W ' , ' $DOMAIN ' ] )
2010-09-30 20:23:20 +04:00
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 " ] )
2010-10-01 03:05:12 +04:00
plantestsuite ( " samba4.ldap.secdesc.python( %s ) " % env , env , [ python , os . path . join ( samba4srcdir , " dsdb/tests/python/sec_descriptor.py " ) , ' $SERVER ' , ' -U " $USERNAME % $PASSWORD " ' , ' -W ' , ' $DOMAIN ' ] )
plantestsuite ( " samba4.ldap.acl.python( %s ) " % env , env , [ python , os . path . join ( samba4srcdir , " dsdb/tests/python/acl.py " ) , ' $SERVER ' , ' -U " $USERNAME % $PASSWORD " ' , ' -W ' , ' $DOMAIN ' ] )
2010-11-11 12:01:26 +03:00
if env != " fl2000dc " :
# This test makes excessively use of the "userPassword" attribute which
# isn't available on DCs with Windows 2000 domain function level -
# therefore skip it in that configuration
plantestsuite ( " samba4.ldap.passwords.python( %s ) " % env , env , [ python , os . path . join ( samba4srcdir , " dsdb/tests/python/passwords.py " ) , " $SERVER " , ' -U " $USERNAME % $PASSWORD " ' , " -W " , " $DOMAIN " ] )
2010-09-30 16:55:04 +04:00
planpythontestsuite ( " dc:local " , " samba.tests.upgradeprovisionneeddc " )
planpythontestsuite ( " none " , " samba.tests.upgradeprovision " )
planpythontestsuite ( " none " , " samba.tests.xattr " )
planpythontestsuite ( " none " , " samba.tests.ntacls " )
2010-11-04 05:23:47 +03:00
plantestsuite ( " samba4.deletetest.python(dc) " , " dc " , [ ' PYTHONPATH= " $PYTHONPATH:../lib/subunit/python:../lib/testtools " ' , python , os . path . join ( samba4srcdir , " dsdb/tests/python/deletetest.py " ) , ' $SERVER ' , ' -U " $USERNAME % $PASSWORD " ' , ' -W ' , ' $DOMAIN ' ] )
2010-12-09 18:28:31 +03:00
plansambapythontestsuite ( " samba4.policy.python " , " none " , " lib/policy/tests/python " , ' bindings ' )
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 )
plantestsuite ( " samba4.blackbox.upgrade " , " none " , [ " rm -rf $PREFIX/upgrade; " , python , os . path . join ( samba4srcdir , " setup/upgrade_from_s3 " ) , " --targetdir=$PREFIX/upgrade " , os . path . normpath ( os . path . join ( samba4srcdir , " ../testdata/samba3 " ) ) , os . path . normpath ( os . path . join ( samba4srcdir , " ../testdata/samba3/smb.conf " ) ) ] , allow_empty_output = True )
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 ' ] )
2010-11-05 10:27:48 +03:00
plantestsuite ( " samba4.ldap.bind(dc) " , " dc " , [ python , os . path . join ( samba4srcdir , " auth/credentials/tests/bind.py " ) , ' $SERVER ' , ' -U " $USERNAME % $PASSWORD " ' ] )
2010-09-30 16:55:04 +04:00
# DRS python tests
2010-12-09 18:28:31 +03:00
plansambapythontestsuite ( " samba4.drs.delete_object.python(vampire_dc) " , " vampire_dc " , os . path . join ( samba4srcdir , ' torture/drs/python ' ) , " delete_object " , environ = { ' DC1 ' : ' $DC_SERVER ' , ' DC2 ' : ' $VAMPIRE_DC_SERVER ' } , extra_args = [ ' -U$DOMAIN/$DC_USERNAME % $DC_PASSWORD ' ] )
plansambapythontestsuite ( " samba4.drs.fsmo.python(vampire_dc) " , " vampire_dc " , os . path . join ( samba4srcdir , ' torture/drs/python ' ) , " fsmo " , environ = { ' DC1 ' : " $DC_SERVER " , ' DC2 ' : " $VAMPIRE_DC_SERVER " } , extra_args = [ ' -U$DOMAIN/$DC_USERNAME % $DC_PASSWORD ' ] )
plansambapythontestsuite ( " samba4.drs.repl_schema.python(vampire_dc) " , " vampire_dc " , os . path . join ( samba4srcdir , ' torture/drs/python ' ) , " repl_schema " , 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
t = " RPC-SAMR-LARGE-DC "
2010-09-30 20:23:20 +04:00
plantestsuite_loadlist ( " samba4. %s .one " % normalize_testname ( t ) , " vampire_dc " , [ valgrindify ( smb4torture ) , ' $SERVER ' , ' -U$USERNAME % $PASSWORD ' , ' -W ' , ' $DOMAIN ' , t ] )
plantestsuite_loadlist ( " samba4. %s .two " % normalize_testname ( t ) , " vampire_dc " , [ valgrindify ( smb4torture ) , ' $SERVER ' , ' -U$USERNAME % $PASSWORD ' , ' -W ' , ' $DOMAIN ' , t ] )
2010-09-30 16:55:04 +04:00
# some RODC testing
2010-09-30 20:23:20 +04:00
plantestsuite_loadlist ( " samba4.rpc.echo " , " rodc " , [ smb4torture , ' ncacn_np:$SERVER ' , " -k " , " yes " , ' -U$USERNAME % $PASSWORD ' , ' -W ' ' $DOMAIN ' , ' RPC-ECHO ' ] )
2010-10-27 14:15:10 +04:00
plantestsuite ( " samba4.blackbox.provision-backend.py " , " none " , [ " PYTHON= %s " % python , os . path . join ( samba4srcdir , " setup/tests/blackbox_provision-backend.sh " ) , ' $PREFIX/provision ' ] )