summaryrefslogtreecommitdiff
path: root/selftest/target/Samba4.pm
diff options
context:
space:
mode:
authorTim Beale <timbeale@catalyst.net.nz>2019-05-23 17:44:37 +1200
committerAndrew Bartlett <abartlet@samba.org>2019-05-31 05:18:20 +0000
commit067b4fc03fec20e944eac2645f400471f2bc0b21 (patch)
tree7a8fd4b4434da4411d4607922d6b4dcc9768aafc /selftest/target/Samba4.pm
parentc9e62513822fa5fce9ad29c164273a2db64ff18d (diff)
downloadsamba-067b4fc03fec20e944eac2645f400471f2bc0b21.tar.gz
selftest: Add linux namespace support (USE_NAMESPACES=1)
This hooks up the selftest/ns/* scripts added earlier with the selftest system, so developers can optionally run a testenv or test using linux namespaces instead of socket-wrapper. The idea is this is experimental functionality that we can extend further in future, in order to make testing Samba more versatile. + The top-level WAF script now does an 'unshare' to create a new top-level 'selftest' namespace in which to create the testenv(s). + selftest.pl creates a common 'selftest0' bridge to connect together the individual DCs. + Update Samba.pm so it can use real IPs instead of loopback addresses. In fork_and_exec(), we add a couple of hooks so that the binary gets started in a different namespace (using unshare/start_in_ns.sh), and the parent process connects the new child namespace up to the common selftest0 bridge (using add_bridge_iface.sh). Signed-off-by: Tim Beale <timbeale@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'selftest/target/Samba4.pm')
-rwxr-xr-xselftest/target/Samba4.pm3
1 files changed, 3 insertions, 0 deletions
diff --git a/selftest/target/Samba4.pm b/selftest/target/Samba4.pm
index 609ff837af2..b1c6aa459c1 100755
--- a/selftest/target/Samba4.pm
+++ b/selftest/target/Samba4.pm
@@ -468,6 +468,9 @@ sub get_cmd_env_vars
return $cmd_env;
}
+# Sets up a forest trust namespace.
+# (Note this is different to kernel namespaces, setup by the
+# USE_NAMESPACES=1 option)
sub setup_namespaces($$:$$)
{
my ($self, $localenv, $upn_array, $spn_array) = @_;