mirror of
https://github.com/samba-team/samba.git
synced 2024-12-22 13:34:15 +03:00
wintest: check netcats exitstatus instead of output
There are many netcat implementations with different output messages. Signed-off-by: Kai Blin <kai@samba.org>
This commit is contained in:
parent
ed3ded1122
commit
884e28f66b
@ -492,9 +492,12 @@ options {
|
|||||||
|
|
||||||
while retries > 0:
|
while retries > 0:
|
||||||
child = self.pexpect_spawn("nc -v -z -w 1 %s %u" % (hostname, port), crlf=False, timeout=1)
|
child = self.pexpect_spawn("nc -v -z -w 1 %s %u" % (hostname, port), crlf=False, timeout=1)
|
||||||
i = child.expect(['succeeded', 'failed', pexpect.EOF, pexpect.TIMEOUT])
|
child.expect([pexpect.EOF, pexpect.TIMEOUT])
|
||||||
|
child.close()
|
||||||
|
i = child.exitstatus
|
||||||
if wait_for_fail:
|
if wait_for_fail:
|
||||||
if i > 0:
|
#wait for timeout or fail
|
||||||
|
if i == None or i > 0:
|
||||||
return
|
return
|
||||||
else:
|
else:
|
||||||
if i == 0:
|
if i == 0:
|
||||||
|
Loading…
Reference in New Issue
Block a user