Ctrl-C will kill the serial process and always failed the test with
a "Process terminated" warning. So update the flood ping command
to make it return when timeout to ignore to trigger the Ctrl-C.

change from v1:
  - Update the ping command.

Signed-off-by: Yiqiao Pu <[email protected]>
Acked-by: Qingtang Zhou <[email protected]>
Signed-off-by: Feng Yang <[email protected]>
---
 client/virt/virt_test_utils.py |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/client/virt/virt_test_utils.py b/client/virt/virt_test_utils.py
index f5a2e0c..37b538a 100644
--- a/client/virt/virt_test_utils.py
+++ b/client/virt/virt_test_utils.py
@@ -1373,7 +1373,9 @@ def ping(dest=None, count=None, interval=None, 
interface=None,
         command += " -b"
     if flood:
         command += " -f -q"
+        command = "sleep %s && kill -2 `pidof ping` & %s" % (timeout, command)
         output_func = None
+        timeout += 1
 
     return raw_ping(command, timeout, session, output_func)
 
-- 
1.7.7.6

_______________________________________________
Autotest-kernel mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/autotest-kernel

Reply via email to