Re: [PATCH kvm-unit-tests 5/8] lib: Introduce do_migration

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

 



On Wed, Feb 14, 2018 at 12:45:31PM +0100, Paolo Bonzini wrote:
> On 07/02/2018 20:03, Andrew Jones wrote:
> > Wrap migration starting and waiting into a function in order to
> > encapsulate the protocol.
> > 
> > Signed-off-by: Andrew Jones <drjones@xxxxxxxxxx>
> > ---
> >  lib/libcflat.h        | 7 +++++++
> >  powerpc/sprs.c        | 4 +---
> >  scripts/arch-run.bash | 4 ++--
> >  3 files changed, 10 insertions(+), 5 deletions(-)
> > 
> > diff --git a/lib/libcflat.h b/lib/libcflat.h
> > index c680b69a926e..29b39a54eb00 100644
> > --- a/lib/libcflat.h
> > +++ b/lib/libcflat.h
> > @@ -159,4 +159,11 @@ void print_binstr(unsigned long x);
> >  
> >  extern void setup_vm(void);
> >  
> > +static inline void do_migration(void)
> > +{
> > +	report_info("Migration Start, migrate the VM and then press a key to continue...");
> > +	while (getchar() == 0);
> > +	report_info("Migration Complete");
> > +}
> > +
> >  #endif
> 
> I don't think this belongs in libcflat.h.  Maybe userinput.h?
>

Yeah, IMO it'd be nice to completely kill libcflat.h. I'm not sure how
many user input type functions we'll add to the framework, so I'm a bit
concerned userinput.h will be a one prototype header. Well, unless you
want to throw command line parsing in there too. How about we try to
better use the concept of util.h? Maybe rename it to test-util.h or
something else (userinput.h?) first?

(Side note, we could definitely use a lib/report.h for all the report
 prototypes.)

Thanks,
drew



[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