[Spice-devel] [spice 8/8] tests: migrate: add counter for tests
Victor Toso
victortoso at redhat.com
Wed Sep 25 09:55:34 UTC 2019
On Wed, Sep 25, 2019 at 05:39:50AM -0400, Frediano Ziglio wrote:
> >
> > From: Victor Toso <me at victortoso.com>
> >
> > Signed-off-by: Victor Toso <victortoso at redhat.com>
> > ---
> > tests/migrate.py | 6 +++++-
> > 1 file changed, 5 insertions(+), 1 deletion(-)
> >
> > diff --git a/tests/migrate.py b/tests/migrate.py
> > index fcf51bdb..e83a6159 100755
> > --- a/tests/migrate.py
> > +++ b/tests/migrate.py
> > @@ -62,6 +62,8 @@ def get_args():
> > help="Append options for agent's virtserialport")
> > parser.add_argument('--wait-to-start', dest="wait_user_input",
> > action='store_true', default=False,
> > help="Wait user's input to start migration test")
> > + parser.add_argument('--count', dest='counter', type=int, default=100,
>
> Previous default was infinite. But even 100 is a big number.
I let it run > 4000 times last night. 0:-)
I think if we want infinite we should set it, as you said,
default to big but not infinite should be fine enough.
> > + help="Number of migrations to run (set 0 for
> > infinite)")
> > args = parser.parse_args(sys.argv[1:])
> > if os.path.exists(args.qemu):
> > args.qemu_exec = args.qemu
> > @@ -215,8 +217,10 @@ def main():
> > migration_port=args.migrate_port, spice_ports=[args.spice_port1,
> > args.spice_port2], vdagent=args.vdagent)
> > atexit.register(cleanup, migrator)
> > - while True:
> > + counter = 0
> > + while args.counter == 0 or counter < args.counter:
> > migrator.iterate(args.wait_user_input)
> > + counter += 1
> >
> > if __name__ == '__main__':
> > main()
>
> Otherwise,
> Acked-by: Frediano Ziglio <fziglio at redhat.com>
>
> Frediano
Thanks,
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/spice-devel/attachments/20190925/c2974fae/attachment.sig>
More information about the Spice-devel
mailing list