Re: [Qemu-devel] [PATCH RFC 4/9] tests: Add vm test lib

2017-08-16 Thread Fam Zheng
On Wed, 08/16 09:55, Stefan Hajnoczi wrote: > On Wed, Aug 16, 2017 at 03:20:59PM +0800, Fam Zheng wrote: > > +class BaseVM(object): > > +GUEST_USER = "qemu" > > +GUEST_PASS = "qemupass" > > +ROOT_PASS = "qemupass" > > + > > +# The script to run in the guest that builds QEMU > > +

Re: [Qemu-devel] [PATCH RFC 4/9] tests: Add vm test lib

2017-08-16 Thread Eric Blake
On 08/16/2017 03:55 AM, Stefan Hajnoczi wrote: > I'm not aware of a QMP equivalent for "info usernet". It may be > necessary to implement a query-usernet command if you don't want to use > HMP. It's possible to run any HMP command from within QMP, using human-monitor-command. Parsing the result

Re: [Qemu-devel] [PATCH RFC 4/9] tests: Add vm test lib

2017-08-16 Thread Stefan Hajnoczi
On Wed, Aug 16, 2017 at 03:20:59PM +0800, Fam Zheng wrote: > +class BaseVM(object): > +GUEST_USER = "qemu" > +GUEST_PASS = "qemupass" > +ROOT_PASS = "qemupass" > + > +# The script to run in the guest that builds QEMU > +BUILD_SCRIPT = "" > +# The guest name, to be overridden

[Qemu-devel] [PATCH RFC 4/9] tests: Add vm test lib

2017-08-16 Thread Fam Zheng
This is the common code to implement a "VM test" to 1) Download and initialize a pre-defined VM that has necessary dependencies to build QEMU and SSH access. 2) Archive $SRC_PATH to a .tar file. 3) Boot the VM, and pass the source tar file to the guest. 4) SSH into the VM, untar the s