From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:43657) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RnEN3-0004wZ-PT for qemu-devel@nongnu.org; Tue, 17 Jan 2012 14:07:02 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RnEN2-0004wz-O9 for qemu-devel@nongnu.org; Tue, 17 Jan 2012 14:07:01 -0500 Received: from mx1.redhat.com ([209.132.183.28]:16836) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RnEN2-0004wZ-HX for qemu-devel@nongnu.org; Tue, 17 Jan 2012 14:07:00 -0500 Message-ID: <4F15C6DC.6070708@redhat.com> Date: Tue, 17 Jan 2012 17:07:08 -0200 From: Lucas Meneghel Rodrigues MIME-Version: 1.0 References: <1326460457-19446-1-git-send-email-stefanha@linux.vnet.ibm.com> <1326460457-19446-16-git-send-email-stefanha@linux.vnet.ibm.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v5 15/15] test: add image streaming test cases List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi Cc: Kevin Wolf , Marcelo Tosatti , qemu-devel@nongnu.org, Luiz Capitulino On 01/13/2012 02:49 PM, Stefan Hajnoczi wrote: > Hi Lucas, > The Python script below verifies the image streaming feature. It's > built on the standard library "unittest" module, as well as QEMU's > qmp.py module. It spawns a qemu process and creates necessary disk > image files. The tests themselves issue QMP commands and check their > result or wait for QMP events to be raised. > > I think this sort of test could be done with kvm-autotest but I don't > see much usage of cmd_qmp() in client/tests/kvm/tests/. I'm curious > how you would approach this. The high-level steps are: > > 1. Create a backing file. > 2. Create a test QED image file using the backing file. > 3. Issue "block_stream device=drive0" to the running VM. This should > return no value. > 4. Wait for the BLOCK_JOB_COMPLETED QMP event and check its fields - > they must contain expected values. > 5. Ensure "query-block-job" does not show any active jobs anymore. > 6. Use qemu-io's map command to verify that the image stays compact > and isn't bloated with actual zero bytes (this is kind of unrelated to > the rest of the test). > > The other test cases share much of the same building blocks as > TestSingleDrive, so they are less interesting. > > Would it be possible to look at TestSingleDrive below and give a > kvm-autotest equivalent? Yes Stefan, sorry for the late reply. I was in FUDCon, therefore taking care of some Fedora related autotest stuff, but I'm putting on my todo list to create a KVM autotest equivalent of it. Cheers, Lucas