1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00
Commit Graph

115 Commits

Author SHA1 Message Date
Andrew Bartlett
53ddac3f27 wintest New snapshot for my wintest VMs 2011-03-29 00:00:23 +02:00
Andrew Tridgell
9eb9b11bfd wintest: added a "ipconfig /flushdns"
w2k3 doesn't flush its DNS cache on a dynamic update

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-03-29 00:00:22 +02:00
Andrew Tridgell
22cbd04fd7 wintest: fixed syntax highlighting with emacs 2011-03-29 00:00:22 +02:00
Andrew Tridgell
b85bb3e386 wintest: ensure we startup the w2k3 DC VM
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-03-29 00:00:22 +02:00
Andrew Tridgell
949427c208 python: use os.environ[] instead of os.putenv()
using os.putenv() causes too much confusion, as it doesn't update
os.getenv()

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-02-22 02:51:10 +01:00
Andrew Bartlett
0dec840677 Add support for testing a Win2k3 domain member 2011-02-17 05:56:04 +01:00
Andrew Bartlett
5425227b55 wintest upper case the --vms paramter arguments to wintest.py
This makes it easier to specify
2011-02-17 05:56:04 +01:00
Andrew Bartlett
2d72f68ed0 s4-wintest Use top level build for wintest 2011-02-07 13:22:02 +11:00
Andrew Bartlett
e830cb4839 wintest Return debug info when dcpromo fails from the log 2011-02-02 15:21:13 +11:00
Zahari Zahariev
330b922bd6 s4/wintest New ESXi configuration file
This is a way to use wintest as it is unchanged and work with
ESXi virtualization solution instead of VirtualBox or KVM. As the
virtualization server is a remote Linux like machine I use 'sshpass'
wrapper SSH to execute stop/reset/revert commands.

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Fri Jan 21 00:29:15 CET 2011 on sn-devel-104
2011-01-21 00:29:15 +01:00
Zahari Zahariev
94b149f3cb Typos in wintest 2010-12-16 15:54:29 +11:00
Andrew Bartlett
6510414ef0 wintest Add testing of kerberos connections to Windows members of an AD domain
This improves the Samba3 wintest script to test against Windows7 and
WinXP domain members, and Windows7 standalone servers.  To do this,
more of the samba4 script is put in common, and we splut up the
starting of the VMs from the preperation of the VM.

This also improves the nmblookup command parsing to cope with both the
samba3 and samba4 nmblookup commands.

A krb5.conf is now provided for both s3 and s4 tests.

