[PATCH] KVM Test: add -w parameter in nc command in kvm_utils.py

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



If a connection and stdin are idle for more than timeout seconds,
then the connection is silently closed. withou this paramter,
nc will listen forever for a connection. This may cause our test
hang. redmine issue:
http://redmine.englab.nay.redhat.com/issues/show/6947
Add -w parameter should fix this issue.

Signed-off-by: Feng Yang <fyang@xxxxxxxxxx>
---
 client/tests/kvm/kvm_utils.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/client/tests/kvm/kvm_utils.py b/client/tests/kvm/kvm_utils.py
index a51c857..526d38d 100644
--- a/client/tests/kvm/kvm_utils.py
+++ b/client/tests/kvm/kvm_utils.py
@@ -733,7 +733,7 @@ def remote_login(client, host, port, username, password, prompt, linesep="\n",
     elif client == "telnet":
         cmd = "telnet -l %s %s %s" % (username, host, port)
     elif client == "nc":
-        cmd = "nc %s %s" % (host, port)
+        cmd = "nc %s %s -w %s" % (host, port, timeout)
     else:
         logging.error("Unknown remote shell client: %s" % client)
         return
-- 
1.6.5.2

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux