* On 2012-08-10 16:12:21 -0300, Lucas Meneghel Rodrigues ([email protected]) 
wrote:
> On Fri, 2012-08-10 at 16:14 +0800, Feng Yang wrote:
> > 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)
> 
> Took me a while to understand what you guys wanted to do here... OK,
> applied.
oops, it's used to kill ping process. I rem some test case using flood
ping function would send a ^C key pair to guest via serial session, 
but the nc cmd which is used to connect to serial soket gets that signal
and exit.
Thus we made that ugly hack. we should add some comment here for
explanation.

> 
> >          output_func = None
> > +        timeout += 1
> >  
> >      return raw_ping(command, timeout, session, output_func)
> >  
> 
> 
> _______________________________________________
> Autotest-kernel mailing list
> [email protected]
> https://www.redhat.com/mailman/listinfo/autotest-kernel

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

Reply via email to