mirror of
https://github.com/samba-team/samba.git
synced 2025-09-20 17:44:21 +03:00
r22156: - Lazy evaluate variable names.
- Don't set up environments until necessary
- Add --resetup-environment option
- Add 'none' environment
(This used to be commit ed0410309b
)
This commit is contained in:
committed by
Gerald (Jerry) Carter
parent
4cc500433d
commit
e338b4b47b
@@ -16,10 +16,14 @@ sub new($$$$) {
|
|||||||
return $self;
|
return $self;
|
||||||
}
|
}
|
||||||
|
|
||||||
sub slapd_start($$$)
|
sub slapd_start($$)
|
||||||
{
|
{
|
||||||
my $count = 0;
|
my $count = 0;
|
||||||
my ($self, $conf, $uri) = @_;
|
my ($self, $env_vars) = @_;
|
||||||
|
|
||||||
|
my $conf = $env_vars->{SLAPD_CONF};
|
||||||
|
my $uri = $env_vars->{LDAP_URI};
|
||||||
|
|
||||||
# running slapd in the background means it stays in the same process group, so it can be
|
# running slapd in the background means it stays in the same process group, so it can be
|
||||||
# killed by timelimit
|
# killed by timelimit
|
||||||
if (defined($ENV{FEDORA_DS_PREFIX})) {
|
if (defined($ENV{FEDORA_DS_PREFIX})) {
|
||||||
@@ -33,7 +37,7 @@ sub slapd_start($$$)
|
|||||||
while (system("$self->{bindir}/ldbsearch -H $uri -s base -b \"\" supportedLDAPVersion > /dev/null") != 0) {
|
while (system("$self->{bindir}/ldbsearch -H $uri -s base -b \"\" supportedLDAPVersion > /dev/null") != 0) {
|
||||||
$count++;
|
$count++;
|
||||||
if ($count > 10) {
|
if ($count > 10) {
|
||||||
$self->slapd_stop();
|
$self->slapd_stop($env_vars);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
sleep(1);
|
sleep(1);
|
||||||
@@ -41,13 +45,13 @@ sub slapd_start($$$)
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
sub slapd_stop($)
|
sub slapd_stop($$)
|
||||||
{
|
{
|
||||||
my ($self) = @_;
|
my ($self, $envvars) = @_;
|
||||||
if (defined($ENV{FEDORA_DS_PREFIX})) {
|
if (defined($envvars->{FEDORA_DS_PREFIX})) {
|
||||||
system("$ENV{LDAPDIR}/slapd-samba4/stop-slapd");
|
system("$envvars->{LDAPDIR}/slapd-samba4/stop-slapd");
|
||||||
} else {
|
} else {
|
||||||
open(IN, "<$ENV{PIDDIR}/slapd.pid") or
|
open(IN, "<$envvars->{PIDDIR}/slapd.pid") or
|
||||||
die("unable to open slapd pid file");
|
die("unable to open slapd pid file");
|
||||||
kill 9, <IN>;
|
kill 9, <IN>;
|
||||||
close(IN);
|
close(IN);
|
||||||
@@ -61,7 +65,7 @@ sub check_or_start($$$$)
|
|||||||
|
|
||||||
# Start slapd before smbd
|
# Start slapd before smbd
|
||||||
if ($self->{ldap}) {
|
if ($self->{ldap}) {
|
||||||
$self->slapd_start($ENV{SLAPD_CONF}, $ENV{LDAP_URI}) or
|
$self->slapd_start($env_vars) or
|
||||||
die("couldn't start slapd");
|
die("couldn't start slapd");
|
||||||
|
|
||||||
print "LDAP PROVISIONING...";
|
print "LDAP PROVISIONING...";
|
||||||
@@ -132,9 +136,9 @@ sub wait_for_start($$)
|
|||||||
system("bin/nmblookup $testenv_vars->{CONFIGURATION} -U $testenv_vars->{SERVER} $testenv_vars->{NETBIOSNAME}");
|
system("bin/nmblookup $testenv_vars->{CONFIGURATION} -U $testenv_vars->{SERVER} $testenv_vars->{NETBIOSNAME}");
|
||||||
}
|
}
|
||||||
|
|
||||||
sub provision($$$)
|
sub provision($$)
|
||||||
{
|
{
|
||||||
my ($self, $environment, $prefix) = @_;
|
my ($self, $prefix) = @_;
|
||||||
my %ret = ();
|
my %ret = ();
|
||||||
print "PROVISIONING...";
|
print "PROVISIONING...";
|
||||||
open(IN, "$RealBin/mktestdc.sh $prefix|") or die("Unable to setup");
|
open(IN, "$RealBin/mktestdc.sh $prefix|") or die("Unable to setup");
|
||||||
@@ -156,9 +160,9 @@ sub provision_ldap($)
|
|||||||
die("LDAP PROVISIONING failed: $self->{bindir}/smbscript $self->{setupdir}/provision $ENV{PROVISION_OPTIONS} \"$ENV{PROVISION_ACI}\" --ldap-backend=$ENV{LDAP_URI}");
|
die("LDAP PROVISIONING failed: $self->{bindir}/smbscript $self->{setupdir}/provision $ENV{PROVISION_OPTIONS} \"$ENV{PROVISION_ACI}\" --ldap-backend=$ENV{LDAP_URI}");
|
||||||
}
|
}
|
||||||
|
|
||||||
sub stop($)
|
sub teardown_env($$)
|
||||||
{
|
{
|
||||||
my ($self) = @_;
|
my ($self, $envvars) = @_;
|
||||||
|
|
||||||
close(DATA);
|
close(DATA);
|
||||||
|
|
||||||
@@ -166,22 +170,33 @@ sub stop($)
|
|||||||
|
|
||||||
my $failed = $? >> 8;
|
my $failed = $? >> 8;
|
||||||
|
|
||||||
if (-f "$ENV{PIDDIR}/smbd.pid" ) {
|
if (-f "$envvars->{PIDDIR}/smbd.pid" ) {
|
||||||
open(IN, "<$ENV{PIDDIR}/smbd.pid") or die("unable to open smbd pid file");
|
open(IN, "<$envvars->{PIDDIR}/smbd.pid") or die("unable to open smbd pid file");
|
||||||
kill 9, <IN>;
|
kill 9, <IN>;
|
||||||
close(IN);
|
close(IN);
|
||||||
}
|
}
|
||||||
|
|
||||||
$self->slapd_stop() if ($self->{ldap});
|
$self->slapd_stop($envvars) if ($self->{ldap});
|
||||||
|
|
||||||
return $failed;
|
return $failed;
|
||||||
}
|
}
|
||||||
|
|
||||||
sub setup_env($$$)
|
sub setup_env($$$$)
|
||||||
{
|
{
|
||||||
my ($self, $name, $path, $socket_wrapper_dir) = @_;
|
my ($self, $envname, $path, $socket_wrapper_dir) = @_;
|
||||||
|
|
||||||
|
if ($envname eq "dc") {
|
||||||
|
return $self->setup_dc("$path/dc", $socket_wrapper_dir);
|
||||||
|
} else {
|
||||||
|
die("Samba4 can't provide environment $envname");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
my $env = $self->provision($name, $path);
|
sub setup_dc($$$)
|
||||||
|
{
|
||||||
|
my ($self, $path, $socket_wrapper_dir) = @_;
|
||||||
|
|
||||||
|
my $env = $self->provision($path);
|
||||||
|
|
||||||
$self->check_or_start($env, $socket_wrapper_dir,
|
$self->check_or_start($env, $socket_wrapper_dir,
|
||||||
($ENV{SMBD_MAX_TIME} or 5400));
|
($ENV{SMBD_MAX_TIME} or 5400));
|
||||||
@@ -191,4 +206,9 @@ sub setup_env($$$)
|
|||||||
return $env;
|
return $env;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sub stop($)
|
||||||
|
{
|
||||||
|
my ($self) = @_;
|
||||||
|
}
|
||||||
|
|
||||||
1;
|
1;
|
||||||
|
@@ -99,7 +99,7 @@ rm -f $MODCONF
|
|||||||
touch $MODCONF
|
touch $MODCONF
|
||||||
|
|
||||||
slaptest -u -f $SLAPD_CONF >&2 || {
|
slaptest -u -f $SLAPD_CONF >&2 || {
|
||||||
echo "enabling slapd modules" >&2
|
# echo "enabling slapd modules" >&2
|
||||||
cat > $MODCONF <<EOF
|
cat > $MODCONF <<EOF
|
||||||
modulepath /usr/lib/ldap
|
modulepath /usr/lib/ldap
|
||||||
moduleload back_bdb
|
moduleload back_bdb
|
||||||
|
@@ -24,7 +24,6 @@ REALM=SAMBA.EXAMPLE.COM
|
|||||||
DNSNAME="samba.example.com"
|
DNSNAME="samba.example.com"
|
||||||
BASEDN="dc=samba,dc=example,dc=com"
|
BASEDN="dc=samba,dc=example,dc=com"
|
||||||
PASSWORD=penguin
|
PASSWORD=penguin
|
||||||
AUTH="-U$USERNAME%$PASSWORD"
|
|
||||||
SRCDIR=`pwd`
|
SRCDIR=`pwd`
|
||||||
ROOT=$USER
|
ROOT=$USER
|
||||||
SERVER=localhost
|
SERVER=localhost
|
||||||
@@ -274,7 +273,6 @@ echo "KRB5_CONFIG=$KRB5_CONFIG"
|
|||||||
echo "PREFIX_ABS=$PREFIX_ABS"
|
echo "PREFIX_ABS=$PREFIX_ABS"
|
||||||
echo "SLAPD_CONF=$SLAPD_CONF"
|
echo "SLAPD_CONF=$SLAPD_CONF"
|
||||||
echo "PIDDIR=$PIDDIR"
|
echo "PIDDIR=$PIDDIR"
|
||||||
echo "AUTH=$AUTH"
|
|
||||||
echo "SERVER=$SERVER"
|
echo "SERVER=$SERVER"
|
||||||
echo "NETBIOSNAME=$NETBIOSNAME"
|
echo "NETBIOSNAME=$NETBIOSNAME"
|
||||||
echo "LDAP_URI=$LDAP_URI"
|
echo "LDAP_URI=$LDAP_URI"
|
||||||
|
@@ -132,6 +132,7 @@ my $opt_verbose = 0;
|
|||||||
my $opt_testenv = 0;
|
my $opt_testenv = 0;
|
||||||
my $opt_ldap = undef;
|
my $opt_ldap = undef;
|
||||||
my $opt_analyse_cmd = undef;
|
my $opt_analyse_cmd = undef;
|
||||||
|
my $opt_resetup_env = undef;
|
||||||
|
|
||||||
my $srcdir = ".";
|
my $srcdir = ".";
|
||||||
my $builddir = ".";
|
my $builddir = ".";
|
||||||
@@ -233,7 +234,7 @@ sub run_test_plain($$$$)
|
|||||||
my ($name, $cmd, $i, $totalsuites) = @_;
|
my ($name, $cmd, $i, $totalsuites) = @_;
|
||||||
my $err = "";
|
my $err = "";
|
||||||
if ($#$suitesfailed+1 > 0) { $err = ", ".($#$suitesfailed+1)." errors"; }
|
if ($#$suitesfailed+1 > 0) { $err = ", ".($#$suitesfailed+1)." errors"; }
|
||||||
printf "[$i/$totalsuites in " . (time() - $start)."s$err] $name\n";
|
print "[$i/$totalsuites in " . (time() - $start)."s$err] $name\n";
|
||||||
open(RESULT, "$cmd 2>&1|");
|
open(RESULT, "$cmd 2>&1|");
|
||||||
my $expected_ret = 1;
|
my $expected_ret = 1;
|
||||||
my $open_tests = {};
|
my $open_tests = {};
|
||||||
@@ -335,6 +336,7 @@ my $result = GetOptions (
|
|||||||
'testenv' => \$opt_testenv,
|
'testenv' => \$opt_testenv,
|
||||||
'ldap' => \$opt_ldap,
|
'ldap' => \$opt_ldap,
|
||||||
'analyse-cmd=s' => \$opt_analyse_cmd,
|
'analyse-cmd=s' => \$opt_analyse_cmd,
|
||||||
|
'resetup-environment' => \$opt_resetup_env,
|
||||||
);
|
);
|
||||||
|
|
||||||
exit(1) if (not $result);
|
exit(1) if (not $result);
|
||||||
@@ -434,28 +436,44 @@ my $interfaces = join(',', ("127.0.0.6/8",
|
|||||||
"127.0.0.10/8",
|
"127.0.0.10/8",
|
||||||
"127.0.0.11/8"));
|
"127.0.0.11/8"));
|
||||||
|
|
||||||
my $testenv_vars = $target->setup_env("dc", "$prefix/dc", $socket_wrapper_dir);
|
|
||||||
|
|
||||||
my $conffile = "$prefix/client.conf";
|
my $conffile = "$prefix/client.conf";
|
||||||
my $abs_srcdir = cwd();
|
|
||||||
open(CF, ">$conffile");
|
sub write_clientconf($$)
|
||||||
print CF "[global]\n";
|
{
|
||||||
if (defined($ENV{VALGRIND})) {
|
my ($conffile, $vars) = @_;
|
||||||
print CF "\ticonv:native = true\n";
|
|
||||||
} else {
|
my $abs_srcdir = cwd();
|
||||||
print CF "\ticonv:native = false\n";
|
|
||||||
}
|
open(CF, ">$conffile");
|
||||||
print CF
|
print CF "[global]\n";
|
||||||
|
if (defined($ENV{VALGRIND})) {
|
||||||
|
print CF "\ticonv:native = true\n";
|
||||||
|
} else {
|
||||||
|
print CF "\ticonv:native = false\n";
|
||||||
|
}
|
||||||
|
print CF
|
||||||
" netbios name = localtest
|
" netbios name = localtest
|
||||||
netbios aliases = localhost
|
netbios aliases = localhost
|
||||||
workgroup = $testenv_vars->{DOMAIN}
|
";
|
||||||
realm = $testenv_vars->{REALM}
|
if (defined($vars->{DOMAIN})) {
|
||||||
pid directory = $testenv_vars->{PIDDIR}
|
print CF "\tworkgroup = $vars->{DOMAIN}\n";
|
||||||
ncalrpc dir = $testenv_vars->{NCALRPCDIR}
|
}
|
||||||
|
if (defined($vars->{REALM})) {
|
||||||
|
print CF "\trealm = $vars->{REALM}\n";
|
||||||
|
}
|
||||||
|
if (defined($vars->{PIDDIR})) {
|
||||||
|
print CF "\tpid directory = $vars->{PIDDIR}\n";
|
||||||
|
}
|
||||||
|
if (defined($vars->{NCALRPCDIR})) {
|
||||||
|
print CF "\tncalrpc dir = $vars->{NCALRPCDIR}\n";
|
||||||
|
}
|
||||||
|
if (defined($vars->{WINBINDD_SOCKET_DIR})) {
|
||||||
|
print CF "\twinbindd socket directory = $vars->{WINBINDD_SOCKET_DIR}\n";
|
||||||
|
}
|
||||||
|
print CF "
|
||||||
js include = $abs_srcdir/scripting/libjs
|
js include = $abs_srcdir/scripting/libjs
|
||||||
winbindd socket directory = $testenv_vars->{WINBINDD_SOCKET_DIR}
|
|
||||||
name resolve order = bcast
|
name resolve order = bcast
|
||||||
interfaces = 127.0.0.1/8
|
interfaces = $interfaces
|
||||||
panic action = $abs_srcdir/script/gdb_backtrace \%PID\% \%PROG\%
|
panic action = $abs_srcdir/script/gdb_backtrace \%PID\% \%PROG\%
|
||||||
max xmit = 32K
|
max xmit = 32K
|
||||||
notify:inotify = false
|
notify:inotify = false
|
||||||
@@ -465,10 +483,11 @@ print CF
|
|||||||
torture:basedir = ./st
|
torture:basedir = ./st
|
||||||
gensec:require_pac = true
|
gensec:require_pac = true
|
||||||
";
|
";
|
||||||
close(CF);
|
close(CF);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
my @torture_options = ();
|
my @torture_options = ();
|
||||||
push (@torture_options, "--option=interfaces=$interfaces");
|
|
||||||
push (@torture_options, "--configfile=$conffile");
|
push (@torture_options, "--configfile=$conffile");
|
||||||
# ensure any one smbtorture call doesn't run too long
|
# ensure any one smbtorture call doesn't run too long
|
||||||
push (@torture_options, "--maximum-runtime=$torture_maxtime");
|
push (@torture_options, "--maximum-runtime=$torture_maxtime");
|
||||||
@@ -480,15 +499,12 @@ push (@torture_options, "--option=torture:quick=yes") if ($opt_quick);
|
|||||||
$ENV{TORTURE_OPTIONS} = join(' ', @torture_options);
|
$ENV{TORTURE_OPTIONS} = join(' ', @torture_options);
|
||||||
print "OPTIONS $ENV{TORTURE_OPTIONS}\n";
|
print "OPTIONS $ENV{TORTURE_OPTIONS}\n";
|
||||||
|
|
||||||
foreach ("PASSWORD", "DOMAIN", "SERVER", "USERNAME", "NETBIOSNAME") {
|
|
||||||
$ENV{$_} = $testenv_vars->{$_};
|
|
||||||
}
|
|
||||||
|
|
||||||
my @todo = ();
|
my @todo = ();
|
||||||
|
|
||||||
my $testsdir = "$srcdir/script/tests";
|
my $testsdir = "$srcdir/script/tests";
|
||||||
$ENV{CONFIGURATION} = "--configfile=$conffile";
|
$ENV{CONFIGURATION} = "--configfile=$conffile";
|
||||||
|
|
||||||
|
|
||||||
if ($opt_quick) {
|
if ($opt_quick) {
|
||||||
open(IN, "$testsdir/tests_quick.sh|");
|
open(IN, "$testsdir/tests_quick.sh|");
|
||||||
} else {
|
} else {
|
||||||
@@ -514,14 +530,44 @@ my $suitestotal = $#todo + 1;
|
|||||||
my $i = 0;
|
my $i = 0;
|
||||||
$| = 1;
|
$| = 1;
|
||||||
|
|
||||||
# The Kerberos tests fail if this variable is set.
|
my %running_envs = ();
|
||||||
delete $ENV{DOMAIN};
|
|
||||||
|
|
||||||
$ENV{KRB5_CONFIG} = $testenv_vars->{KRB5_CONFIG};
|
sub setup_env($)
|
||||||
|
{
|
||||||
|
my ($envname) = @_;
|
||||||
|
|
||||||
|
my $testenv_vars;
|
||||||
|
if (defined($running_envs{$envname})) {
|
||||||
|
$testenv_vars = $running_envs{$envname};
|
||||||
|
} elsif ($envname eq "none") {
|
||||||
|
$testenv_vars = {};
|
||||||
|
} else {
|
||||||
|
$testenv_vars = $target->setup_env($envname, $prefix, $socket_wrapper_dir);
|
||||||
|
}
|
||||||
|
write_clientconf($conffile, $testenv_vars);
|
||||||
|
foreach ("PASSWORD", "DOMAIN", "SERVER", "USERNAME", "NETBIOSNAME",
|
||||||
|
"KRB5_CONFIG") {
|
||||||
|
if (defined($testenv_vars->{$_})) {
|
||||||
|
$ENV{$_} = $testenv_vars->{$_};
|
||||||
|
} else {
|
||||||
|
delete $ENV{$_};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$running_envs{$envname} = $testenv_vars;
|
||||||
|
return $testenv_vars;
|
||||||
|
}
|
||||||
|
|
||||||
|
sub teardown_env($)
|
||||||
|
{
|
||||||
|
my ($envname) = @_;
|
||||||
|
$target->teardown_env($running_envs{$envname});
|
||||||
|
delete $running_envs{$envname};
|
||||||
|
}
|
||||||
SocketWrapper::set_default_iface(6);
|
SocketWrapper::set_default_iface(6);
|
||||||
|
|
||||||
if ($opt_testenv) {
|
if ($opt_testenv) {
|
||||||
|
my $testenv_vars = setup_env("dc");
|
||||||
$ENV{PIDDIR} = $testenv_vars->{PIDDIR};
|
$ENV{PIDDIR} = $testenv_vars->{PIDDIR};
|
||||||
my $term = ($ENV{TERM} or "xterm");
|
my $term = ($ENV{TERM} or "xterm");
|
||||||
system("$term -e 'echo -e \"Welcome to the Samba4 Test environment
|
system("$term -e 'echo -e \"Welcome to the Samba4 Test environment
|
||||||
@@ -533,6 +579,7 @@ TORTURE_OPTIONS=\$TORTURE_OPTIONS
|
|||||||
CONFIGURATION=\$CONFIGURATION
|
CONFIGURATION=\$CONFIGURATION
|
||||||
SERVER=\$SERVER
|
SERVER=\$SERVER
|
||||||
NETBIOSNAME=\$NETBIOSNAME\" && bash'");
|
NETBIOSNAME=\$NETBIOSNAME\" && bash'");
|
||||||
|
teardown_env("dc");
|
||||||
} else {
|
} else {
|
||||||
foreach (@todo) {
|
foreach (@todo) {
|
||||||
$i++;
|
$i++;
|
||||||
@@ -547,7 +594,7 @@ NETBIOSNAME=\$NETBIOSNAME\" && bash'");
|
|||||||
next;
|
next;
|
||||||
}
|
}
|
||||||
|
|
||||||
# $target->setup_env($envname, "$prefix/$envname", $socket_wrapper_dir);
|
setup_env($envname);
|
||||||
|
|
||||||
if ($from_build_farm) {
|
if ($from_build_farm) {
|
||||||
run_test_buildfarm($name, $cmd, $i, $suitestotal);
|
run_test_buildfarm($name, $cmd, $i, $suitestotal);
|
||||||
@@ -558,12 +605,16 @@ NETBIOSNAME=\$NETBIOSNAME\" && bash'");
|
|||||||
if (defined($opt_analyse_cmd)) {
|
if (defined($opt_analyse_cmd)) {
|
||||||
system("$opt_analyse_cmd \"$name\"");
|
system("$opt_analyse_cmd \"$name\"");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
teardown_env($envname) if ($opt_resetup_env);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
print "\n";
|
print "\n";
|
||||||
|
|
||||||
my $failed = $target->stop();
|
teardown_env($_) foreach (keys %running_envs);
|
||||||
|
|
||||||
|
$target->stop();
|
||||||
|
|
||||||
my $end = time();
|
my $end = time();
|
||||||
my $duration = ($end-$start);
|
my $duration = ($end-$start);
|
||||||
@@ -587,6 +638,8 @@ if ($numfailed == 0) {
|
|||||||
}
|
}
|
||||||
print "DURATION: $duration seconds\n";
|
print "DURATION: $duration seconds\n";
|
||||||
|
|
||||||
|
my $failed = 0;
|
||||||
|
|
||||||
# if there were any valgrind failures, show them
|
# if there were any valgrind failures, show them
|
||||||
foreach (<$prefix/valgrind.log*>) {
|
foreach (<$prefix/valgrind.log*>) {
|
||||||
next unless (-s $_);
|
next unless (-s $_);
|
||||||
|
@@ -1,31 +1,18 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
if [ $# -lt 4 ]; then
|
|
||||||
cat <<EOF
|
|
||||||
Usage: test_binding_string.sh SERVER USERNAME PASSWORD DOMAIN
|
|
||||||
EOF
|
|
||||||
exit 1;
|
|
||||||
fi
|
|
||||||
|
|
||||||
server="$1"
|
|
||||||
username="$2"
|
|
||||||
password="$3"
|
|
||||||
domain="$4"
|
|
||||||
shift 4
|
|
||||||
|
|
||||||
incdir=`dirname $0`
|
incdir=`dirname $0`
|
||||||
. $incdir/test_functions.sh
|
. $incdir/test_functions.sh
|
||||||
|
|
||||||
for I in "ncacn_np:$server" \
|
for I in "ncacn_np:\$SERVER" \
|
||||||
"ncacn_ip_tcp:$server" \
|
"ncacn_ip_tcp:\$SERVER" \
|
||||||
"ncacn_np:$server[rpcecho]" \
|
"ncacn_np:\$SERVER[rpcecho]" \
|
||||||
"ncacn_np:$server[/pipe/rpcecho]" \
|
"ncacn_np:\$SERVER[/pipe/rpcecho]" \
|
||||||
"ncacn_np:$server[/pipe/rpcecho,sign,seal]" \
|
"ncacn_np:\$SERVER[/pipe/rpcecho,sign,seal]" \
|
||||||
"ncacn_np:$server[,sign]" \
|
"ncacn_np:\$SERVER[,sign]" \
|
||||||
"ncacn_ip_tcp:$server[,sign]" \
|
"ncacn_ip_tcp:\$SERVER[,sign]" \
|
||||||
"ncalrpc:" \
|
"ncalrpc:" \
|
||||||
"308FB580-1EB2-11CA-923B-08002B1075A7@ncacn_np:$server" \
|
"308FB580-1EB2-11CA-923B-08002B1075A7@ncacn_np:\$SERVER" \
|
||||||
"308FB580-1EB2-11CA-923B-08002B1075A7@ncacn_ip_tcp:$server"
|
"308FB580-1EB2-11CA-923B-08002B1075A7@ncacn_ip_tcp:\$SERVER"
|
||||||
do
|
do
|
||||||
plantest "$I" rpc bin/smbtorture $TORTURE_OPTIONS "$I" -U"$username"%"$password" -W $domain --option=torture:quick=yes RPC-ECHO "$*"
|
plantest "$I" dc bin/smbtorture $TORTURE_OPTIONS "$I" -U"\$USERNAME"%"\$PASSWORD" -W "\$DOMAIN" --option=torture:quick=yes RPC-ECHO "$*"
|
||||||
done
|
done
|
||||||
|
@@ -2,23 +2,19 @@
|
|||||||
|
|
||||||
# this runs tests that interact directly with the command-line tools rather than using the API
|
# this runs tests that interact directly with the command-line tools rather than using the API
|
||||||
|
|
||||||
if [ $# -lt 5 ]; then
|
if [ $# -lt 1 ]; then
|
||||||
cat <<EOF
|
cat <<EOF
|
||||||
Usage: test_blackbox.sh SERVER USERNAME PASSWORD DOMAIN PREFIX [...]
|
Usage: test_blackbox.sh PREFIX [...]
|
||||||
EOF
|
EOF
|
||||||
exit 1;
|
exit 1;
|
||||||
fi
|
fi
|
||||||
|
|
||||||
SERVER=$1
|
PREFIX=$1
|
||||||
USERNAME=$2
|
shift 1
|
||||||
PASSWORD=$3
|
ADDARGS="$*"
|
||||||
DOMAIN=$4
|
|
||||||
PREFIX=$5
|
|
||||||
shift 5
|
|
||||||
ADDARGS="$@"
|
|
||||||
|
|
||||||
incdir=`dirname $0`
|
incdir=`dirname $0`
|
||||||
. $incdir/test_functions.sh
|
. $incdir/test_functions.sh
|
||||||
|
|
||||||
plantest "blackbox.smbclient" smb $incdir/../../../testprogs/blackbox/test_smbclient.sh "$SERVER" "$USERNAME" "$PASSWORD" "$DOMAIN" "$PREFIX" "$ADDARGS"
|
plantest "blackbox.smbclient" dc $incdir/../../../testprogs/blackbox/test_smbclient.sh "\$SERVER" "\$USERNAME" "\$PASSWORD" "\$DOMAIN" "$PREFIX" "$ADDARGS"
|
||||||
plantest "blackbox.cifsdd" smb $incdir/../../../testprogs/blackbox/test_cifsdd.sh "$SERVER" "$USERNAME" "$PASSWORD" "$DOMAIN" "$ADDARGS"
|
plantest "blackbox.cifsdd" dc $incdir/../../../testprogs/blackbox/test_cifsdd.sh "\$SERVER" "\$USERNAME" "\$PASSWORD" "\$DOMAIN" "$ADDARGS"
|
||||||
|
@@ -1,35 +1,16 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
if [ $# -lt 4 ]; then
|
|
||||||
cat <<EOF
|
|
||||||
Usage: test_echo.sh SERVER USERNAME PASSWORD DOMAIN
|
|
||||||
EOF
|
|
||||||
exit 1;
|
|
||||||
fi
|
|
||||||
|
|
||||||
server="$1"
|
|
||||||
username="$2"
|
|
||||||
password="$3"
|
|
||||||
domain="$4"
|
|
||||||
shift 4
|
|
||||||
|
|
||||||
incdir=`dirname $0`
|
incdir=`dirname $0`
|
||||||
. $incdir/test_functions.sh
|
. $incdir/test_functions.sh
|
||||||
|
|
||||||
transports="ncacn_np ncacn_ip_tcp"
|
transports="ncacn_np ncacn_ip_tcp ncalrpc"
|
||||||
if [ $server = "localhost" ]; then
|
|
||||||
transports="ncalrpc $transports"
|
|
||||||
fi
|
|
||||||
if [ $server = "localtest" ]; then
|
|
||||||
transports="ncalrpc $transports"
|
|
||||||
fi
|
|
||||||
|
|
||||||
for transport in $transports; do
|
for transport in $transports; do
|
||||||
for bindoptions in connect spnego spnego,sign spnego,seal $VALIDATE padcheck bigendian bigendian,seal; do
|
for bindoptions in connect spnego spnego,sign spnego,seal $VALIDATE padcheck bigendian bigendian,seal; do
|
||||||
for ntlmoptions in \
|
for ntlmoptions in \
|
||||||
"--option=socket:testnonblock=True --option=torture:quick=yes"; do
|
"--option=socket:testnonblock=True --option=torture:quick=yes"; do
|
||||||
name="RPC-ECHO on $transport with $bindoptions and $ntlmoptions"
|
name="RPC-ECHO on $transport with $bindoptions and $ntlmoptions"
|
||||||
plantest "$name" rpc bin/smbtorture $TORTURE_OPTIONS $transport:"$server[$bindoptions]" $ntlmoptions -U"$username"%"$password" -W $domain RPC-ECHO "$*"
|
plantest "$name" dc bin/smbtorture $TORTURE_OPTIONS $transport:"\$SERVER[$bindoptions]" $ntlmoptions -U"\$USERNAME"%"\$PASSWORD" -W "\$DOMAIN" RPC-ECHO "$*"
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
@@ -48,10 +29,10 @@ for transport in $transports; do
|
|||||||
"--option=clientntlmv2auth=yes --option=ntlmssp_client:128bit=no --option=ntlmssp_client:keyexchange=no --option=torture:quick=yes" \
|
"--option=clientntlmv2auth=yes --option=ntlmssp_client:128bit=no --option=ntlmssp_client:keyexchange=no --option=torture:quick=yes" \
|
||||||
; do
|
; do
|
||||||
name="RPC-ECHO on $transport with $bindoptions and $ntlmoptions"
|
name="RPC-ECHO on $transport with $bindoptions and $ntlmoptions"
|
||||||
plantest "$name" rpc bin/smbtorture $TORTURE_OPTIONS $transport:"$server[$bindoptions]" $ntlmoptions -U"$username"%"$password" -W $domain RPC-ECHO "$*"
|
plantest "$name" dc bin/smbtorture $TORTURE_OPTIONS $transport:"\$SERVER[$bindoptions]" $ntlmoptions -U"\$USERNAME"%"\$PASSWORD" -W \$DOMAIN RPC-ECHO "$*"
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
|
|
||||||
name="RPC-ECHO on ncacn_np over smb2"
|
name="RPC-ECHO on ncacn_np over smb2"
|
||||||
plantest "$name" rpc bin/smbtorture $TORTURE_OPTIONS ncacn_np:"$server[smb2]" -U"$username"%"$password" -W $domain RPC-ECHO "$*"
|
plantest "$name" dc bin/smbtorture $TORTURE_OPTIONS ncacn_np:"\$SERVER[smb2]" -U"\$USERNAME"%"\$PASSWORD" -W \$DOMAIN RPC-ECHO "$*"
|
||||||
|
@@ -1,17 +1,6 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# test some simple EJS operations
|
# test some simple EJS operations
|
||||||
|
|
||||||
if [ $# -lt 3 ]; then
|
|
||||||
cat <<EOF
|
|
||||||
Usage: test_ejs.sh DOMAIN USERNAME PASSWORD [OPTIONS]
|
|
||||||
EOF
|
|
||||||
exit 1;
|
|
||||||
fi
|
|
||||||
|
|
||||||
DOMAIN="$1"
|
|
||||||
USERNAME="$2"
|
|
||||||
PASSWORD="$3"
|
|
||||||
shift 3
|
|
||||||
CONFIGURATION="$*"
|
CONFIGURATION="$*"
|
||||||
|
|
||||||
incdir=`dirname $0`
|
incdir=`dirname $0`
|
||||||
@@ -23,10 +12,10 @@ DATADIR=../testdata
|
|||||||
PATH=bin:$PATH
|
PATH=bin:$PATH
|
||||||
export PATH
|
export PATH
|
||||||
|
|
||||||
plantest "base.js" rpc "$SCRIPTDIR/base.js" $CONFIGURATION
|
plantest "base.js" dc "$SCRIPTDIR/base.js" $CONFIGURATION
|
||||||
plantest "samr.js" rpc "$SCRIPTDIR/samr.js" $CONFIGURATION ncalrpc: -U$USERNAME%$PASSWORD
|
plantest "samr.js" dc "$SCRIPTDIR/samr.js" $CONFIGURATION ncalrpc: -U\$USERNAME%\$PASSWORD
|
||||||
plantest "echo.js" rpc "$SCRIPTDIR/echo.js" $CONFIGURATION ncalrpc: -U$USERNAME%$PASSWORD
|
plantest "echo.js" dc "$SCRIPTDIR/echo.js" $CONFIGURATION ncalrpc: -U\$USERNAME%\$PASSWORD
|
||||||
plantest "ejsnet.js" rpc "$SCRIPTDIR/ejsnet.js" $CONFIGURATION -U$USERNAME%$PASSWORD $DOMAIN ejstestuser
|
plantest "ejsnet.js" dc "$SCRIPTDIR/ejsnet.js" $CONFIGURATION -U\$USERNAME%\$PASSWORD \$DOMAIN ejstestuser
|
||||||
plantest "ldb.js" none "$SCRIPTDIR/ldb.js" `pwd` $CONFIGURATION
|
plantest "ldb.js" none "$SCRIPTDIR/ldb.js" `pwd` $CONFIGURATION
|
||||||
plantest "samba3sam.js" none $SCRIPTDIR/samba3sam.js $CONFIGURATION `pwd` $DATADIR/samba3/
|
plantest "samba3sam.js" none $SCRIPTDIR/samba3sam.js $CONFIGURATION `pwd` $DATADIR/samba3/
|
||||||
plantest "winreg" rpc scripting/bin/winreg $CONFIGURATION ncalrpc: 'HKLM' -U$USERNAME%$PASSWORD
|
plantest "winreg" dc scripting/bin/winreg $CONFIGURATION ncalrpc: 'HKLM' -U\$USERNAME%\$PASSWORD
|
||||||
|
@@ -1,34 +1,23 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# test some simple LDAP and CLDAP operations
|
# test some simple LDAP and CLDAP operations
|
||||||
|
|
||||||
if [ $# -lt 3 ]; then
|
|
||||||
cat <<EOF
|
|
||||||
Usage: test_ldap.sh SERVER USERNAME PASSWORD
|
|
||||||
EOF
|
|
||||||
exit 1;
|
|
||||||
fi
|
|
||||||
|
|
||||||
SERVER="$1"
|
|
||||||
USERNAME="$2"
|
|
||||||
PASSWORD="$3"
|
|
||||||
|
|
||||||
incdir=`dirname $0`
|
incdir=`dirname $0`
|
||||||
. $incdir/test_functions.sh
|
. $incdir/test_functions.sh
|
||||||
|
|
||||||
p=ldap
|
p=ldap
|
||||||
for options in "" "--option=socket:testnonblock=true" "-U$USERNAME%$PASSWORD --option=socket:testnonblock=true" "-U$USERNAME%$PASSWORD"; do
|
for options in "" "--option=socket:testnonblock=true" "-U\$USERNAME%\$PASSWORD --option=socket:testnonblock=true" "-U\$USERNAME%\$PASSWORD"; do
|
||||||
plantest "TESTING PROTOCOL $p with options $options" ldap ../testprogs/blackbox/test_ldb.sh $p $SERVER $options
|
plantest "TESTING PROTOCOL $p with options $options" dc ../testprogs/blackbox/test_ldb.sh $p \$SERVER $options
|
||||||
done
|
done
|
||||||
# see if we support ldaps
|
# see if we support ldaps
|
||||||
if grep ENABLE_GNUTLS.1 include/config.h > /dev/null; then
|
if grep ENABLE_GNUTLS.1 include/config.h > /dev/null; then
|
||||||
p=ldaps
|
p=ldaps
|
||||||
for options in "" "-U$USERNAME%$PASSWORD"; do
|
for options in "" "-U\$USERNAME%\$PASSWORD"; do
|
||||||
plantest "TESTING PROTOCOL $p with options $options" ldap ../testprogs/blackbox/test_ldb.sh $p $SERVER $options
|
plantest "TESTING PROTOCOL $p with options $options" dc ../testprogs/blackbox/test_ldb.sh $p \$SERVER $options
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
for t in LDAP-CLDAP LDAP-BASIC LDAP-SCHEMA LDAP-UPTODATENESS
|
for t in LDAP-CLDAP LDAP-BASIC LDAP-SCHEMA LDAP-UPTODATENESS
|
||||||
do
|
do
|
||||||
plantest "$t" ldap bin/smbtorture $TORTURE_OPTIONS "-U$USERNAME%$PASSWORD" //$SERVER/_none_ $t
|
plantest "$t" dc bin/smbtorture $TORTURE_OPTIONS "-U\$USERNAME%\$PASSWORD" //\$SERVER/_none_ $t
|
||||||
done
|
done
|
||||||
|
|
||||||
# only do the ldb tests when not in quick mode - they are quite slow, and ldb
|
# only do the ldb tests when not in quick mode - they are quite slow, and ldb
|
||||||
@@ -36,9 +25,9 @@ done
|
|||||||
test "$TORTURE_QUICK" = "yes" || {
|
test "$TORTURE_QUICK" = "yes" || {
|
||||||
LDBDIR=lib/ldb
|
LDBDIR=lib/ldb
|
||||||
export LDBDIR
|
export LDBDIR
|
||||||
plantest "ldb" ldap $LDBDIR/tests/test-tdb.sh
|
plantest "ldb" dc $LDBDIR/tests/test-tdb.sh
|
||||||
}
|
}
|
||||||
|
|
||||||
SCRIPTDIR=../testprogs/ejs
|
SCRIPTDIR=../testprogs/ejs
|
||||||
|
|
||||||
plantest "ejs ldap" ldap $SCRIPTDIR/ldap.js $CONFIGURATION $SERVER -U$USERNAME%$PASSWORD
|
plantest "ejs ldap" dc $SCRIPTDIR/ldap.js $CONFIGURATION \$SERVER -U\$USERNAME%\$PASSWORD
|
||||||
|
@@ -8,13 +8,6 @@ if [ `uname` = "Linux" ]; then
|
|||||||
local_tests="$local_tests LOCAL-ICONV"
|
local_tests="$local_tests LOCAL-ICONV"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ $# -lt 0 ]; then
|
|
||||||
cat <<EOF
|
|
||||||
Usage: test_local.sh
|
|
||||||
EOF
|
|
||||||
exit 1;
|
|
||||||
fi
|
|
||||||
|
|
||||||
incdir=`dirname $0`
|
incdir=`dirname $0`
|
||||||
. $incdir/test_functions.sh
|
. $incdir/test_functions.sh
|
||||||
|
|
||||||
|
@@ -1,17 +1,6 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# test some NBT/WINS operations
|
# test some NBT/WINS operations
|
||||||
|
|
||||||
if [ $# -lt 1 ]; then
|
|
||||||
cat <<EOF
|
|
||||||
Usage: test_nbt.sh SERVER
|
|
||||||
EOF
|
|
||||||
exit 1;
|
|
||||||
fi
|
|
||||||
|
|
||||||
SERVER="$1"
|
|
||||||
USERNAME="$2"
|
|
||||||
PASSWORD="$3"
|
|
||||||
|
|
||||||
incdir=`dirname $0`
|
incdir=`dirname $0`
|
||||||
. $incdir/test_functions.sh
|
. $incdir/test_functions.sh
|
||||||
|
|
||||||
@@ -20,11 +9,11 @@ SCRIPTDIR=../testprogs/ejs
|
|||||||
PATH=bin:$PATH
|
PATH=bin:$PATH
|
||||||
export PATH
|
export PATH
|
||||||
|
|
||||||
plantest "nmblookup -U $SERVER $SERVER" netbios bin/nmblookup $TORTURE_OPTIONS -U $SERVER $SERVER
|
plantest "nmblookup -U \$SERVER \$SERVER" dc bin/nmblookup $TORTURE_OPTIONS -U \$SERVER \$SERVER
|
||||||
plantest "nmblookup $SERVER" netbios bin/nmblookup $TORTURE_OPTIONS $SERVER
|
plantest "nmblookup \$SERVER" dc bin/nmblookup $TORTURE_OPTIONS \$SERVER
|
||||||
|
|
||||||
NBT_TESTS=`bin/smbtorture --list | grep ^NBT`
|
NBT_TESTS=`bin/smbtorture --list | grep ^NBT`
|
||||||
|
|
||||||
for f in $NBT_TESTS; do
|
for f in $NBT_TESTS; do
|
||||||
plantest "$f" netbios bin/smbtorture $TORTURE_OPTIONS //$SERVER/_none_ $f -U$USERNAME%$PASSWORD
|
plantest "$f" dc bin/smbtorture $TORTURE_OPTIONS //\$SERVER/_none_ $f -U\$USERNAME%\$PASSWORD
|
||||||
done
|
done
|
||||||
|
@@ -6,19 +6,6 @@ ncacn_np_tests="NET-API-LOOKUP NET-API-LOOKUPHOST NET-API-LOOKUPPDC NET-API-RPCC
|
|||||||
ncalrpc_tests="NET-API-RPCCONN-SRV NET-API-RPCCONN-DC NET-API-RPCCONN-DCINFO NET-API-LISTSHARES NET-API-CREATEUSER NET-API-DELETEUSER NET-USERINFO NET-USERADD NET-USERDEL NET-USERMOD NET-API-LOOKUPNAME NET-API-USERINFO NET-API-USERLIST NET-API-DOMOPENLSA NET-API-DOMCLOSELSA NET-API-DOMOPENSAMR NET-API-DOMCLOSESAMR"
|
ncalrpc_tests="NET-API-RPCCONN-SRV NET-API-RPCCONN-DC NET-API-RPCCONN-DCINFO NET-API-LISTSHARES NET-API-CREATEUSER NET-API-DELETEUSER NET-USERINFO NET-USERADD NET-USERDEL NET-USERMOD NET-API-LOOKUPNAME NET-API-USERINFO NET-API-USERLIST NET-API-DOMOPENLSA NET-API-DOMCLOSELSA NET-API-DOMOPENSAMR NET-API-DOMCLOSESAMR"
|
||||||
ncacn_ip_tcp_tests="NET-API-LOOKUP NET-API-LOOKUPHOST NET-API-LOOKUPPDC NET-API-RPCCONN-SRV NET-API-RPCCONN-DC NET-API-RPCCONN-DCINFO NET-API-LISTSHARES NET-API-CREATEUSER NET-API-DELETEUSER NET-API-MODIFYUSER"
|
ncacn_ip_tcp_tests="NET-API-LOOKUP NET-API-LOOKUPHOST NET-API-LOOKUPPDC NET-API-RPCCONN-SRV NET-API-RPCCONN-DC NET-API-RPCCONN-DCINFO NET-API-LISTSHARES NET-API-CREATEUSER NET-API-DELETEUSER NET-API-MODIFYUSER"
|
||||||
|
|
||||||
if [ $# -lt 4 ]; then
|
|
||||||
cat <<EOF
|
|
||||||
Usage: test_net.sh SERVER USERNAME PASSWORD DOMAIN
|
|
||||||
EOF
|
|
||||||
exit 1;
|
|
||||||
fi
|
|
||||||
|
|
||||||
server="$1"
|
|
||||||
username="$2"
|
|
||||||
password="$3"
|
|
||||||
domain="$4"
|
|
||||||
shift 4
|
|
||||||
|
|
||||||
incdir=`dirname $0`
|
incdir=`dirname $0`
|
||||||
. $incdir/test_functions.sh
|
. $incdir/test_functions.sh
|
||||||
|
|
||||||
@@ -31,7 +18,7 @@ for bindoptions in seal,padcheck $VALIDATE bigendian; do
|
|||||||
esac
|
esac
|
||||||
for t in $tests; do
|
for t in $tests; do
|
||||||
name="$t on $transport with $bindoptions"
|
name="$t on $transport with $bindoptions"
|
||||||
plantest "$name" rpc $VALGRIND bin/smbtorture $TORTURE_OPTIONS $transport:"$server[$bindoptions]" -U"$username"%"$password" -W $domain $t "$*"
|
plantest "$name" dc $VALGRIND bin/smbtorture $TORTURE_OPTIONS $transport:"\$SERVER[$bindoptions]" -U"\$USERNAME"%"\$PASSWORD" -W "\$DOMAIN" $t "$*"
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
|
@@ -3,18 +3,6 @@
|
|||||||
# this runs the file serving tests that are expected to pass with the
|
# this runs the file serving tests that are expected to pass with the
|
||||||
# current posix ntvfs backend
|
# current posix ntvfs backend
|
||||||
|
|
||||||
if [ $# -lt 3 ]; then
|
|
||||||
cat <<EOF
|
|
||||||
Usage: test_posix.sh UNC USERNAME PASSWORD <first> <smbtorture args>
|
|
||||||
EOF
|
|
||||||
exit 1;
|
|
||||||
fi
|
|
||||||
|
|
||||||
unc="$1"
|
|
||||||
username="$2"
|
|
||||||
password="$3"
|
|
||||||
start="$4"
|
|
||||||
shift 4
|
|
||||||
ADDARGS="$*"
|
ADDARGS="$*"
|
||||||
|
|
||||||
incdir=`dirname $0`
|
incdir=`dirname $0`
|
||||||
@@ -30,5 +18,5 @@ for t in $tests; do
|
|||||||
continue;
|
continue;
|
||||||
fi
|
fi
|
||||||
start=""
|
start=""
|
||||||
plantest "$t" smb $VALGRIND bin/smbtorture $TORTURE_OPTIONS $ADDARGS $unc -U"$username"%"$password" $t
|
plantest "$t" dc $VALGRIND bin/smbtorture $TORTURE_OPTIONS $ADDARGS //\$SERVER/tmp -U"\$USERNAME"%"\$PASSWORD" $t
|
||||||
done
|
done
|
||||||
|
@@ -1,18 +1,6 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# run a quick set of filesystem tests
|
# run a quick set of filesystem tests
|
||||||
|
|
||||||
if [ $# -lt 3 ]; then
|
|
||||||
cat <<EOF
|
|
||||||
Usage: test_quick.sh UNC USERNAME PASSWORD <first> <smbtorture args>
|
|
||||||
EOF
|
|
||||||
exit 1;
|
|
||||||
fi
|
|
||||||
|
|
||||||
unc="$1"
|
|
||||||
username="$2"
|
|
||||||
password="$3"
|
|
||||||
start="$4"
|
|
||||||
shift 4
|
|
||||||
ADDARGS="$*"
|
ADDARGS="$*"
|
||||||
|
|
||||||
incdir=`dirname $0`
|
incdir=`dirname $0`
|
||||||
@@ -26,10 +14,6 @@ tests="$tests RAW-UNLINK RAW-READ RAW-CLOSE RAW-IOCTL RAW-RENAME"
|
|||||||
tests="$tests RAW-EAS RAW-STREAMS"
|
tests="$tests RAW-EAS RAW-STREAMS"
|
||||||
|
|
||||||
for t in $tests; do
|
for t in $tests; do
|
||||||
if [ ! -z "$start" -a "$start" != $t ]; then
|
|
||||||
continue;
|
|
||||||
fi
|
|
||||||
start=""
|
|
||||||
name="$t"
|
name="$t"
|
||||||
plantest "$name" base $VALGRIND bin/smbtorture $TORTURE_OPTIONS $ADDARGS $unc -U"$username"%"$password" $t
|
plantest "$name" base $VALGRIND bin/smbtorture $TORTURE_OPTIONS $ADDARGS //\$SERVER/cifs -U"\$USERNAME"%"\$PASSWORD" $t
|
||||||
done
|
done
|
||||||
|
@@ -9,19 +9,6 @@ slow_ncacn_np_tests="RPC-SAMLOGON RPC-SAMR RPC-SAMR-USERS RPC-SAMR-PASSWORDS RPC
|
|||||||
slow_ncalrpc_tests="RPC-SAMR RPC-SAMR-USERS RPC-SAMR-PASSWORDS RPC-COUNTCALLS RPC-CRACKNAMES"
|
slow_ncalrpc_tests="RPC-SAMR RPC-SAMR-USERS RPC-SAMR-PASSWORDS RPC-COUNTCALLS RPC-CRACKNAMES"
|
||||||
slow_ncacn_ip_tcp_tests="RPC-SAMR RPC-SAMR-USERS RPC-SAMR-PASSWORDS RPC-COUNTCALLS RPC-CRACKNAMES"
|
slow_ncacn_ip_tcp_tests="RPC-SAMR RPC-SAMR-USERS RPC-SAMR-PASSWORDS RPC-COUNTCALLS RPC-CRACKNAMES"
|
||||||
|
|
||||||
if [ $# -lt 4 ]; then
|
|
||||||
cat <<EOF
|
|
||||||
Usage: test_rpc.sh SERVER USERNAME PASSWORD DOMAIN
|
|
||||||
EOF
|
|
||||||
exit 1;
|
|
||||||
fi
|
|
||||||
|
|
||||||
server="$1"
|
|
||||||
username="$2"
|
|
||||||
password="$3"
|
|
||||||
domain="$4"
|
|
||||||
shift 4
|
|
||||||
|
|
||||||
incdir=`dirname $0`
|
incdir=`dirname $0`
|
||||||
. $incdir/test_functions.sh
|
. $incdir/test_functions.sh
|
||||||
|
|
||||||
@@ -34,7 +21,7 @@ for bindoptions in seal,padcheck $VALIDATE bigendian; do
|
|||||||
esac
|
esac
|
||||||
for t in $tests; do
|
for t in $tests; do
|
||||||
name="$t on $transport with $bindoptions"
|
name="$t on $transport with $bindoptions"
|
||||||
plantest "$name" rpc $VALGRIND bin/smbtorture $TORTURE_OPTIONS $transport:"$server[$bindoptions]" -U"$username"%"$password" -W $domain $t "$*"
|
plantest "$name" dc $VALGRIND bin/smbtorture $TORTURE_OPTIONS $transport:"\$SERVER[$bindoptions]" -U"\$USERNAME"%"\$PASSWORD" -W \$DOMAIN $t "$*"
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
@@ -48,7 +35,7 @@ for bindoptions in connect $VALIDATE ; do
|
|||||||
esac
|
esac
|
||||||
for t in $tests; do
|
for t in $tests; do
|
||||||
name="$t on $transport with $bindoptions"
|
name="$t on $transport with $bindoptions"
|
||||||
plantest "$name" rpc $VALGRIND bin/smbtorture $TORTURE_OPTIONS $transport:"$server[$bindoptions]" -U"$username"%"$password" -W $domain $t "$*"
|
plantest "$name" dc $VALGRIND bin/smbtorture $TORTURE_OPTIONS $transport:"\$SERVER[$bindoptions]" -U"\$USERNAME"%"\$PASSWORD" -W \$DOMAIN $t "$*"
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
|
@@ -6,19 +6,6 @@ ncacn_np_tests="RPC-ALTERCONTEXT RPC-JOIN RPC-ECHO RPC-SCHANNEL RPC-NETLOGON RPC
|
|||||||
ncacn_ip_tcp_tests="RPC-ALTERCONTEXT RPC-JOIN RPC-ECHO RPC-HANDLES"
|
ncacn_ip_tcp_tests="RPC-ALTERCONTEXT RPC-JOIN RPC-ECHO RPC-HANDLES"
|
||||||
ncalrpc_tests="RPC-ECHO"
|
ncalrpc_tests="RPC-ECHO"
|
||||||
|
|
||||||
if [ $# -lt 4 ]; then
|
|
||||||
cat <<EOF
|
|
||||||
Usage: test_rpc_quick.sh SERVER USERNAME PASSWORD DOMAIN
|
|
||||||
EOF
|
|
||||||
exit 1;
|
|
||||||
fi
|
|
||||||
|
|
||||||
server="$1"
|
|
||||||
username="$2"
|
|
||||||
password="$3"
|
|
||||||
domain="$4"
|
|
||||||
shift 4
|
|
||||||
|
|
||||||
incdir=`dirname $0`
|
incdir=`dirname $0`
|
||||||
. $incdir/test_functions.sh
|
. $incdir/test_functions.sh
|
||||||
|
|
||||||
@@ -31,7 +18,7 @@ for bindoptions in seal,padcheck $VALIDATE bigendian; do
|
|||||||
esac
|
esac
|
||||||
for t in $tests; do
|
for t in $tests; do
|
||||||
name="$t on $transport with $bindoptions"
|
name="$t on $transport with $bindoptions"
|
||||||
plantest "$name" rpc $VALGRIND bin/smbtorture $TORTURE_OPTIONS $transport:"$server[$bindoptions]" -U"$username"%"$password" -W $domain $t "$*"
|
plantest "$name" rpc $VALGRIND bin/smbtorture $TORTURE_OPTIONS $transport:"\$SERVER[$bindoptions]" -U"\$USERNAME"%"\$PASSWORD" -W \$DOMAIN $t "$*"
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
|
@@ -1,19 +1,5 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
if [ $# -lt 4 ]; then
|
|
||||||
cat <<EOF
|
|
||||||
Usage: test_session_key.sh SERVER USERNAME PASSWORD DOMAIN NETBIOSNAME
|
|
||||||
EOF
|
|
||||||
exit 1;
|
|
||||||
fi
|
|
||||||
|
|
||||||
server="$1"
|
|
||||||
username="$2"
|
|
||||||
password="$3"
|
|
||||||
domain="$4"
|
|
||||||
netbios_name="$5"
|
|
||||||
shift 5
|
|
||||||
|
|
||||||
incdir=`dirname $0`
|
incdir=`dirname $0`
|
||||||
. $incdir/test_functions.sh
|
. $incdir/test_functions.sh
|
||||||
|
|
||||||
@@ -36,17 +22,17 @@ for bindoptions in bigendian seal; do
|
|||||||
"-k no --option=gensec:spnego=no --option=clientntlmv2auth=yes" \
|
"-k no --option=gensec:spnego=no --option=clientntlmv2auth=yes" \
|
||||||
"-k no --option=usespnego=no"; do
|
"-k no --option=usespnego=no"; do
|
||||||
name="RPC-SECRETS on $transport with $bindoptions with NTLM2:$ntlm2 KEYEX:$keyexchange LM_KEY:$lm_key $ntlmoptions"
|
name="RPC-SECRETS on $transport with $bindoptions with NTLM2:$ntlm2 KEYEX:$keyexchange LM_KEY:$lm_key $ntlmoptions"
|
||||||
plantest "$name" rpc bin/smbtorture $TORTURE_OPTIONS $transport:"$server[$bindoptions]" --option=ntlmssp_client:keyexchange=$keyexchange --option=ntlmssp_client:ntlm2=$ntlm2 --option=ntlmssp_client:lm_key=$lm_key $ntlmoptions -U"$username"%"$password" -W $domain --option=gensec:target_hostname=$netbios_name RPC-SECRETS "$*"
|
plantest "$name" dc bin/smbtorture $TORTURE_OPTIONS $transport:"\$SERVER[$bindoptions]" --option=ntlmssp_client:keyexchange=$keyexchange --option=ntlmssp_client:ntlm2=$ntlm2 --option=ntlmssp_client:lm_key=$lm_key $ntlmoptions -U"\$USERNAME"%"\$PASSWORD" -W \$DOMAIN --option=gensec:target_hostname=\$NETBIOSNAME RPC-SECRETS "$*"
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
name="RPC-SECRETS on $transport with $bindoptions with Kerberos"
|
name="RPC-SECRETS on $transport with $bindoptions with Kerberos"
|
||||||
plantest "$name" rpc bin/smbtorture $TORTURE_OPTIONS $transport:"$server[$bindoptions]" -k yes -U"$username"%"$password" -W $domain "--option=gensec:target_hostname=$netbios_name" RPC-SECRETS "$*"
|
plantest "$name" dc bin/smbtorture $TORTURE_OPTIONS $transport:"\$SERVER[$bindoptions]" -k yes -U"\$USERNAME"%"\$PASSWORD" -W \$DOMAIN "--option=gensec:target_hostname=\$NETBIOSNAME" RPC-SECRETS "$*"
|
||||||
name="RPC-SECRETS on $transport with $bindoptions with Kerberos - use target principal"
|
name="RPC-SECRETS on $transport with $bindoptions with Kerberos - use target principal"
|
||||||
plantest "$name" rpc bin/smbtorture $TORTURE_OPTIONS $transport:"$server[$bindoptions]" -k yes -U"$username"%"$password" -W $domain "--option=clientusespnegoprincipal=yes" "--option=gensec:target_hostname=$netbios_name" RPC-SECRETS "$*"
|
plantest "$name" dc bin/smbtorture $TORTURE_OPTIONS $transport:"\$SERVER[$bindoptions]" -k yes -U"\$USERNAME"%"\$PASSWORD" -W \$DOMAIN "--option=clientusespnegoprincipal=yes" "--option=gensec:target_hostname=\$NETBIOSNAME" RPC-SECRETS "$*"
|
||||||
done
|
done
|
||||||
name="RPC-SECRETS on $transport with Kerberos - use Samba3 style login"
|
name="RPC-SECRETS on $transport with Kerberos - use Samba3 style login"
|
||||||
plantest "$name" rpc bin/smbtorture $TORTURE_OPTIONS $transport:"$server" -k yes -U"$username"%"$password" -W $domain "--option=gensec:fake_gssapi_krb5=yes" "--option=gensec:gssapi_krb5=no" "--option=gensec:target_hostname=$netbios_name" RPC-SECRETS "$*"
|
plantest "$name" dc bin/smbtorture $TORTURE_OPTIONS $transport:"\$SERVER" -k yes -U"\$USERNAME"%"\$PASSWORD" -W "\$DOMAIN" "--option=gensec:fake_gssapi_krb5=yes" "--option=gensec:gssapi_krb5=no" "--option=gensec:target_hostname=\$NETBIOSNAME" RPC-SECRETS "$*"
|
||||||
name="RPC-SECRETS on $transport with Kerberos - use Samba3 style login, use target principal"
|
name="RPC-SECRETS on $transport with Kerberos - use Samba3 style login, use target principal"
|
||||||
plantest "$name" rpc bin/smbtorture $TORTURE_OPTIONS $transport:"$server" -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=$netbios_name" RPC-SECRETS "$*"
|
plantest "$name" dc bin/smbtorture $TORTURE_OPTIONS $transport:"\$SERVER" -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-SECRETS "$*"
|
||||||
|
@@ -1,18 +1,6 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# run a quick set of filesystem tests
|
# run a quick set of filesystem tests
|
||||||
|
|
||||||
if [ $# -lt 3 ]; then
|
|
||||||
cat <<EOF
|
|
||||||
Usage: test_simple.sh UNC USERNAME PASSWORD <first> <smbtorture args>
|
|
||||||
EOF
|
|
||||||
exit 1;
|
|
||||||
fi
|
|
||||||
|
|
||||||
unc="$1"
|
|
||||||
username="$2"
|
|
||||||
password="$3"
|
|
||||||
start="$4"
|
|
||||||
shift 4
|
|
||||||
ADDARGS="$*"
|
ADDARGS="$*"
|
||||||
|
|
||||||
incdir=`dirname $0`
|
incdir=`dirname $0`
|
||||||
@@ -21,10 +9,6 @@ incdir=`dirname $0`
|
|||||||
tests="BASE-RW1"
|
tests="BASE-RW1"
|
||||||
|
|
||||||
for t in $tests; do
|
for t in $tests; do
|
||||||
if [ ! -z "$start" -a "$start" != $t ]; then
|
|
||||||
continue;
|
|
||||||
fi
|
|
||||||
start=""
|
|
||||||
name="$t"
|
name="$t"
|
||||||
plantest "$name" smb $VALGRIND bin/smbtorture $TORTURE_OPTIONS $ADDARGS $unc -U"$username"%"$password" $t
|
plantest "$name" dc $VALGRIND bin/smbtorture $TORTURE_OPTIONS $ADDARGS //\$SERVER/simple -U"\$USERNAME"%"\$PASSWORD" $t
|
||||||
done
|
done
|
||||||
|
@@ -1,15 +1,15 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
$SRCDIR/script/tests/test_ejs.sh $DOMAIN $USERNAME $PASSWORD $CONFIGURATION
|
$SRCDIR/script/tests/test_ejs.sh $CONFIGURATION
|
||||||
$SRCDIR/script/tests/test_ldap.sh $SERVER $USERNAME $PASSWORD
|
$SRCDIR/script/tests/test_ldap.sh
|
||||||
$SRCDIR/script/tests/test_nbt.sh $SERVER $USERNAME $PASSWORD
|
$SRCDIR/script/tests/test_nbt.sh
|
||||||
$SRCDIR/script/tests/test_rpc.sh $SERVER $USERNAME $PASSWORD $DOMAIN
|
$SRCDIR/script/tests/test_rpc.sh
|
||||||
$SRCDIR/script/tests/test_net.sh $SERVER $USERNAME $PASSWORD $DOMAIN
|
$SRCDIR/script/tests/test_net.sh
|
||||||
$SRCDIR/script/tests/test_session_key.sh $SERVER $USERNAME $PASSWORD $DOMAIN $NETBIOSNAME
|
$SRCDIR/script/tests/test_session_key.sh
|
||||||
$SRCDIR/script/tests/test_binding_string.sh $SERVER $USERNAME $PASSWORD $DOMAIN
|
$SRCDIR/script/tests/test_binding_string.sh
|
||||||
$SRCDIR/script/tests/test_echo.sh $SERVER $USERNAME $PASSWORD $DOMAIN
|
$SRCDIR/script/tests/test_echo.sh
|
||||||
$SRCDIR/script/tests/test_posix.sh //$SERVER/tmp $USERNAME $PASSWORD ""
|
$SRCDIR/script/tests/test_posix.sh
|
||||||
$SRCDIR/script/tests/test_local.sh
|
$SRCDIR/script/tests/test_local.sh
|
||||||
$SRCDIR/script/tests/test_pidl.sh
|
$SRCDIR/script/tests/test_pidl.sh
|
||||||
$SRCDIR/script/tests/test_blackbox.sh $SERVER $USERNAME $PASSWORD $DOMAIN $PREFIX
|
$SRCDIR/script/tests/test_blackbox.sh $PREFIX/blackbox
|
||||||
$SRCDIR/script/tests/test_simple.sh //$SERVER/simple $USERNAME $PASSWORD ""
|
$SRCDIR/script/tests/test_simple.sh
|
||||||
$SRCDIR/script/tests/test_s3upgrade.sh $PREFIX/upgrade
|
$SRCDIR/script/tests/test_s3upgrade.sh $PREFIX/upgrade
|
||||||
|
@@ -2,8 +2,8 @@
|
|||||||
TORTURE_QUICK="yes"
|
TORTURE_QUICK="yes"
|
||||||
export TORTURE_QUICK
|
export TORTURE_QUICK
|
||||||
|
|
||||||
$SRCDIR/script/tests/test_ejs.sh $DOMAIN $USERNAME $PASSWORD $CONFIGURATION
|
$SRCDIR/script/tests/test_ejs.sh $CONFIGURATION
|
||||||
$SRCDIR/script/tests/test_ldap.sh $SERVER $USERNAME $PASSWORD
|
$SRCDIR/script/tests/test_ldap.sh
|
||||||
$SRCDIR/script/tests/test_nbt.sh $SERVER $USERNAME $PASSWORD
|
$SRCDIR/script/tests/test_nbt.sh
|
||||||
$SRCDIR/script/tests/test_quick.sh //$SERVER/cifs $USERNAME $PASSWORD ""
|
$SRCDIR/script/tests/test_quick.sh
|
||||||
$SRCDIR/script/tests/test_rpc_quick.sh $SERVER $USERNAME $PASSWORD $DOMAIN
|
$SRCDIR/script/tests/test_rpc_quick.sh
|
||||||
|
Reference in New Issue
Block a user