Ignore:
Timestamp:
Nov 24, 2016, 1:14:11 PM (9 years ago)
Author:
Silvan Scherrer
Message:

Samba Server: update vendor to version 4.4.3

Location:
vendor/current/source3/selftest
Files:
3 added
5 deleted
1 edited

Legend:

Unmodified
Added
Removed
  • vendor/current/source3/selftest/tests.py

    r919 r988  
    11#!/usr/bin/python
    2 # This script generates a list of testsuites that should be run as part of 
     2# This script generates a list of testsuites that should be run as part of
    33# the Samba 3 test suite.
    44
    5 # The output of this script is parsed by selftest.pl, which then decides 
    6 # which of the tests to actually run. It will, for example, skip all tests 
     5# The output of this script is parsed by selftest.pl, which then decides
     6# which of the tests to actually run. It will, for example, skip all tests
    77# listed in selftest/skip or only run a subset during "make quicktest".
    88
    9 # The idea is that this script outputs all of the tests of Samba 3, not 
    10 # just those that are known to pass, and list those that should be skipped 
    11 # or are known to fail in selftest/skip or selftest/samba4-knownfail. This makes it
    12 # very easy to see what functionality is still missing in Samba 3 and makes 
    13 # it possible to run the testsuite against other servers, such as Samba 4 or 
     9# The idea is that this script outputs all of the tests of Samba 3, not
     10# just those that are known to pass, and list those that should be skipped
     11# or are known to fail in selftest/skip or selftest/samba3-knownfail. This makes it
     12# very easy to see what functionality is still missing in Samba 3 and makes
     13# it possible to run the testsuite against other servers, such as Samba 4 or
    1414# Windows that have a different set of features.
    1515
    16 # The syntax for a testsuite is "-- TEST --" on a single line, followed 
    17 # by the name of the test, the environment it needs and the command to run, all 
    18 # three separated by newlines. All other lines in the output are considered 
     16# The syntax for a testsuite is "-- TEST --" on a single line, followed
     17# by the name of the test, the environment it needs and the command to run, all
     18# three separated by newlines. All other lines in the output are considered
    1919# comments.
    2020
    2121import os, sys
    2222sys.path.insert(0, os.path.normpath(os.path.join(os.path.dirname(__file__), "../../selftest")))
     23import selftesthelpers
    2324from selftesthelpers import *
    24 import subprocess
    25 
    26 smb4torture = binpath("smbtorture4")
    27 samba3srcdir = srcdir() + "/source3"
    28 configuration = "--configfile=$SMB_CONF_PATH"
    29 scriptdir=os.path.join(samba3srcdir, "../script/tests")
    30 
    31 torture_options = [configuration, "--maximum-runtime=$SELFTEST_MAXTIME",
    32                    "--target=$SELFTEST_TARGET", "--basedir=$SELFTEST_TMPDIR",
    33                    '--option="torture:winbindd_netbios_name=$SERVER"',
    34                    '--option="torture:winbindd_netbios_domain=$DOMAIN"',
    35                    '--option=torture:sharedelay=100000']
    36 
    37 if not os.getenv("SELFTEST_VERBOSE"):
    38     torture_options.append("--option=torture:progress=no")
    39 torture_options.append("--format=subunit")
    40 if os.getenv("SELFTEST_QUICK"):
    41     torture_options.append("--option=torture:quick=yes")
    42 smb4torture += " " + " ".join(torture_options)
    43 
    44 def plansmbtorturetestsuite(name, env, options, description=''):
    45     modname = "samba3.posix_s3.%s %s" % (name, description)
    46     cmdline = "%s $LISTOPT %s %s" % (valgrindify(smb4torture), options, name)
    47     plantestsuite_loadlist(modname, env, cmdline)
    48 
    49 plantestsuite("samba3.blackbox.success", "s3dc:local", [os.path.join(samba3srcdir, "script/tests/test_success.sh")])
    50 plantestsuite("samba3.blackbox.failure", "s3dc:local", [os.path.join(samba3srcdir, "script/tests/test_failure.sh")])
    51 
    52 plantestsuite("samba3.local_s3", "s3dc:local", [os.path.join(samba3srcdir, "script/tests/test_local_s3.sh")])
    53 
    54 tests=[ "FDPASS", "LOCK1", "LOCK2", "LOCK3", "LOCK4", "LOCK5", "LOCK6", "LOCK7", "LOCK9",
     25smbtorture4_options.extend([
     26   '--option=torture:sharedelay=100000',
     27   '--option=torture:writetimeupdatedelay=500000',
     28   ])
     29
     30def plansmbtorture4testsuite(name, env, options, description=''):
     31    if description == '':
     32        modname = "samba3.%s" % (name, )
     33    else:
     34        modname = "samba3.%s %s" % (name, description)
     35
     36    selftesthelpers.plansmbtorture4testsuite(
     37        name, env, options, target='samba3', modname=modname)
     38
     39
     40plantestsuite("samba3.blackbox.success", "nt4_dc:local", [os.path.join(samba3srcdir, "script/tests/test_success.sh")])
     41plantestsuite("samba3.blackbox.failure", "nt4_dc:local", [os.path.join(samba3srcdir, "script/tests/test_failure.sh")])
     42
     43plantestsuite("samba3.local_s3", "nt4_dc:local", [os.path.join(samba3srcdir, "script/tests/test_local_s3.sh")])
     44
     45plantestsuite("samba3.blackbox.registry.upgrade", "nt4_dc:local", [os.path.join(samba3srcdir, "script/tests/test_registry_upgrade.sh"), net, dbwrap_tool])
     46
     47tests = ["FDPASS", "LOCK1", "LOCK2", "LOCK3", "LOCK4", "LOCK5", "LOCK6", "LOCK7", "LOCK9",
    5548        "UNLINK", "BROWSE", "ATTR", "TRANS2", "TORTURE",
    56         "OPLOCK1", "OPLOCK2", "OPLOCK3", "OPLOCK4", "STREAMERROR",
    57         "DIR", "DIR1", "DIR-CREATETIME", "TCON", "TCONDEV", "RW1", "RW2", "RW3", "RW-SIGNING",
    58         "OPEN", "XCOPY", "RENAME", "DELETE", "DELETE-LN", "PROPERTIES", "W2K",
    59         "TCON2", "IOCTL", "CHKPATH", "FDSESS", "LOCAL-SUBSTITUTE", "CHAIN1",
    60         "GETADDRINFO", "POSIX", "UID-REGRESSION-TEST", "SHORTNAME-TEST",
    61         "LOCAL-BASE64", "LOCAL-GENCACHE", "POSIX-APPEND",
    62         "LOCAL-string_to_sid" ]
     49        "OPLOCK1", "OPLOCK2", "OPLOCK4", "STREAMERROR",
     50        "DIR", "DIR1", "DIR-CREATETIME", "TCON", "TCONDEV", "RW1", "RW2", "RW3", "LARGE_READX", "RW-SIGNING",
     51        "OPEN", "XCOPY", "RENAME", "DELETE", "DELETE-LN", "WILDDELETE", "PROPERTIES", "W2K",
     52        "TCON2", "IOCTL", "CHKPATH", "FDSESS", "CHAIN1", "CHAIN2",
     53        "CHAIN3",
     54        "GETADDRINFO", "UID-REGRESSION-TEST", "SHORTNAME-TEST",
     55        "CASE-INSENSITIVE-CREATE", "SMB2-BASIC", "NTTRANS-FSCTL", "SMB2-NEGPROT",
     56        "SMB2-SESSION-REAUTH", "SMB2-SESSION-RECONNECT",
     57        "CLEANUP1",
     58        "CLEANUP2",
     59        "CLEANUP4",
     60        "BAD-NBT-SESSION"]
    6361
    6462for t in tests:
    65     plantestsuite("samba3.smbtorture_s3.plain(dc).%s" % t, "s3dc", [os.path.join(samba3srcdir, "script/tests/test_smbtorture_s3.sh"), t, '//$SERVER_IP/tmp', '$USERNAME', '$PASSWORD', "", "-l $LOCAL_PATH"])
    66     plantestsuite("samba3.smbtorture_s3.crypt(dc).%s" % t, "s3dc", [os.path.join(samba3srcdir, "script/tests/test_smbtorture_s3.sh"), t, '//$SERVER_IP/tmp', '$USERNAME', '$PASSWORD', "-e", "-l $LOCAL_PATH"])
    67 
    68 tests=["--ping", "--separator",
    69        "--own-domain",
    70        "--all-domains",
    71        "--trusted-domains",
    72        "--domain-info=BUILTIN",
    73        "--domain-info=$DOMAIN",
    74        "--online-status",
    75        "--online-status --domain=BUILTIN",
    76        "--online-status --domain=$DOMAIN",
    77        "--check-secret --domain=$DOMAIN",
    78        "--change-secret --domain=$DOMAIN",
    79        "--check-secret --domain=$DOMAIN",
    80        "--online-status --domain=$DOMAIN",
    81        #Didn't pass yet# "--domain-users",
    82        "--domain-groups",
    83        "--name-to-sid=$USERNAME",
    84        "--name-to-sid=$DOMAIN\\\\$USERNAME",
    85      #Didn't pass yet# "--user-info=$USERNAME",
    86        "--user-groups=$DOMAIN\\\\$USERNAME",
    87        "--allocate-uid",
    88        "--allocate-gid"]
    89 
     63    plantestsuite("samba3.smbtorture_s3.plain(nt4_dc).%s" % t, "nt4_dc", [os.path.join(samba3srcdir, "script/tests/test_smbtorture_s3.sh"), t, '//$SERVER_IP/tmp', '$USERNAME', '$PASSWORD', smbtorture3, "", "-l $LOCAL_PATH"])
     64    plantestsuite("samba3.smbtorture_s3.crypt_client(nt4_dc).%s" % t, "nt4_dc", [os.path.join(samba3srcdir, "script/tests/test_smbtorture_s3.sh"), t, '//$SERVER_IP/tmp', '$USERNAME', '$PASSWORD', smbtorture3, "-e", "-l $LOCAL_PATH"])
     65    if t == "TORTURE":
     66        # this is a negative test to verify that the server rejects
     67        # access without encryption
     68        plantestsuite("samba3.smbtorture_s3.crypt_server(nt4_dc).%s" % t, "nt4_dc", [os.path.join(samba3srcdir, "script/tests/test_smbtorture_s3.sh"), t, '//$SERVER_IP/tmpenc', '$USERNAME', '$PASSWORD', smbtorture3, "", "-l $LOCAL_PATH"])
     69    plantestsuite("samba3.smbtorture_s3.plain(ad_dc_ntvfs).%s" % t, "ad_dc_ntvfs", [os.path.join(samba3srcdir, "script/tests/test_smbtorture_s3.sh"), t, '//$SERVER_IP/tmp', '$USERNAME', '$PASSWORD', smbtorture3, "", "-l $LOCAL_PATH"])
     70
     71# non-crypt only
     72
     73tests = ["OPLOCK-CANCEL"]
    9074for t in tests:
    91     plantestsuite("samba3.wbinfo_s3.(s3dc:local).%s" % t, "s3dc:local", [os.path.join(samba3srcdir, "script/tests/test_wbinfo_s3.sh"), t])
    92     plantestsuite("samba3.wbinfo_s3.(member:local).%s" % t, "member:local", [os.path.join(samba3srcdir, "script/tests/test_wbinfo_s3.sh"), t])
     75    plantestsuite("samba3.smbtorture_s3.plain(nt4_dc).%s" % t, "nt4_dc", [os.path.join(samba3srcdir, "script/tests/test_smbtorture_s3.sh"), t, '//$SERVER_IP/tmp', '$USERNAME', '$PASSWORD', smbtorture3, "", "-l $LOCAL_PATH"])
     76
     77tests = ["RW1", "RW2", "RW3"]
     78for t in tests:
     79    plantestsuite("samba3.smbtorture_s3.vfs_aio_fork(simpleserver).%s" % t, "simpleserver", [os.path.join(samba3srcdir, "script/tests/test_smbtorture_s3.sh"), t, '//$SERVER_IP/vfs_aio_fork', '$USERNAME', '$PASSWORD', smbtorture3, "", "-l $LOCAL_PATH"])
     80
     81posix_tests = ["POSIX", "POSIX-APPEND", "POSIX-SYMLINK-ACL", "POSIX-SYMLINK-EA"]
     82
     83for t in posix_tests:
     84    plantestsuite("samba3.smbtorture_s3.plain(nt4_dc).%s" % t, "nt4_dc", [os.path.join(samba3srcdir, "script/tests/test_smbtorture_s3.sh"), t, '//$SERVER_IP/posix_share', '$USERNAME', '$PASSWORD', smbtorture3, "", "-l $LOCAL_PATH"])
     85    plantestsuite("samba3.smbtorture_s3.crypt(nt4_dc).%s" % t, "nt4_dc", [os.path.join(samba3srcdir, "script/tests/test_smbtorture_s3.sh"), t, '//$SERVER_IP/posix_share', '$USERNAME', '$PASSWORD', smbtorture3, "-e", "-l $LOCAL_PATH"])
     86    plantestsuite("samba3.smbtorture_s3.plain(ad_dc_ntvfs).%s" % t, "ad_dc_ntvfs", [os.path.join(samba3srcdir, "script/tests/test_smbtorture_s3.sh"), t, '//$SERVER_IP/posix_share', '$USERNAME', '$PASSWORD', smbtorture3, "", "-l $LOCAL_PATH"])
     87
     88env = "nt4_dc:local"
     89t = "CLEANUP3"
     90plantestsuite("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"])
     91
     92local_tests = [
     93    "LOCAL-SUBSTITUTE",
     94    "LOCAL-GENCACHE",
     95    "LOCAL-TALLOC-DICT",
     96    "LOCAL-BASE64",
     97    "LOCAL-RBTREE",
     98    "LOCAL-MEMCACHE",
     99    "LOCAL-STREAM-NAME",
     100    "LOCAL-string_to_sid",
     101    "LOCAL-sid_to_string",
     102    "LOCAL-binary_to_sid",
     103    "LOCAL-DBTRANS",
     104    "LOCAL-TEVENT-SELECT",
     105    "LOCAL-CONVERT-STRING",
     106    "LOCAL-CONV-AUTH-INFO",
     107    "LOCAL-IDMAP-TDB-COMMON",
     108    "LOCAL-MESSAGING-READ1",
     109    "LOCAL-MESSAGING-READ2",
     110    "LOCAL-MESSAGING-READ3",
     111    "LOCAL-MESSAGING-READ4",
     112    "LOCAL-MESSAGING-FDPASS1",
     113    "LOCAL-MESSAGING-FDPASS2",
     114    "LOCAL-MESSAGING-FDPASS2a",
     115    "LOCAL-MESSAGING-FDPASS2b",
     116    "LOCAL-hex_encode_buf",
     117    "LOCAL-sprintf_append",
     118    "LOCAL-remove_duplicate_addrs2"]
     119
     120for t in local_tests:
     121    plantestsuite("samba3.smbtorture_s3.%s" % t, "none", [os.path.join(samba3srcdir, "script/tests/test_smbtorture_s3.sh"), t, '//foo/bar', '""', '""', smbtorture3, ""])
     122
     123plantestsuite("samba.vfstest.stream_depot", "nt4_dc:local", [os.path.join(samba3srcdir, "script/tests/stream-depot/run.sh"), binpath("vfstest"), "$PREFIX", configuration])
     124plantestsuite("samba.vfstest.xattr-tdb-1", "nt4_dc:local", [os.path.join(samba3srcdir, "script/tests/xattr-tdb-1/run.sh"), binpath("vfstest"), "$PREFIX", configuration])
     125plantestsuite("samba.vfstest.acl", "nt4_dc:local", [os.path.join(samba3srcdir, "script/tests/vfstest-acl/run.sh"), binpath("vfstest"), "$PREFIX", configuration])
     126plantestsuite("samba.vfstest.catia", "nt4_dc:local", [os.path.join(samba3srcdir, "script/tests/vfstest-catia/run.sh"), binpath("vfstest"), "$PREFIX", configuration])
     127
     128for options in ["--option=clientusespnego=no", " --option=clientntlmv2auth=no --option=clientlanmanauth=yes --max-protocol=LANMAN2", ""]:
     129    env = "nt4_dc"
     130    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', smbclient3, configuration, options])
     131
     132for env in ["nt4_dc", "nt4_member", "ad_member", "ad_dc_ntvfs", "s4member", "fl2000dc"]:
     133    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', smbclient3, configuration])
     134    plantestsuite("samba3.blackbox.smbclient_ntlm.plain (%s)" % env, env, [os.path.join(samba3srcdir, "script/tests/test_smbclient_ntlm.sh"), '$SERVER', '$DC_USERNAME', '$DC_PASSWORD', "never", smbclient3, configuration])
     135
     136for env in ["nt4_dc", "nt4_member", "ad_member"]:
     137    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', smbclient3, configuration])
     138    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', smbclient3, configuration])
     139
     140env="nt4_dc"
     141plantestsuite("samba3.blackbox.smbclient_auth.plain (%s) ipv6" % env, env, [os.path.join(samba3srcdir, "script/tests/test_smbclient_auth.sh"), '$SERVER', '$SERVER_IPV6', '$SERVER/$USERNAME', '$PASSWORD', smbclient3, configuration])
     142
     143for env in ["nt4_member", "ad_member"]:
     144    plantestsuite("samba3.blackbox.net_cred_change.(%s:local)" % env, "%s:local" % env, [os.path.join(samba3srcdir, "script/tests/test_net_cred_change.sh"), configuration])
     145
     146env = "ad_member"
     147t = "--krb5auth=$DOMAIN/$DC_USERNAME%$DC_PASSWORD"
     148plantestsuite("samba3.wbinfo_simple.(%s:local).%s" % (env, t), "%s:local" % env, [os.path.join(srcdir(), "nsswitch/tests/test_wbinfo_simple.sh"), t])
     149t = "WBCLIENT-MULTI-PING"
     150plantestsuite("samba3.smbtorture_s3.%s" % t, env, [os.path.join(samba3srcdir, "script/tests/test_smbtorture_s3.sh"), t, '//foo/bar', '""', '""', smbtorture3, ""])
     151
     152
     153plantestsuite("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_auth3, '$PREFIX/ktest/krb5_ccache-2', '$SERVER', configuration])
     154
     155plantestsuite("samba3.ntlm_auth.krb5(ktest:local)", "ktest:local", [os.path.join(samba3srcdir, "script/tests/test_ntlm_auth_krb5.sh"), valgrindify(python), samba3srcdir, ntlm_auth3, '$PREFIX/ktest/krb5_ccache-3', '$SERVER', configuration])
     156
     157
     158for env in ["maptoguest", "simpleserver"]:
     159    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', smbclient3, configuration + " --option=clientntlmv2auth=no --option=clientlanmanauth=yes"])
     160
     161env = "maptoguest"
     162plantestsuite("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', smbclient3, configuration + " --option=clientntlmv2auth=no --option=clientlanmanauth=yes"])
     163plantestsuite("samba3.blackbox.smbclient_ntlm.plain (%s)" % env, env, [os.path.join(samba3srcdir, "script/tests/test_smbclient_ntlm.sh"), '$SERVER', '$USERNAME', '$PASSWORD', "baduser", smbclient3, configuration])
     164
     165# plain
     166for env in ["nt4_dc"]:
     167    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', smbclient3, wbinfo, net, configuration])
     168
     169for env in ["nt4_member", "ad_member"]:
     170    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', smbclient3, wbinfo, net, configuration])
     171
     172for env in ["nt4_dc"]:
     173    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', smbclient3, wbinfo, net, configuration, "--signing=required"])
     174
     175for env in ["nt4_member", "ad_member"]:
     176    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', smbclient3, wbinfo, net, configuration, "--signing=required"])
     177
     178for env in ["nt4_dc"]:
     179    # encrypted
     180    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', smbclient3, wbinfo, net, configuration, "-e"])
     181
     182for env in ["fileserver"]:
     183    plantestsuite("samba3.blackbox.preserve_case (%s)" % env, env, [os.path.join(samba3srcdir, "script/tests/test_preserve_case.sh"), '$SERVER', '$DOMAIN', '$USERNAME', '$PASSWORD', '$PREFIX', smbclient3])
     184    plantestsuite("samba3.blackbox.dfree_command (%s)" % env, env, [os.path.join(samba3srcdir, "script/tests/test_dfree_command.sh"), '$SERVER', '$DOMAIN', '$USERNAME', '$PASSWORD', '$PREFIX', smbclient3])
     185    plantestsuite("samba3.blackbox.dfree_quota (%s)" % env, env, [os.path.join(samba3srcdir, "script/tests/test_dfree_quota.sh"), '$SERVER', '$DOMAIN', '$USERNAME', '$PASSWORD', '$LOCAL_PATH', smbclient3, smbcquotas])
     186    plantestsuite("samba3.blackbox.valid_users (%s)" % env, env, [os.path.join(samba3srcdir, "script/tests/test_valid_users.sh"), '$SERVER', '$SERVER_IP', '$DOMAIN', '$USERNAME', '$PASSWORD', '$PREFIX', smbclient3])
     187    plantestsuite("samba3.blackbox.offline (%s)" % env, env, [os.path.join(samba3srcdir, "script/tests/test_offline.sh"), '$SERVER', '$SERVER_IP', '$DOMAIN', '$USERNAME', '$PASSWORD', '$LOCAL_PATH/offline', smbclient3])
     188    plantestsuite("samba3.blackbox.shadow_copy2 (%s)" % env, env, [os.path.join(samba3srcdir, "script/tests/test_shadow_copy.sh"), '$SERVER', '$SERVER_IP', '$DOMAIN', '$USERNAME', '$PASSWORD', '$LOCAL_PATH/shadow', smbclient3])
     189    plantestsuite("samba3.blackbox.smbclient.forceuser_validusers (%s)" % env, env, [os.path.join(samba3srcdir, "script/tests/test_forceuser_validusers.sh"), '$SERVER', '$DOMAIN', '$USERNAME', '$PASSWORD', '$LOCAL_PATH', smbclient3])
     190    plantestsuite("samba3.blackbox.smbget (%s)" % env, env, [os.path.join(samba3srcdir, "script/tests/test_smbget.sh"), '$SERVER', '$SERVER_IP', '$DOMAIN', 'smbget_user', '$PASSWORD', '$LOCAL_PATH/smbget', smbget])
     191
     192    #
     193    # tar command tests
     194    #
     195
     196    # find config.h
     197    try:
     198        config_h = os.environ["CONFIG_H"]
     199    except KeyError:
     200        config_h = os.path.join(samba4bindir, "default/include/config.h")
     201
     202    # see if libarchive is supported
     203    f = open(config_h, 'r')
     204    try:
     205        have_libarchive = ("HAVE_LIBARCHIVE 1" in f.read())
     206    finally:
     207        f.close()
     208
     209    # tar command enabled only if built with libarchive
     210    if have_libarchive:
     211        # Test smbclient/tarmode
     212        plantestsuite("samba3.blackbox.smbclient_tarmode (%s)" % env, env,
     213                      [os.path.join(samba3srcdir, "script/tests/test_smbclient_tarmode.sh"),
     214                       '$SERVER', '$SERVER_IP', '$USERNAME', '$PASSWORD',
     215                       '$LOCAL_PATH', '$PREFIX', smbclient3, configuration])
     216
     217        # Test suite for new smbclient/tar with libarchive (GSoC 13)
     218        plantestsuite("samba3.blackbox.smbclient_tar (%s)" % env, env,
     219                      [os.path.join(samba3srcdir, "script/tests/test_smbclient_tarmode.pl"),
     220                       '-n', '$SERVER', '-i', '$SERVER_IP', '-s', 'tmp',
     221                       '-u', '$USERNAME', '-p', '$PASSWORD', '-l', '$LOCAL_PATH',
     222                       '-d', '$PREFIX', '-b', smbclient3,
     223                       '--subunit', '--', configuration])
     224
     225#TODO encrypted against member, with member creds, and with DC creds
     226plantestsuite("samba3.blackbox.net.misc", "nt4_dc:local",
     227              [os.path.join(samba3srcdir, "script/tests/test_net_misc.sh"),
     228               scriptdir, "$SMB_CONF_PATH", net, configuration])
     229plantestsuite("samba3.blackbox.net.local.registry", "nt4_dc:local",
     230              [os.path.join(samba3srcdir, "script/tests/test_net_registry.sh"),
     231               scriptdir, "$SMB_CONF_PATH", net, configuration])
     232plantestsuite("samba3.blackbox.net.registry.check", "nt4_dc:local",
     233              [os.path.join(samba3srcdir, "script/tests/test_net_registry_check.sh"),
     234               scriptdir, "$SMB_CONF_PATH", net, configuration, dbwrap_tool])
     235plantestsuite("samba3.blackbox.net.rpc.registry", "nt4_dc",
     236              [os.path.join(samba3srcdir, "script/tests/test_net_registry.sh"),
     237               scriptdir, "$SMB_CONF_PATH", net, configuration, 'rpc'])
     238
     239plantestsuite("samba3.blackbox.net.local.registry.roundtrip", "nt4_dc:local",
     240              [os.path.join(samba3srcdir, "script/tests/test_net_registry_roundtrip.sh"),
     241               scriptdir, "$SMB_CONF_PATH", net, configuration])
     242plantestsuite("samba3.blackbox.net.rpc.registry.roundtrip", "nt4_dc",
     243              [os.path.join(samba3srcdir, "script/tests/test_net_registry_roundtrip.sh"),
     244               scriptdir, "$SMB_CONF_PATH", net, configuration, 'rpc'])
     245
     246plantestsuite("samba3.blackbox.net.local.conf", "nt4_dc:local",
     247              [os.path.join(samba3srcdir, "script/tests/test_net_conf.sh"),
     248               scriptdir, "$SMB_CONF_PATH", net, configuration])
     249plantestsuite("samba3.blackbox.net.rpc.conf", "nt4_dc",
     250              [os.path.join(samba3srcdir, "script/tests/test_net_conf.sh"),
     251               scriptdir, "$SMB_CONF_PATH", net, configuration, 'rpc'])
     252
     253
     254plantestsuite("samba3.blackbox.testparm", "nt4_dc:local",
     255              [os.path.join(samba3srcdir, "script/tests/test_testparm_s3.sh"),
     256               "$LOCAL_PATH"])
    93257
    94258plantestsuite(
    95     "samba3.wbinfo_sids2xids.(member:local)", "member:local",
    96     [os.path.join(samba3srcdir, "script/tests/test_wbinfo_sids2xids.sh")])
    97 
    98 plantestsuite("samba3.ntlm_auth.(s3dc:local)", "s3dc:local", [os.path.join(samba3srcdir, "script/tests/test_ntlm_auth_s3.sh"), valgrindify(python), samba3srcdir, configuration])
    99 
    100 for env in ["s3dc", "member"]:
    101     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', configuration])
    102 
    103 for env in ["secserver"]:
    104     plantestsuite("samba3.blackbox.smbclient_auth.plain (%s) domain creds" % env, env, [os.path.join(samba3srcdir, "script/tests/test_smbclient_auth.sh"), '$SERVER', '$SERVER_IP', '$DOMAIN\\\\$DC_USERNAME', '$DC_PASSWORD', configuration + " --option=clientntlmv2auth=no"])
    105 
    106 for env in ["member"]:
    107     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', configuration])
    108 
    109 for env in ["secshare", "secserver"]:
    110     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', configuration + " --option=clientntlmv2auth=no --option=clientlanmanauth=yes"])
    111 
    112 # plain
    113 for env in ["s3dc"]:
    114     plantestsuite("samba3.blackbox.smbclient_s3.plain (%s)" % env, env, [os.path.join(samba3srcdir, "script/tests/test_smbclient_s3.sh"), '$SERVER', '$SERVER_IP', '$DC_USERNAME', '$DC_PASSWORD', '$USERID', '$LOCAL_PATH', '$PREFIX', configuration])
    115 
    116 for env in ["member"]:
    117     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\\\\$USERNAME', '$PASSWORD', '$USERID', '$LOCAL_PATH', '$PREFIX', configuration])
    118 
    119 for env in ["s3dc"]:
    120     plantestsuite("samba3.blackbox.smbclient_s3.sign (%s)" % env, env, [os.path.join(samba3srcdir, "script/tests/test_smbclient_s3.sh"), '$SERVER', '$SERVER_IP', '$DC_USERNAME', '$DC_PASSWORD', '$USERID', '$LOCAL_PATH', '$PREFIX', configuration, "--signing=required"])
    121 
    122 for env in ["member"]:
    123     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\\\\$USERNAME', '$PASSWORD', '$USERID', '$LOCAL_PATH', '$PREFIX', configuration, "--signing=required"])
    124 
    125 # encrypted
    126 for env in ["s3dc"]:
    127     plantestsuite("samba3.blackbox.smbclient_s3.crypt (%s)" % env, env, [os.path.join(samba3srcdir, "script/tests/test_smbclient_s3.sh"), '$SERVER', '$SERVER_IP', '$USERNAME', '$PASSWORD', '$USERID', '$LOCAL_PATH', '$PREFIX', configuration, "-e"])
    128 
    129 #TODO encrypted against member, with member creds, and with DC creds
    130 plantestsuite("samba3.blackbox.net.misc", "s3dc:local", [os.path.join(samba3srcdir, "script/tests/test_net_misc.sh"),
    131                                                        scriptdir, "$SMB_CONF_PATH", configuration])
    132 plantestsuite("samba3.blackbox.net.local.registry", "s3dc:local", [os.path.join(samba3srcdir, "script/tests/test_net_registry.sh"),
    133                                                        scriptdir, "$SMB_CONF_PATH", configuration])
    134 plantestsuite("samba3.blackbox.net.rpc.registry", "s3dc:local", [os.path.join(samba3srcdir, "script/tests/test_net_registry.sh"),
    135                                                        scriptdir, "$SMB_CONF_PATH", configuration, 'rpc'])
    136 
    137 plantestsuite("samba3.blackbox.net.local.registry.roundtrip", "s3dc:local", [os.path.join(samba3srcdir, "script/tests/test_net_registry_roundtrip.sh"),
    138                                                        scriptdir, "$SMB_CONF_PATH", configuration])
    139 plantestsuite("samba3.blackbox.testparm", "s3dc:local", [os.path.join(samba3srcdir, "script/tests/test_testparm_s3.sh"),
    140                                                        "$LOCAL_PATH"])
    141 
    142 plantestsuite(
    143     "samba3.pthreadpool", "s3dc",
     259    "samba3.pthreadpool", "nt4_dc",
    144260    [os.path.join(samba3srcdir, "script/tests/test_pthreadpool.sh")])
     261
     262plantestsuite("samba3.async_req", "nt4_dc",
     263              [os.path.join(samba3srcdir, "script/tests/test_async_req.sh")])
    145264
    146265#smbtorture4 tests
     
    155274
    156275raw = ["raw.acls", "raw.chkpath", "raw.close", "raw.composite", "raw.context", "raw.eas",
    157        "raw.ioctl", "raw.lock", "raw.mkdir", "raw.mux", "raw.notify", "raw.open", "raw.oplock"
     276       "raw.ioctl", "raw.lock", "raw.mkdir", "raw.mux", "raw.notify", "raw.open", "raw.oplock",
    158277       "raw.qfileinfo", "raw.qfsinfo", "raw.read", "raw.rename", "raw.search", "raw.seek",
    159278       "raw.sfileinfo.base", "raw.sfileinfo.bug", "raw.streams", "raw.unlink", "raw.write",
    160        "raw.samba3hide", "raw.samba3badpath", "raw.sfileinfo.rename",
     279       "raw.samba3hide", "raw.samba3badpath", "raw.sfileinfo.rename", "raw.session",
    161280       "raw.samba3caseinsensitive", "raw.samba3posixtimedlock",
    162        "raw.samba3rootdirfid", "raw.sfileinfo.end-of-file"]
    163 
    164 smb2 = ["smb2.lock", "smb2.read", "smb2.compound", "smb2.connect", "smb2.scan", "smb2.scanfind",
    165         "smb2.bench-oplock", "smb2.oplock"]
     281       "raw.samba3rootdirfid", "raw.sfileinfo.end-of-file",
     282       "raw.bench-oplock", "raw.bench-lock", "raw.bench-open", "raw.bench-tcon",
     283       "raw.samba3checkfsp", "raw.samba3closeerr", "raw.samba3oplocklogoff", "raw.samba3badnameblob"]
     284
     285smb2 = smbtorture4_testsuites("smb2.")
    166286
    167287rpc = ["rpc.authcontext", "rpc.samba3.bind", "rpc.samba3.srvsvc", "rpc.samba3.sharesec",
     
    169289       "rpc.samba3.getaliasmembership-0",
    170290       "rpc.samba3.netlogon", "rpc.samba3.sessionkey", "rpc.samba3.getusername",
     291       "rpc.samba3.smb1-pipe-name", "rpc.samba3.smb2-pipe-name",
     292       "rpc.samba3.smb-reauth1", "rpc.samba3.smb-reauth2",
    171293       "rpc.svcctl", "rpc.ntsvcs", "rpc.winreg", "rpc.eventlog",
    172294       "rpc.spoolss.printserver", "rpc.spoolss.win", "rpc.spoolss.notify", "rpc.spoolss.printer",
    173295       "rpc.spoolss.driver",
    174        "rpc.lsa-getuser", "rpc.lsa.lookupsids", "rpc.lsa.lookupnames",
    175        "rpc.lsa.privileges",
     296       "rpc.lsa", "rpc.lsa-getuser", "rpc.lsa.lookupsids", "rpc.lsa.lookupnames",
     297       "rpc.lsa.privileges", "rpc.lsa.secrets",
    176298       "rpc.samr", "rpc.samr.users", "rpc.samr.users.privileges", "rpc.samr.passwords",
    177        "rpc.samr.passwords.pwdlastset", "rpc.samr.large-dc", "rpc.samr.machine.auth",
     299       "rpc.samr.passwords.pwdlastset", "rpc.samr.passwords.lockout", "rpc.samr.passwords.badpwdcount", "rpc.samr.large-dc", "rpc.samr.machine.auth",
     300       "rpc.samr.priv", "rpc.samr.passwords.validate",
    178301       "rpc.netlogon.admin",
    179        "rpc.schannel", "rpc.schannel2", "rpc.bench-schannel1", "rpc.join", "rpc.bind", "rpc.epmapper"]
    180 
    181 local = ["local.nss-wrapper", "local.ndr"]
    182 
    183 winbind = ["winbind.struct", "winbind.wbclient"]
     302       "rpc.schannel", "rpc.schannel2", "rpc.bench-schannel1", "rpc.schannel_anon_setpw", "rpc.join", "rpc.bind"]
     303
     304local = ["local.nss", "local.ndr"]
     305
     306idmap = [ "idmap.rfc2307" ]
    184307
    185308rap = ["rap.basic", "rap.rpc", "rap.printing", "rap.sam"]
     
    189312nbt = ["nbt.dgram" ]
    190313
    191 tests= base + raw + smb2 + rpc + unix + local + winbind + rap + nbt
    192 
    193 sub = subprocess.Popen("%s --version 2> /dev/null" % smb4torture, stdout=subprocess.PIPE, stdin=subprocess.PIPE, shell=True)
    194 sub.communicate("")
    195 
    196 if sub.returncode == 0:
    197     for t in tests:
    198         if t == "base.delaywrite":
    199             plansmbtorturetestsuite(t, "s3dc", '//$SERVER_IP/tmp -U$USERNAME%$PASSWORD --maximum-runtime=900')
    200         elif t == "unix.whoami":
    201             plansmbtorturetestsuite(t, "s3dc", '//$SERVER_IP/tmpguest -U$USERNAME%$PASSWORD')
    202         elif t == "raw.samba3posixtimedlock":
    203             plansmbtorturetestsuite(t, "s3dc", '//$SERVER_IP/tmpguest -U$USERNAME%$PASSWORD --option=torture:localdir=$SELFTEST_PREFIX/dc/share')
    204         elif t == "rpc.samr.passwords.validate":
    205             plansmbtorturetestsuite(t, "s3dc", 'ncacn_np:$SERVER_IP[seal] -U$USERNAME%$PASSWORD', 'over ncacn_np ')
    206         else:
    207             plansmbtorturetestsuite(t, "s3dc", '//$SERVER_IP/tmp -U$USERNAME%$PASSWORD')
    208 
    209         if t == "raw.chkpath":
    210             plansmbtorturetestsuite(t, "s3dc", '//$SERVER_IP/tmpcase -U$USERNAME%$PASSWORD')
    211 
    212     test = 'rpc.lsa.lookupsids'
    213     auth_options = ["", "ntlm", "spnego", "spnego,ntlm" ]
    214     signseal_options = ["", ",connect", ",sign", ",seal"]
    215     smb_options = ["", ",smb2"]
    216     endianness_options = ["", ",bigendian"]
    217     for z in smb_options:
    218         for e in endianness_options:
    219             for a in auth_options:
    220                 for s in signseal_options:
    221                     binding_string = "ncacn_np:$SERVER_IP[%s%s%s%s]" % (a, s, z, e)
    222                     options = binding_string + " -U$USERNAME%$PASSWORD"
    223                     plansmbtorturetestsuite(test, "s3dc", options, 'over ncacn_np with [%s%s%s%s] ' % (a, s, z, e))
    224                     plantestsuite("samba3.blackbox.rpcclient over ncacn_np with [%s%s%s%s] " % (a, s, z, e), "s3dc:local", [os.path.join(samba3srcdir, "script/tests/test_rpcclient.sh"),
    225                                                                  "none", options, configuration])
    226 
     314libsmbclient = ["libsmbclient"]
     315
     316vfs = ["vfs.fruit"]
     317
     318tests= base + raw + smb2 + rpc + unix + local + rap + nbt + libsmbclient + idmap + vfs
     319
     320for t in tests:
     321    if t == "base.delaywrite":
     322        plansmbtorture4testsuite(t, "ad_dc", '//$SERVER/tmp -U$USERNAME%$PASSWORD -k yes --maximum-runtime=900')
     323    elif t == "rap.sam":
     324        plansmbtorture4testsuite(t, "nt4_dc", '//$SERVER_IP/tmp -U$USERNAME%$PASSWORD --option=doscharset=ISO-8859-1')
     325        plansmbtorture4testsuite(t, "ad_dc", '//$SERVER_IP/tmp -U$USERNAME%$PASSWORD --option=doscharset=ISO-8859-1')
     326    elif t == "winbind.pac":
     327        plansmbtorture4testsuite(t, "ad_member:local", '//$SERVER/tmp --realm=$REALM --machine-pass --option=torture:addc=$DC_SERVER', description="machine account")
     328    elif t == "unix.whoami":
     329        plansmbtorture4testsuite(t, "nt4_member:local", '//$SERVER/tmp --machine-pass', description="machine account")
     330        plansmbtorture4testsuite(t, "ad_member:local", '//$SERVER/tmp --machine-pass --option=torture:addc=$DC_SERVER', description="machine account")
     331        for env in ["nt4_dc", "nt4_member"]:
     332            plansmbtorture4testsuite(t, env, '//$SERVER/tmp -U$DC_USERNAME%$DC_PASSWORD')
     333            plansmbtorture4testsuite(t, env, '//$SERVER/tmpguest -U%', description='anonymous connection')
     334        for env in ["ad_dc", "ad_member"]:
     335            plansmbtorture4testsuite(t, env, '//$SERVER/tmp -U$DC_USERNAME@$REALM%$DC_PASSWORD --option=torture:addc=$DC_SERVER')
     336            plansmbtorture4testsuite(t, env, '//$SERVER/tmp -k yes -U$DC_USERNAME@$REALM%$DC_PASSWORD --option=torture:addc=$DC_SERVER', description='kerberos connection')
     337            plansmbtorture4testsuite(t, env, '//$SERVER/tmpguest -U% --option=torture:addc=$DC_SERVER', description='anonymous connection')
     338    elif t == "raw.samba3posixtimedlock":
     339        plansmbtorture4testsuite(t, "nt4_dc", '//$SERVER_IP/tmpguest -U$USERNAME%$PASSWORD --option=torture:localdir=$SELFTEST_PREFIX/nt4_dc/share')
     340        plansmbtorture4testsuite(t, "ad_dc", '//$SERVER_IP/tmpguest -U$USERNAME%$PASSWORD --option=torture:localdir=$SELFTEST_PREFIX/ad_dc/share')
     341    elif t == "raw.chkpath":
     342        plansmbtorture4testsuite(t, "nt4_dc", '//$SERVER_IP/tmpcase -U$USERNAME%$PASSWORD')
     343        plansmbtorture4testsuite(t, "ad_dc", '//$SERVER_IP/tmpcase -U$USERNAME%$PASSWORD')
     344    elif t == "raw.samba3hide" or t == "raw.samba3checkfsp" or t ==  "raw.samba3closeerr":
     345        plansmbtorture4testsuite(t, "nt4_dc", '//$SERVER_IP/tmp -U$USERNAME%$PASSWORD')
     346        plansmbtorture4testsuite(t, "simpleserver", '//$SERVER_IP/tmp -U$USERNAME%$PASSWORD')
     347        plansmbtorture4testsuite(t, "ad_dc", '//$SERVER/tmp -U$USERNAME%$PASSWORD')
     348    elif t == "raw.session" or t == "smb2.session":
     349        plansmbtorture4testsuite(t, "nt4_dc", '//$SERVER_IP/tmp -U$USERNAME%$PASSWORD', 'plain')
     350        plansmbtorture4testsuite(t, "nt4_dc", '//$SERVER_IP/tmpenc -U$USERNAME%$PASSWORD', 'enc')
     351        plansmbtorture4testsuite(t, "ad_dc", '//$SERVER/tmp -k no -U$USERNAME%$PASSWORD', 'ntlm')
     352        plansmbtorture4testsuite(t, "ad_dc", '//$SERVER/tmp -k yes -U$USERNAME%$PASSWORD', 'krb5')
     353    elif t == "rpc.lsa":
     354        plansmbtorture4testsuite(t, "nt4_dc", '//$SERVER_IP/tmp -U$USERNAME%$PASSWORD', 'over ncacn_np ')
     355        plansmbtorture4testsuite(t, "nt4_dc", 'ncacn_ip_tcp:$SERVER_IP -U$USERNAME%$PASSWORD', 'over ncacn_ip_tcp ')
     356        plansmbtorture4testsuite(t, "ad_dc", '//$SERVER_IP/tmp -U$USERNAME%$PASSWORD', 'over ncacn_np ')
     357        plansmbtorture4testsuite(t, "ad_dc", 'ncacn_ip_tcp:$SERVER_IP -U$USERNAME%$PASSWORD', 'over ncacn_ip_tcp ')
     358    elif t == "rpc.samr.passwords.validate":
     359        plansmbtorture4testsuite(t, "nt4_dc", 'ncacn_ip_tcp:$SERVER_IP[seal] -U$USERNAME%$PASSWORD', 'over ncacn_ip_tcp ')
     360        plansmbtorture4testsuite(t, "ad_dc", 'ncacn_ip_tcp:$SERVER_IP[seal] -U$USERNAME%$PASSWORD', 'over ncacn_ip_tcp ')
     361    elif t == "smb2.durable-open" or t == "smb2.durable-v2-open" or t == "smb2.replay":
     362        plansmbtorture4testsuite(t, "nt4_dc", '//$SERVER_IP/durable -U$USERNAME%$PASSWORD')
     363        plansmbtorture4testsuite(t, "ad_dc", '//$SERVER_IP/durable -U$USERNAME%$PASSWORD')
     364    elif t == "base.rw1":
     365        plansmbtorture4testsuite(t, "nt4_dc", '//$SERVER_IP/tmp -U$USERNAME%$PASSWORD')
     366        plansmbtorture4testsuite(t, "nt4_dc", '//$SERVER_IP/valid-users-tmp -U$USERNAME%$PASSWORD')
     367        plansmbtorture4testsuite(t, "nt4_dc", '//$SERVER_IP/write-list-tmp -U$USERNAME%$PASSWORD')
     368        plansmbtorture4testsuite(t, "ad_dc", '//$SERVER/tmp -U$USERNAME%$PASSWORD')
     369    elif t == "idmap.rfc2307":
     370        plantestsuite(t, "ad_member_rfc2307", [os.path.join(samba3srcdir, "../nsswitch/tests/test_idmap_rfc2307.sh"), '$DOMAIN', 'Administrator', '2000000', 'Guest', '2000001', '"Domain Users"', '2000002', 'DnsAdmins', '2000003', 'ou=idmap,dc=samba,dc=example,dc=com', '$DC_SERVER', '$DC_USERNAME', '$DC_PASSWORD'])
     371    elif t == "raw.acls":
     372        plansmbtorture4testsuite(t, "nt4_dc", '//$SERVER_IP/tmp -U$USERNAME%$PASSWORD')
     373        plansmbtorture4testsuite(t, "nt4_dc", '//$SERVER_IP/nfs4acl_simple -U$USERNAME%$PASSWORD', description='nfs4acl_xattr-simple')
     374        plansmbtorture4testsuite(t, "nt4_dc", '//$SERVER_IP/nfs4acl_special -U$USERNAME%$PASSWORD', description='nfs4acl_xattr-special')
     375        plansmbtorture4testsuite(t, "ad_dc", '//$SERVER_IP/tmpcase -U$USERNAME%$PASSWORD')
     376    elif t == "smb2.ioctl":
     377        plansmbtorture4testsuite(t, "nt4_dc", '//$SERVER_IP/fs_specific -U$USERNAME%$PASSWORD', 'fs_specific')
     378        plansmbtorture4testsuite(t, "nt4_dc", '//$SERVER_IP/tmp -U$USERNAME%$PASSWORD')
     379        plansmbtorture4testsuite(t, "ad_dc", '//$SERVER/tmp -U$USERNAME%$PASSWORD')
     380    elif t == "smb2.lock":
     381        plansmbtorture4testsuite(t, "nt4_dc", '//$SERVER_IP/aio -U$USERNAME%$PASSWORD', 'aio')
     382        plansmbtorture4testsuite(t, "nt4_dc", '//$SERVER_IP/tmp -U$USERNAME%$PASSWORD')
     383        plansmbtorture4testsuite(t, "ad_dc", '//$SERVER/tmp -U$USERNAME%$PASSWORD')
     384    elif t == "raw.read":
     385        plansmbtorture4testsuite(t, "nt4_dc", '//$SERVER_IP/tmp -U$USERNAME%$PASSWORD')
     386        plansmbtorture4testsuite(t, "nt4_dc", '//$SERVER_IP/aio -U$USERNAME%$PASSWORD', 'aio')
     387        plansmbtorture4testsuite(t, "ad_dc", '//$SERVER/tmp -U$USERNAME%$PASSWORD')
     388    elif t == "raw.search":
     389        plansmbtorture4testsuite(t, "nt4_dc", '//$SERVER_IP/tmp -U$USERNAME%$PASSWORD')
     390# test the dirsort module.
     391        plansmbtorture4testsuite(t, "nt4_dc", '//$SERVER_IP/tmpsort -U$USERNAME%$PASSWORD')
     392        plansmbtorture4testsuite(t, "ad_dc", '//$SERVER/tmp -U$USERNAME%$PASSWORD')
     393    elif t == "vfs.fruit":
     394        plansmbtorture4testsuite(t, "nt4_dc", '//$SERVER_IP/vfs_fruit -U$USERNAME%$PASSWORD --option=torture:localdir=$SELFTEST_PREFIX/nt4_dc/share')
     395        plansmbtorture4testsuite(t, "ad_dc", '//$SERVER_IP/vfs_fruit -U$USERNAME%$PASSWORD --option=torture:localdir=$SELFTEST_PREFIX/ad_dc/share')
     396    elif t == "rpc.schannel_anon_setpw":
     397        plansmbtorture4testsuite(t, "nt4_dc", '//$SERVER_IP/tmp -U$%', description="anonymous password set")
     398        plansmbtorture4testsuite(t, "nt4_dc_schannel", '//$SERVER_IP/tmp -U$%', description="anonymous password set (schannel enforced server-side)")
     399        plansmbtorture4testsuite(t, "ad_dc", '//$SERVER/tmp -U$%', description="anonymous password set")
     400    elif t == "local.nss":
     401        for env in ["nt4_dc:local", "ad_member:local", "nt4_member:local", "ad_dc:local", "ad_dc_ntvfs:local"]:
     402            plansmbtorture4testsuite(t, env, '//$SERVER/tmp -U$USERNAME%$PASSWORD')
     403    elif t == "smb2.change_notify_disabled":
     404        plansmbtorture4testsuite(t, "simpleserver", '//$SERVER/tmp -U$USERNAME%$PASSWORD')
     405    elif t == "smb2.notify":
     406        plansmbtorture4testsuite(t, "nt4_dc", '//$SERVER_IP/tmp -U$USERNAME%$PASSWORD --signing=required')
     407        plansmbtorture4testsuite(t, "ad_dc", '//$SERVER/tmp -U$USERNAME%$PASSWORD --signing=required')
     408    else:
     409        plansmbtorture4testsuite(t, "nt4_dc", '//$SERVER_IP/tmp -U$USERNAME%$PASSWORD')
     410        plansmbtorture4testsuite(t, "ad_dc", '//$SERVER/tmp -U$USERNAME%$PASSWORD')
     411
     412
     413test = 'rpc.lsa.lookupsids'
     414auth_options = ["", "ntlm", "spnego", "spnego,ntlm" ]
     415signseal_options = ["", ",connect", ",sign", ",seal"]
     416endianness_options = ["", ",bigendian"]
     417for s in signseal_options:
    227418    for e in endianness_options:
    228419        for a in auth_options:
    229             for s in signseal_options:
    230                 binding_string = "ncacn_ip_tcp:$SERVER_IP[%s%s%s]" % (a, s, e)
    231                 options = binding_string + " -U$USERNAME%$PASSWORD"
    232                 plansmbtorturetestsuite(test, "s3dc", options, 'over ncacn_ip_tcp with [%s%s%s] ' % (a, s, e))
     420            binding_string = "ncacn_np:$SERVER[%s%s%s]" % (a, s, e)
     421            options = binding_string + " -U$USERNAME%$PASSWORD"
     422            plansmbtorture4testsuite(test, "nt4_dc", options, 'over ncacn_np with [%s%s%s] ' % (a, s, e))
     423            plantestsuite("samba3.blackbox.rpcclient over ncacn_np with [%s%s%s] " % (a, s, e), "nt4_dc:local", [os.path.join(samba3srcdir, "script/tests/test_rpcclient.sh"),
     424                                                             "none", options, configuration])
     425
     426    # We should try more combinations in future, but this is all
     427    # the pre-calculated credentials cache supports at the moment
     428    e = ""
     429    a = ""
     430    binding_string = "ncacn_np:$SERVER[%s%s%s]" % (a, s, e)
     431    options = binding_string + " -k yes --krb5-ccache=$PREFIX/ktest/krb5_ccache-2"
     432    plansmbtorture4testsuite(test, "ktest", options, 'krb5 with old ccache ncacn_np with [%s%s%s] ' % (a, s, e))
     433
     434    options = binding_string + " -k yes --krb5-ccache=$PREFIX/ktest/krb5_ccache-3"
     435    plansmbtorture4testsuite(test, "ktest", options, 'krb5 ncacn_np with [%s%s%s] ' % (a, s, e))
     436
     437    auth_options2 = ["krb5", "spnego,krb5"]
     438    for a in auth_options2:
     439        binding_string = "ncacn_np:$SERVER[%s%s%s]" % (a, s, e)
     440
     441        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"),
     442                                                                                                                              "$PREFIX/ktest/krb5_ccache-3", binding_string, "-k", configuration])
     443
     444plantestsuite("samba3.blackbox.rpcclient_samlogon", "ad_member:local", [os.path.join(samba3srcdir, "script/tests/test_rpcclient_samlogon.sh"),
     445                                                                       "$DC_USERNAME", "$DC_PASSWORD", "ncacn_np:$DC_SERVER", configuration])
     446plantestsuite("samba3.blackbox.sharesec", "simpleserver:local",
     447              [os.path.join(samba3srcdir, "script/tests/test_sharesec.sh"),
     448               configuration, os.path.join(bindir(), "sharesec"), "tmp"])
     449
     450plantestsuite("samba3.blackbox.net_dom_join_fail_dc", "nt4_dc",
     451              [os.path.join(samba3srcdir, "script/tests/test_net_dom_join_fail_dc.sh"),
     452               "$USERNAME", "$PASSWORD", "$SERVER", "$PREFIX/net_dom_join_fail_dc",
     453               configuration])
     454plantestsuite("samba3.blackbox.net_rpc_join", "nt4_dc",
     455              [os.path.join(samba3srcdir, "script/tests/test_net_rpc_join.sh"),
     456               "$USERNAME", "$PASSWORD", "$SERVER", "$PREFIX/net_rpc_join",
     457               configuration])
     458
     459plantestsuite("samba3.blackbox.rpcclient_srvsvc", "simpleserver",
     460              [os.path.join(samba3srcdir, "script/tests/test_rpcclientsrvsvc.sh"),
     461               "$USERNAME", "$PASSWORD", "$SERVER",
     462               os.path.join(bindir(), "rpcclient"), "tmp"])
     463
     464options_list = ["", "-e"]
     465for options in options_list:
     466    plantestsuite("samba3.blackbox.smbclient_krb5 old ccache %s" % options, "ktest:local",
     467                  [os.path.join(samba3srcdir, "script/tests/test_smbclient_krb5.sh"),
     468                   "$PREFIX/ktest/krb5_ccache-2",
     469                   smbclient3, "$SERVER", options, configuration])
     470
     471    plantestsuite("samba3.blackbox.smbclient_krb5 old ccache %s" % options, "ktest:local",
     472                  [os.path.join(samba3srcdir, "script/tests/test_smbclient_krb5.sh"),
     473                   "$PREFIX/ktest/krb5_ccache-2",
     474                   smbclient3, "$SERVER", options, configuration])
     475
     476    plantestsuite("samba3.blackbox.smbclient_large_file %s" % options, "ktest:local",
     477                  [os.path.join(samba3srcdir, "script/tests/test_smbclient_posix_large.sh"),
     478                   "$PREFIX/ktest/krb5_ccache-3",
     479                   smbclient3, "$SERVER", "$PREFIX", options, "-k " + configuration])
     480
     481    plantestsuite("samba3.blackbox.smbclient_posix_large %s krb5" % options, "ktest:local",
     482                  [os.path.join(samba3srcdir, "script/tests/test_smbclient_posix_large.sh"),
     483                   "$PREFIX/ktest/krb5_ccache-3",
     484                   smbclient3, "$SERVER", "$PREFIX", options, "-k " + configuration])
     485
     486    plantestsuite("samba3.blackbox.smbclient_posix_large %s NTLM" % options, "nt4_dc:local",
     487                  [os.path.join(samba3srcdir, "script/tests/test_smbclient_posix_large.sh"),
     488                   "none",
     489                   smbclient3, "$SERVER", "$PREFIX", options, "-U$USERNAME%$PASSWORD " + configuration])
     490
     491for e in endianness_options:
     492    for a in auth_options:
     493        for s in signseal_options:
     494            binding_string = "ncacn_ip_tcp:$SERVER_IP[%s%s%s]" % (a, s, e)
     495            options = binding_string + " -U$USERNAME%$PASSWORD"
     496            plansmbtorture4testsuite(test, "nt4_dc", options, 'over ncacn_ip_tcp with [%s%s%s] ' % (a, s, e))
     497
     498plansmbtorture4testsuite('rpc.epmapper', 'nt4_dc:local', 'ncalrpc: -U$USERNAME%$PASSWORD', 'over ncalrpc')
     499plansmbtorture4testsuite('rpc.fsrvp', 'nt4_dc:local', 'ncacn_np:$SERVER_IP[/pipe/FssagentRpc] -U$USERNAME%$PASSWORD', 'over ncacn_np')
Note: See TracChangeset for help on using the changeset viewer.