Andrew Bartlett

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Tue Dec 14 01:54:46 CET 2010 on sn-devel-104
2010-12-14 01:54:46 +01:00
Andrew Bartlett
e92803201a wintest flush DNS on Windows clients to improve reliablity
Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Fri Dec 10 08:45:28 CET 2010 on sn-devel-104
2010-12-10 08:45:28 +01:00
Andrew Bartlett
89d4439ff1 wintest More work to make test-s3.py work
- Set the password on the newly added 'root' user so we can connect with a user that exists in getpwnam() without further configuration
 - bind interfaces only so we don't conflict with other Samba instances
 - use the full DNS name for smbclient
 - don't connect to localhost (as we will be on ${INTERFACE_IP} only
 - Use the windows domain in the wbinfo command (winbindd won't take bare name here).
 - Register our IP address in DNS using 'net ads dns register'

Andrew Bartlett
2010-12-10 17:58:13 +11:00
Andrew Bartlett
4408f8a0de wintest Share more of the S4 test code with the s3 test
This allows us to run a private BIND in the S3 test, and allows the S3
test to join a freshly provisioned AD instance if the VM isn't already
configured.

Andrew Bartlett
2010-12-10 17:58:13 +11:00
Andrew Bartlett
377b3995b1 wintest Remove the password expiry as the first step
This is particularly important before dcpromo, as the password will
otherwise be expired in the new domain.

Andrew Bartlett

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Thu Dec  9 13:33:00 CET 2010 on sn-devel-104
2010-12-09 13:33:00 +01:00
Andrew Tridgell
9013f93df1 wintest: use --add-ref for RODC replication
this forces the creation of the repsTo attribute, and allows more
complete testing of RODC replication
2010-12-08 05:26:05 +01:00
Andrew Tridgell
6bfa21f624 wintest: autodetect if named supports tkey-gssapi-keytab
Autobuild-User: Andrew Tridgell <tridge@samba.org>
Autobuild-Date: Fri Dec  3 08:48:52 CET 2010 on sn-devel-104
2010-12-03 08:48:52 +01:00
Andrew Tridgell
9de6b4a7ca wintest: put most of the main program login in wintest.py
this makes it easier to create new tests

Autobuild-User: Andrew Tridgell <tridge@samba.org>
Autobuild-Date: Fri Dec  3 06:17:44 CET 2010 on sn-devel-104
2010-12-03 06:17:44 +01:00
Andrew Tridgell
fd38dabdcc wintest: added README
this points at the wiki page

Autobuild-User: Andrew Tridgell <tridge@samba.org>
Autobuild-Date: Thu Dec  2 02:05:32 CET 2010 on sn-devel-104
2010-12-02 02:05:32 +01:00
Andrew Tridgell
00ecbdbbd1 wintest: cope with w2k3 form of dcdiag output 2010-12-01 17:00:47 +11:00
Andrew Bartlett
06fd5b7003 wintest Move stopping of BIND into a new step
We must run this early, to ensure that BIND isn't alive to write to
the zone file after provision has cleaned it up.

Andrew Bartlett
2010-12-01 17:00:47 +11:00
Andrew Tridgell
9c84f987ac wintest: make command matching case insensitive by default
the new BASEDN changes break the RODC join otherwise

Autobuild-User: Andrew Tridgell <tridge@samba.org>
Autobuild-Date: Wed Dec  1 06:54:13 CET 2010 on sn-devel-104
2010-12-01 06:54:13 +01:00
Andrew Tridgell
60e1a2c8cb wintest: we don't need the WIN_BASEDN vars any more
they are based on the realm now
2010-12-01 16:09:59 +11:00
Andrew Tridgell
bd86dda8e6 wintest: fixed formatting of wintest in emacs python mode 2010-12-01 16:09:59 +11:00
Andrew Bartlett
4072455c00 wintest Wipe the BIND data directory just before we restart bind
This will hopefully mean we don't end up with stale zone info in the
new server.

Andrew Bartlett
2010-12-01 16:09:59 +11:00
Andrew Bartlett
d48b66e1e8 wintest Another way to work out if a Windows machine is a DC
it's not perfect (may fail on member servers) but it's picks up the
difference between standalone and DC OK.

Andrew Bartlett
2010-12-01 16:09:59 +11:00
Andrew Bartlett
ca79bc7373 wintest Add more retries and fix up RODC handling after auto-dcpromo
The extra looping allows some time for the system to settle down while
we connect to the server for the first time.

Andrew Bartlett
2010-12-01 16:09:59 +11:00
Andrew Bartlett
a565eff969 wintest Allow 'samba-tool newuser' to run a few times waiting for the RID Set
Pair-Programmed-With: Andrew Tridgell <tridge@samba.org>
2010-12-01 16:09:59 +11:00
Andrew Bartlett
0b2ec0abb9 wintest Make the new --vms option default to running all tests.
Andrew Bartlett
2010-12-01 16:09:58 +11:00
Andrew Bartlett
86c3c42745 wintest Set WIN_LCREALM and WIN_BASEDN automatically
Also this uppper cases WIN_REALM, to avoid this being sensitive based
on the configuration file.

Andrew Bartlett
2010-12-01 16:09:58 +11:00
Andrew Bartlett
7ecf6b2451 wintest Add a function to shut down all the managed VMs at the start
This helps ensure that old virtual machines don't interfer with a new
test run.

Andrew Bartlett
2010-12-01 16:09:58 +11:00
Andrew Bartlett
b5bab49dc9 wintest Fix case of BASEDN variables
This needs to be automatically calculated.

Andrew Bartlett
2010-12-01 16:09:58 +11:00
Andrew Bartlett
f5382d5d3f wintest Add automatic dcpromo is the host isn't a DC yet
This is slow, and requires an extra reboot, but should be consistent
and reproducible.

Andrew Bartlett
2010-12-01 16:09:58 +11:00
Andrew Bartlett
b0ed6c2b6f wintest Add more VMs and correct titles 2010-12-01 16:09:58 +11:00
Andrew Tridgell
2b1c259d51 wintest: cope with delays in w2k3 starting its DRS server
w2k3 brings up its DRS server quite a long time after its other
services
2010-12-01 16:09:58 +11:00
Andrew Tridgell
90215c53df wintest: wait for the windows DC to register its DNS name
after a windows DC uses dcpromo to join our domain, it can take a
while for it to register its DNS name

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-12-01 16:09:58 +11:00
Andrew Tridgell
a36e4b28c7 wintest: fixed casefold handling in expect calls 2010-12-01 16:09:57 +11:00
Andrew Tridgell
7526171ce5 wintest: make expect calls case insensitive by default 2010-12-01 11:03:25 +11:00
Andrew Tridgell
1079195a76 wintest: added --vms option
this allows you to run tests associated with a specified list of VMs
2010-12-01 11:03:25 +11:00
Andrew Tridgell
7025087456 wintest: cope with the heimdal version of kinit
Autobuild-User: Andrew Tridgell <tridge@samba.org>
Autobuild-Date: Mon Nov 29 08:49:36 CET 2010 on sn-devel-104
2010-11-29 08:49:36 +01:00
Andrew Tridgell
8737baee7c wintest: cope with VMs sometimes not rebooting
my w2k8 image occasionally gets stuck in the early stages of
booting. This adds code to detect a failed reboot, in which case the
VM is reset

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>

Autobuild-User: Andrew Tridgell <tridge@samba.org>
Autobuild-Date: Sat Nov 27 02:42:19 CET 2010 on sn-devel-104
2010-11-27 02:42:19 +01:00
Andrew Tridgell
353cdd006a wintest: avoid adding a blank line to resolv.conf on each run
Autobuild-User: Andrew Tridgell <tridge@samba.org>
Autobuild-Date: Sat Nov 27 01:47:48 CET 2010 on sn-devel-104
2010-11-27 01:47:48 +01:00
Andrew Tridgell
3bc6145143 wintest: handle missing firewall commands
my w2k3 box doesn't have these firewall commands
2010-11-27 01:03:30 +01:00
Andrew Tridgell
cfa7510e19 wintest: do an initial replication of CN=Configuration to transfer dnsHostname
this fixes the drs replication in the dcpromo test
2010-11-26 03:08:21 +01:00
Andrew Tridgell
23bffff98c wintest: fixed "rndc command" option in provision
we need to point at the generated rndc.conf

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-11-26 03:08:21 +01:00
Andrew Tridgell
9409b73290 wintest: make IPv6 optional in wintest
we need some more work on IPv6 support in s4 before this works
2010-11-26 03:08:21 +01:00
Andrew Tridgell
ea1889d4b5 wintest: added an IPv6 address, and use fully qualified hostname
this also makes the resolv.conf handling more robust

Autobuild-User: Andrew Tridgell <tridge@samba.org>
Autobuild-Date: Wed Nov 24 11:34:30 CET 2010 on sn-devel-104
2010-11-24 11:34:30 +01:00
Andrew Bartlett
ef46298c65 wintest Don't connect to localhost or unqualified hostname, bind interface only
Instead, connect to ${INTERFACE_IP} and the fully qualified hostname,
so that we talk to the the interface where Samba is (now) bound.
Using 'bind interfaces only' means that the other Samba instances
(properly configured) can still run while the tests progress.

(killall operations that currently terminate other Samba instances
still need work).

Andrew Bartlett

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Wed Nov 24 08:33:03 CET 2010 on sn-devel-104
2010-11-24 08:33:03 +01:00
Andrew Tridgell
192f3001ae wintest: fixed cleanup of /etc/resolv.conf
Autobuild-User: Andrew Tridgell <tridge@samba.org>
Autobuild-Date: Wed Nov 24 07:29:49 CET 2010 on sn-devel-104
2010-11-24 07:29:49 +01:00
Andrew Tridgell
1252d6bdf4 wintest: remove reliance on hostname in /etc/hosts
- don't setwinvars() in test code
- use fully qualified names where possible
- don't delete named and rndc config
2010-11-24 16:42:52 +11:00
Andrew Tridgell
f207cc185f wintest: fixed interface handling and DNS forwarding
- allow for _IP vars on VMs
- resolve IPs using nmblookup
- forward DNS requests for windows domains
2010-11-24 16:42:52 +11:00
Andrew Tridgell
f6adad4d25 wintest: tidyups and new conf variables
Autobuild-User: Andrew Tridgell <tridge@samba.org>
Autobuild-Date: Tue Nov 23 13:01:10 CET 2010 on sn-devel-104
2010-11-23 13:01:10 +01:00
Andrew Bartlett
95edbc382d wintest Evolve wintest to handle it's own BIND nameserver
The changes here start our own copy of BIND, listening on a new
interface that we create at the start of the script.  The user must
specify the IP address etc that this interface will have, and BIND and
Samba will bind to that interface only.

This means that we won't conflict with an existing BIND on the system,
so long as it isn't configured to listen on all interfaces.

We also auto-create the /etc/resolv.conf and restore it at the end of
the script, using the existing server value from the script as a
forwarder.

Andrew Bartlett

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Tue Nov 23 08:30:34 CET 2010 on sn-devel-104
2010-11-23 08:30:34 +01:00
Andrew Bartlett
be0f4129a1 wintest Improve wintest's handling of IP addresses and add more auto-setup
- Don't change the IP address if DHCP is not in use

   The main reason to 'fix' the IP is to get around Dynamic DNS issues caused
   by the DHCP server, if the VM is already on a fixed IP, it does not matter.

 - Set the maximum telnet connection limit to 1024

   This ensures that we can always make a new connection, regardless
   of the existing configuration.  We also catch more conditions when
   the server has restricted the number of connections, and try again.

 - Set the route after the connection drops out

   My WinXP box always wants to drop the default route

 - Set the DNS as a distinct step

   My WinXP box drops the connection when we set DNS servers

Andrew Bartlett
2010-11-23 07:46:07 +01:00
Andrew Bartlett
39c2fd1c64 wintest Explian that this is my KVM/libvirt configuration 2010-11-23 07:46:07 +01:00
Andrew Bartlett
41f1e3242c wintest example configuration file for a KVM based wintest
Andrew Bartlett
2010-11-23 07:46:07 +01:00
Andrew Bartlett
e77ea04872 wintest Allow substitute to cope with objects like pexpect.EOF
These are not strings, but may get passed into this function on the
way to pexpect.

Andrew Bartlett
2010-11-23 07:46:07 +01:00
Andrew Bartlett
5767ee9663 wintest Set the virtual machine IP to match it's dynamic IP, but don't use DHCP
The idea here is that the virtual machine stays on the address
allocated by DHCP, but is configured statically.  This avoids the need
to manually set the address on the host, but avoids the host being
instructed by DHCP not to do Dynamic DNS.

Andrew Bartlett
2010-11-23 07:46:07 +01:00
Andrew Bartlett
c251c45e7f wintest Force krb5.conf for BIND so we use the one generated for this test
This avoids needing to set the krb5.conf for the whole host to match
the test environment.

Andrew Bartlett
2010-11-23 07:46:07 +01:00
Andrew Tridgell
fcb7729c6c wintest: the start of a S3 testing script for wintest
this is just a skeleton at this stage.

Autobuild-User: Andrew Tridgell <tridge@samba.org>
Autobuild-Date: Fri Nov 19 06:03:55 CET 2010 on sn-devel-104
2010-11-19 06:03:55 +01:00
Andrew Tridgell
7bfc60e40c wintest: added del_files, write_file and casefold 2010-11-19 15:17:44 +11:00
Andrew Tridgell
8f1df57265 wintest: move conf files to conf/ 2010-11-19 15:17:44 +11:00
Andrew Tridgell
10c246567c wintest: rename test-howto.py to test-s4-howto.py
ready for test-s3.py
2010-11-19 15:17:43 +11:00
Andrew Tridgell
24e8bc5441 wintest: moved to top level
the plan is to expand wintest to test a lot more of Samba against
windows, including testing the Samba3 file server, winbind, nmbd etc
2010-11-19 15:17:43 +11:00