Il gio 8 apr 2021, 18:06 Emanuele Giuseppe Esposito <eespo...@redhat.com>
ha scritto:

>
>
> On 08/04/2021 17:40, Paolo Bonzini wrote:
> > On 07/04/21 15:50, Emanuele Giuseppe Esposito wrote:
> >>       def get_qmp_events_filtered(self, wait=60.0):
> >>           result = []
> >> -        for ev in self.get_qmp_events(wait=wait):
> >> +        qmp_wait = wait
> >> +        if qemu_gdb:
> >> +            qmp_wait = 0.0
> >> +        for ev in self.get_qmp_events(wait=qmp_wait):
> >>               result.append(filter_qmp_event(ev))
> >>           return result
> >
> > Should this be handled in get_qmp_events instead, since you're basically
> > changing all the callers?
>
> get_qmp_events is in python/machine.py, which as I understand might be
> used also by some other scripts, so I want to keep the changes there to
> the minimum. Also, machine.py has no access to qemu_gdb or
> qemu_valgrind, so passing a boolean or something to delay the timer
> would still require to add a similar check in all sections.
>
> Or do you have a cleaner way to do this?
>

Maybe a subclass IotestsMachine?

Paolo


> Emanuele
>
>

Reply via email to