def setUp(self):
super(MdfindBlackboxTests, self).setUp()
- self.server = HTTPServer(('127.0.0.35', 8080),
+ self.server = HTTPServer(('10.53.57.35', 8080),
MdssvcHTTPRequestHandler,
bind_and_activate=False)
self.pipe = mdssvc.mdssvc('ncacn_np:fileserver[/pipe/mdssvc]', self.get_loadparm())
- self.server = HTTPServer(('127.0.0.35', 8080),
+ self.server = HTTPServer(('10.53.57.35', 8080),
MdssvcHTTPRequestHandler,
bind_and_activate=False)
'global',
self.tempf))
content = open(self.tempf, 'r').read()
- self.assertIn('127.0.0.', content)
+ self.assertIn('10.53.57.', content)
def test_samdb_url(self):
samba_lp = param.LoadParm()
samba.tests.dns.__main__.TestDNSUpdates.test_readd_record\(rodc:local\)
samba.tests.dns.__main__.TestDNSUpdates.test_update_add_mx_record\(rodc:local\)
samba.tests.dns.__main__.TestDNSUpdates.test_update_add_txt_record\(rodc:local\)
-samba.tests.dns.__main__.TestInvalidQueries.test_one_a_query\(rodc:local\)
samba.tests.dns.__main__.TestRPCRoundtrip.test_update_add_empty_txt_records\(rodc:local\)
samba.tests.dns.__main__.TestRPCRoundtrip.test_update_add_hex_char_txt_record\(rodc:local\)
samba.tests.dns.__main__.TestRPCRoundtrip.test_update_add_null_char_txt_record\(rodc:local\)
samba.tests.dns.__main__.TestDNSUpdates.test_readd_record\(vampire_dc:local\)
samba.tests.dns.__main__.TestDNSUpdates.test_update_add_mx_record\(vampire_dc:local\)
samba.tests.dns.__main__.TestDNSUpdates.test_update_add_txt_record\(vampire_dc:local\)
-samba.tests.dns.__main__.TestInvalidQueries.test_one_a_query\(vampire_dc:local\)
samba.tests.dns.__main__.TestRPCRoundtrip.test_update_add_empty_txt_records\(vampire_dc:local\)
samba.tests.dns.__main__.TestRPCRoundtrip.test_update_add_hex_char_txt_record\(vampire_dc:local\)
samba.tests.dns.__main__.TestRPCRoundtrip.test_update_add_null_char_txt_record\(vampire_dc:local\)
samba.tests.dns.__main__.TestComplexQueries.test_cname_two_chain\(vampire_dc:local\)
samba.tests.dns.__main__.TestComplexQueries.test_one_a_query\(vampire_dc:local\)
-samba.tests.dns.__main__.TestSimpleQueries.test_one_a_query\(vampire_dc:local\)
-samba.tests.dns.__main__.TestSimpleQueries.test_one_a_query_tcp\(vampire_dc:local\)
-samba.tests.dns.__main__.TestSimpleQueries.test_qtype_all_query\(vampire_dc:local\)
-samba.tests.dns.__main__.TestSimpleQueries.test_one_a_query\(rodc:local\)
-samba.tests.dns.__main__.TestSimpleQueries.test_one_a_query_tcp\(rodc:local\)
-samba.tests.dns.__main__.TestSimpleQueries.test_qtype_all_query\(rodc:local\)
# The SOA override should not pass against the RODC, it must not overstamp
samba.tests.dns.__main__.TestSimpleQueries.test_one_SOA_query\(rodc:local\)
How does it work?
=================
-Normally when 'make test' is run, every testenv uses a 127.0.0.x IP address
+Normally when 'make test' is run, every testenv uses a 10.53.57.x IP address
and socket-wrapper passes the packets between them.
-With namespaces, we can use real IP addresses and have the packets pass through
+With namespaces, we also use 10.53.57.x IP addresses but have the packets pass through
the kernel's IP stack normally, as it forwards them between namespaces.
We use veth interfaces for this. veth is a type of virtual interface supported
samba in. E.g.
selftest.pl veth21-br ------------------------ veth21 samba (ad_dc_ntvfs)
- 10.0.0.11 10.0.0.21
+ 10.53.57.11 10.53.57.21
Namespace 1 Namespace 2
However, we need to run multiple different testenvs and have them talk to
multiple testenvs looks more like this:
selftest.pl +-- veth21-br ------------------------ veth21 samba (ad_dc_ntvfs)
- | 10.0.0.21
+ | 10.53.57.21
selftest0 --+ Namespace 2
- 10.0.0.11 |
+ 10.53.57.11 |
+-- veth22-br ------------------------ veth22 samba (vampire_dc)
- 10.0.0.22
+ 10.53.57.22
Namespace 1 Namespace 3
The veth interfaces are named vethX and vethX-br, where X is the
4. Configure the veth end in the default namespace to be in the same subnet
as the selftest network:
sudo ip link set dev testenv-veth0 up
-sudo ip addr add 10.0.0.63/24 dev testenv-veth0
+sudo ip addr add 10.53.57.63/24 dev testenv-veth0
5. Enter the selftest namespace, bring that end of the pipe up, and add it to
to the main selftest0 bridge (that connects all the DCs together). We also need
nsenter -t $SELFTEST_PID --net --user --preserve-credentials
ip link set dev testenv-veth1 up
ip link set testenv-veth1 master selftest0
-ip route add default via 10.0.0.63
+ip route add default via 10.53.57.63
logout
Your Windows VM and samba testenv should now be able to talk to each
other over IP!
6. The other step is to get DNS working. You probably need to add dns_hub
-(10.0.0.64) as a nameserver (at least on your Windows VM).
+(10.53.57.64) as a nameserver (at least on your Windows VM).
This should work for using RSAT tools on samba, or joining Windows to Samba
(depending on the schema version). Joining samba to Windows is a bit more
# We give the selftest client 6 different IPv4 addresses to use. Most tests
# only use the first (.11) IP. Note that winsreplication.c is one test that
# uses the other IPs (search for iface_list_count()).
+$ENV{SOCKET_WRAPPER_IPV4_NETWORK} = "10.53.57.0";
my $interfaces = Samba::get_interfaces_config("client", 6);
my $clientdir = "$prefix_abs/client";
$swiface += $iface_num;
}
- if (use_namespaces()) {
- # use real IPs if selftest is running in its own network namespace
- return "10.0.0.$swiface";
- } else {
- # use loopback IPs with socket-wrapper
- return "127.0.0.$swiface";
- }
+ return "10.53.57.$swiface";
}
sub get_ipv6_addr
my $dropbox_sharedir="$share_dir/dropbox";
push(@dirs,$dropbox_sharedir);
+ my $ip4 = Samba::get_ipv4_addr("FILESERVER");
my $fileserver_options = "
kernel change notify = yes
rpc_server:mdssvc = embedded
spotlight backend = elasticsearch
- elasticsearch:address = 127.0.0.35
+ elasticsearch:address = $ip4
elasticsearch:port = 8080
elasticsearch:mappings = $srcdir_abs/source3/rpc_server/mdssvc/elasticsearch_mappings.json
} else {
system("$nmblookup $envvars->{CONFIGURATION} -U $envvars->{SERVER_IP} __SAMBA__");
system("$nmblookup $envvars->{CONFIGURATION} __SAMBA__");
- system("$nmblookup $envvars->{CONFIGURATION} -U 127.255.255.255 __SAMBA__");
+ system("$nmblookup $envvars->{CONFIGURATION} -U 10.255.255.255 __SAMBA__");
system("$nmblookup $envvars->{CONFIGURATION} -U $envvars->{SERVER_IP} $envvars->{SERVER}");
}
$count++;
my %node = ();
my $server_name = "ctdb${i}";
my $pub_iface = Samba::get_interface($server_name);
- my $ip = "127.0.0.${pub_iface}";
+ my $ip = Samba::get_ipv4_addr($server_name);
$node{NODE_NUMBER} = "$i";
$node{SERVER_NAME} = "$server_name";
failed=0
+SOCKET_WRAPPER_IPV4_NETWORK="127.0.0.0"
+export SOCKET_WRAPPER_IPV4_NETWORK
+
testit "async_connect_send" $VALGRIND $BINDIR/async_connect_send_test ||
failed=`expr $failed + 1`
if have_heimdal_support:
planoldpythontestsuite("ad_dc:local", "samba.tests.auth_log", extra_args=['-U"$USERNAME%$PASSWORD"'],
- environ={'CLIENT_IP': '127.0.0.11',
+ environ={'CLIENT_IP': '10.53.57.11',
'SOCKET_WRAPPER_DEFAULT_IFACE': 11})
planoldpythontestsuite("ad_dc_ntvfs:local", "samba.tests.auth_log", extra_args=['-U"$USERNAME%$PASSWORD"'],
- environ={'CLIENT_IP': '127.0.0.11',
+ environ={'CLIENT_IP': '10.53.57.11',
'SOCKET_WRAPPER_DEFAULT_IFACE': 11})
planoldpythontestsuite("ad_dc", "samba.tests.auth_log_pass_change",
extra_args=['-U"$USERNAME%$PASSWORD"'])