Re: [Qemu-devel] [PATCH v4 03/10] tests: Add vm test lib

2017-09-01 Thread Fam Zheng
On Fri, 09/01 16:29, Philippe Mathieu-Daudé wrote: > On 08/30/2017 12:34 AM, Fam Zheng wrote: > > On Tue, 08/29 14:34, Philippe Mathieu-Daudé wrote: > > > > +self._args = [ \ > > > > +"-nodefaults", "-m", "2G", > > > > +"-cpu", "host", > > > > +"-netdev",

Re: [Qemu-devel] [PATCH v4 03/10] tests: Add vm test lib

2017-09-01 Thread Philippe Mathieu-Daudé
On 08/30/2017 12:34 AM, Fam Zheng wrote: On Tue, 08/29 14:34, Philippe Mathieu-Daudé wrote: +self._args = [ \ +"-nodefaults", "-m", "2G", +"-cpu", "host", +"-netdev", "user,id=vnet,hostfwd=:0.0.0.0:0-:22", +"-device", "virtio-net-pci,netdev

Re: [Qemu-devel] [PATCH v4 03/10] tests: Add vm test lib

2017-08-30 Thread Fam Zheng
On Wed, 08/30 18:16, Fam Zheng wrote: > On Tue, 08/29 10:35, Philippe Mathieu-Daudé wrote: > > On 08/29/2017 10:22 AM, Kamil Rytarowski wrote: > > > On 29.08.2017 15:10, Philippe Mathieu-Daudé wrote: > > > > Hi Fam, Kamil, > > > > > > > > > On 08/28/2017 02:47 PM, Fam Zheng wrote: > > > > [...] >

Re: [Qemu-devel] [PATCH v4 03/10] tests: Add vm test lib

2017-08-30 Thread Fam Zheng
On Wed, 08/30 11:29, Fam Zheng wrote: > On Tue, 08/29 09:15, Philippe Mathieu-Daudé wrote: > > > +self._args = [ \ > > > +"-nodefaults", "-m", "2G", > > > +"-cpu", "host", > > > +"-netdev", "user,id=vnet,hostfwd=:0.0.0.0:0-:22", > > > > Testing with debi

Re: [Qemu-devel] [PATCH v4 03/10] tests: Add vm test lib

2017-08-30 Thread Fam Zheng
On Tue, 08/29 10:35, Philippe Mathieu-Daudé wrote: > On 08/29/2017 10:22 AM, Kamil Rytarowski wrote: > > On 29.08.2017 15:10, Philippe Mathieu-Daudé wrote: > > > Hi Fam, Kamil, > > > > > > > On 08/28/2017 02:47 PM, Fam Zheng wrote: > > > [...] > > > > > +subprocess.check_call([tar_cmd, > >

Re: [Qemu-devel] [PATCH v4 03/10] tests: Add vm test lib

2017-08-29 Thread Fam Zheng
On Tue, 08/29 14:34, Philippe Mathieu-Daudé wrote: > > +self._args = [ \ > > +"-nodefaults", "-m", "2G", > > +"-cpu", "host", > > +"-netdev", "user,id=vnet,hostfwd=:0.0.0.0:0-:22", > > +"-device", "virtio-net-pci,netdev=vnet", > > +

Re: [Qemu-devel] [PATCH v4 03/10] tests: Add vm test lib

2017-08-29 Thread Fam Zheng
On Tue, 08/29 09:15, Philippe Mathieu-Daudé wrote: > > +self._args = [ \ > > +"-nodefaults", "-m", "2G", > > +"-cpu", "host", > > +"-netdev", "user,id=vnet,hostfwd=:0.0.0.0:0-:22", > > Testing with debian/unstable: > > $ make vm-build-netbsd V=1 > ./tes

Re: [Qemu-devel] [PATCH v4 03/10] tests: Add vm test lib

2017-08-29 Thread Fam Zheng
On Tue, 08/29 13:11, Daniel P. Berrange wrote: > On Tue, Aug 29, 2017 at 09:06:48AM -0300, Philippe Mathieu-Daudé wrote: > > Hi Fam, > > > > On 08/28/2017 02:47 PM, Fam Zheng wrote: > > > This is the common code to implement a "VM test" to > > > > > >1) Download and initialize a pre-defined V

Re: [Qemu-devel] [PATCH v4 03/10] tests: Add vm test lib

2017-08-29 Thread Philippe Mathieu-Daudé
On 08/28/2017 02:47 PM, Fam Zheng wrote: [...] +def __init__(self, debug=False, vcpus=None): +self._guest = None +self._tmpdir = tempfile.mkdtemp(prefix="qemu-vm-") +atexit.register(shutil.rmtree, self._tmpdir) + +self._ssh_key_file = os.path.join(self._tmpdir,

Re: [Qemu-devel] [PATCH v4 03/10] tests: Add vm test lib

2017-08-29 Thread Philippe Mathieu-Daudé
On 08/29/2017 10:22 AM, Kamil Rytarowski wrote: On 29.08.2017 15:10, Philippe Mathieu-Daudé wrote: Hi Fam, Kamil, On 08/28/2017 02:47 PM, Fam Zheng wrote: [...] +subprocess.check_call([tar_cmd, + "--exclude-vcs", + "--exclud

Re: [Qemu-devel] [PATCH v4 03/10] tests: Add vm test lib

2017-08-29 Thread Kamil Rytarowski
On 29.08.2017 15:10, Philippe Mathieu-Daudé wrote: > Hi Fam, Kamil, > >> On 08/28/2017 02:47 PM, Fam Zheng wrote: > [...] >>> +subprocess.check_call([tar_cmd, >>> + "--exclude-vcs", >>> + "--exclude=tests/vm/*.img", >>> +

Re: [Qemu-devel] [PATCH v4 03/10] tests: Add vm test lib

2017-08-29 Thread Philippe Mathieu-Daudé
Hi Fam, Kamil, On 08/28/2017 02:47 PM, Fam Zheng wrote: [...] +    subprocess.check_call([tar_cmd, +   "--exclude-vcs", +   "--exclude=tests/vm/*.img", +   "--exclude=tests/vm/*.img.*", +   

Re: [Qemu-devel] [PATCH v4 03/10] tests: Add vm test lib

2017-08-29 Thread Philippe Mathieu-Daudé
On 08/28/2017 02:47 PM, Fam Zheng wrote: 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 t

Re: [Qemu-devel] [PATCH v4 03/10] tests: Add vm test lib

2017-08-29 Thread Daniel P. Berrange
On Tue, Aug 29, 2017 at 09:06:48AM -0300, Philippe Mathieu-Daudé wrote: > Hi Fam, > > On 08/28/2017 02:47 PM, Fam Zheng wrote: > > 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 SS

Re: [Qemu-devel] [PATCH v4 03/10] tests: Add vm test lib

2017-08-29 Thread Philippe Mathieu-Daudé
Hi Fam, On 08/28/2017 02:47 PM, Fam Zheng wrote: 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 t

[Qemu-devel] [PATCH v4 03/10] tests: Add vm test lib

2017-08-28 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