mirror of
https://github.com/samba-team/samba.git
synced 2025-08-02 00:22:11 +03:00
wintest: Try harder to make wintest force the telnet server to start
We try and force the server to start, and we try to force the TelnetClients group to exist Change-Id: I192f0aaaf283b77065ecc671ca2b59a69781d744 Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-on: https://gerrit.samba.org/36 Reviewed-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Fri Mar 14 14:51:20 CET 2014 on sn-devel-104
This commit is contained in:
committed by
Stefan Metzmacher
parent
7db0defdd2
commit
d78369789a
@ -679,6 +679,7 @@ options {
|
||||
set_route = False
|
||||
set_dns = False
|
||||
set_telnetclients = True
|
||||
start_telnet = True
|
||||
if self.getvar('WIN_IP'):
|
||||
ip = self.getvar('WIN_IP')
|
||||
else:
|
||||
@ -711,6 +712,7 @@ options {
|
||||
pexpect.EOF])
|
||||
if i == 1:
|
||||
if set_telnetclients:
|
||||
self.run_cmd('bin/net rpc group add TelnetClients -S $WIN_IP -U$WIN_USER%$WIN_PASS')
|
||||
self.run_cmd('bin/net rpc group addmem TelnetClients "authenticated users" -S $WIN_IP -U$WIN_USER%$WIN_PASS')
|
||||
child.close()
|
||||
retries -= 1
|
||||
@ -720,6 +722,15 @@ options {
|
||||
else:
|
||||
raise RuntimeError("Failed to connect with telnet due to missing TelnetClients membership")
|
||||
|
||||
if i == 6:
|
||||
# This only works if it is installed and enabled, but not started. Not entirely likely, but possible
|
||||
self.run_cmd('bin/net rpc service start TlntSvr -S $WIN_IP -U$WIN_USER%$WIN_PASS')
|
||||
child.close()
|
||||
start_telnet = False
|
||||
retries -= 1
|
||||
self.info("retrying (retries=%u delay=%u)" % (retries, delay))
|
||||
continue
|
||||
|
||||
if i != 0:
|
||||
child.close()
|
||||
time.sleep(delay)
|
||||
|
Reference in New Issue
Block a user