@preargs = split(/ /,$ENV{SAMBA_VALGRIND});
}
+ if (defined($process_model)) {
+ push @optargs, ("-M", $process_model);
+ }
close($env_vars->{STDIN_PIPE});
open STDIN, ">&", $STDIN_READER or die "can't dup STDIN_READER to STDIN: $!";
- exec(@preargs, Samba::bindir_path($self, "samba"), "-M", $process_model, "-i", "--no-process-group", "--maximum-runtime=$self->{server_maxtime}", $env_vars->{CONFIGURATION}, @optargs) or die("Unable to start samba: $!");
+ exec(@preargs, Samba::bindir_path($self, "samba"), "-i", "--no-process-group", "--maximum-runtime=$self->{server_maxtime}", $env_vars->{CONFIGURATION}, @optargs) or die("Unable to start samba: $!");
}
$env_vars->{SAMBA_PID} = $pid;
print "DONE ($pid)\n";
} else {
push (@preargs, $ENV{PYTHON});
}
- $ENV{MAKE_TEST_BINARY} = Samba::bindir_path($self, "python/samba/tests/dns_forwarder_helpers/dns_hub.py");
+ $ENV{MAKE_TEST_BINARY} = "$self->{srcdir}/selftest/target/dns_hub.py";
push (@args, "$self->{server_maxtime}");
push (@args, "$env->{ipv4}");
close($env->{STDIN_PIPE});
dreplsrv:periodic_startup_interval = 0
dsdb:schema update allowed = yes
- prefork children = 4
-
vfs objects = dfs_samba4 acl_xattr fake_acls xattr_tdb streams_depot
idmap_ldb:use rfc2307=yes
# (and also removes the default AD complexity checks)
my $unacceptable_password = "widk3Dsle32jxdBdskldsk55klASKQ";
my $extra_smb_conf = "
- check password script = sed -e '/$unacceptable_password/{;q1}; /$unacceptable_password/!{q0}'
+ check password script = $self->{srcdir}/selftest/checkpassword_arg1.sh ${unacceptable_password}
allow dcerpc auth level connect:lsarpc = yes
dcesrv:max auth states = 8
";
my ($self, $envvars) = @_;
my $pid;
+ # This should cause samba to terminate gracefully
+ my $smbcontrol = Samba::bindir_path($self, "smbcontrol");
+ my $cmd = "";
+ $cmd .= "$smbcontrol samba shutdown $envvars->{CONFIGURATION}";
+ my $ret = system($cmd);
+ if ($ret != 0) {
+ warn "'$cmd' failed with '$ret'\n";
+ }
+
# This should cause samba to terminate gracefully
close($envvars->{STDIN_PIPE});
# Declare the environments Samba4 makes available.
# To be set up, they will be called as
# samba4->setup_$envname($self, $path, $dep_1_vars, $dep_2_vars, ...)
+# The interdependencies between the testenvs are declared below. Some testenvs
+# are dependent on another testenv running first, e.g. vampire_dc is dependent
+# on ad_dc_ntvfs because vampire_dc joins ad_dc_ntvfs's domain. All DCs are
+# dependent on dns_hub, which handles resolving DNS queries for the realm.
%Samba4::ENV_DEPS = (
# name => [dep_1, dep_2, ...],
dns_hub => [],
ad_dc => ["dns_hub"],
ad_dc_no_nss => ["dns_hub"],
ad_dc_no_ntlm => ["dns_hub"],
- backupfromdc => ["dns_hub"],
- customdc => ["dns_hub"],
- preforkrestartdc => ["dns_hub"],
fl2008r2dc => ["ad_dc"],
fl2003dc => ["ad_dc"],
s4member_dflt_domain => ["ad_dc_ntvfs"],
s4member => ["ad_dc_ntvfs"],
+ # envs that test the server process model
+ proclimitdc => ["dns_hub"],
+ preforkrestartdc => ["dns_hub"],
+
+ # backup/restore testenvs
+ backupfromdc => ["dns_hub"],
+ customdc => ["dns_hub"],
restoredc => ["backupfromdc"],
renamedc => ["backupfromdc"],
offlinebackupdc => ["backupfromdc"],
labdc => ["backupfromdc"],
- proclimitdc => [],
none => [],
);
return undef;
}
- if (not defined($self->check_or_start($env, "standard"))) {
+ if (not defined($self->check_or_start($env))) {
return undef;
}
}
# start samba for the restored DC
- if (not defined($self->check_or_start($env, "standard"))) {
+ if (not defined($self->check_or_start($env))) {
return undef;
}
}
# start samba for the restored DC
- if (not defined($self->check_or_start($env, "standard"))) {
+ if (not defined($self->check_or_start($env))) {
return undef;
}
Samba::mk_krb5_conf($ctx);
# start samba for the restored DC
- if (not defined($self->check_or_start($env, "standard"))) {
+ if (not defined($self->check_or_start($env))) {
return undef;
}
}
# start samba for the restored DC
- if (not defined($self->check_or_start($env, "standard"))) {
+ if (not defined($self->check_or_start($env))) {
return undef;
}
Samba::mk_krb5_conf($ctx);
# start samba for the restored DC
- if (not defined($self->check_or_start($env, "standard"))) {
+ if (not defined($self->check_or_start($env))) {
return undef;
}