From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43137) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Win2s-0006zv-RN for qemu-devel@nongnu.org; Fri, 09 May 2014 11:49:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Win2n-0003Up-Ob for qemu-devel@nongnu.org; Fri, 09 May 2014 11:49:10 -0400 Received: from mail-ee0-x22d.google.com ([2a00:1450:4013:c00::22d]:64753) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Win2n-0003UZ-0a for qemu-devel@nongnu.org; Fri, 09 May 2014 11:49:05 -0400 Received: by mail-ee0-f45.google.com with SMTP id d49so2808034eek.32 for ; Fri, 09 May 2014 08:49:04 -0700 (PDT) Date: Fri, 9 May 2014 17:49:00 +0200 From: Stefan Hajnoczi Message-ID: <20140509154900.GA1437@stefanha-thinkpad.redhat.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Subject: Re: [Qemu-devel] [PATCH v5 0/3] Add common QEMU control functionality to qemu-iotests List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jeff Cody Cc: kwolf@redhat.com, famz@redhat.com, qemu-devel@nongnu.org, stefanha@redhat.com, benoit@irqsave.net On Wed, Apr 30, 2014 at 10:55:07AM -0400, Jeff Cody wrote: > Prior cover letter details: > > Changes from v4: > > > Patch 1: - Allow option in _send_qemu_cmd() to not exit on error, similar > to _timed_wait_for() (Thanks Fam) > - Renamed the option variable to not exit on error, to make > it clearer the function. > - Updated commit message to reflect the above 2 changes > > Patch 2: - Fixed typo in commit message (thanks Fam) > - Added Fam's reviewed-by > > Patch 3: - Drop unneeded "cluster_size=512" override from image creation > (Thanks Kam) > - Write pattern to the image, and verify the pattern (Thanks Fam) > - Added Fam's reviewed-by > > > > Changes from v3: > > Patch 1: - Make bash version check work with >= 5 as well (Thanks Kevin) > - Suppress error message if killing non-existent PID > - Close QEMU fifo in/out file descriptors on cleanup (Thanks Kevin) > - Remove extra newline at the end of the file (Thanks Kevin) > > Patch 2: - Update commit message to document the commandline change > of accel=qtest due to Patch 1 (Thanks Kevin) > > Patch 3: - Whitespace cleanup (Thanks Kevin) > - Cleanly flush and exit QEMU on vm2, and run > qemu-img check -r all (Thanks Kevin) > - YATNC - Yet Another Test Number Conflict; > move test from 090 to 091 (Thanks Kevin) > > Patches 4,5: Already applied to Kevin's block tree > > > Changes from v2: > > Updated Reviewed-by for Fam and Benoit (Benoit's from the v1 patch, I forgot to > add those to v2) > > Patch 1: * updated commit message (Thanks Fam) > * Addded '-machine accel=qtest' to qemu launch args (Thanks Fam) > Patch 3: * Moved from test 089 -> test 090 to avoid collision with > Fam's series (Thanks Fam) > > Changes from v1: > > Patch 1: * Fixed commit message, clarified comments (Thanks Benoît) > * Changed 'shift' line to be POSIX-friendly, instead of > relying on bashism (Thanks Eric) > * Added ability to repeat qmp or hmp commands an arbitrary > number of times > Patch 3: New patch, for live migration > > Original Description: > > This adds some common functionality to control QEMU for qemu-iotests. > > Additionally, test 085 is updated to use this new functionality. > > Some minor fixups along the way, to clear up spaced pathname issues, > for common.rc, test 019, and test 086. > > > Jeff Cody (3): > block: qemu-iotests - add common.qemu, for bash-controlled qemu tests > block: qemu-iotests - update 085 to use common.qemu > block: qemu-iotests - test for live migration > > tests/qemu-iotests/085 | 73 +++------------ > tests/qemu-iotests/091 | 105 ++++++++++++++++++++++ > tests/qemu-iotests/091.out | 28 ++++++ > tests/qemu-iotests/common.qemu | 200 +++++++++++++++++++++++++++++++++++++++++ > tests/qemu-iotests/group | 1 + > 5 files changed, 346 insertions(+), 61 deletions(-) > create mode 100755 tests/qemu-iotests/091 > create mode 100644 tests/qemu-iotests/091.out > create mode 100644 tests/qemu-iotests/common.qemu Although I think bash is the wrong tool for writing these sorts of tests (hint: you had to use eval!), let's take this test case. I will be working on documenting and making iotests.py easier to work with - Kevin has requested the ability to make the QMP interaction diffable so tests can be easily debugged. Thanks, applied to my block tree: https://github.com/stefanha/qemu/commits/block Stefan