From patchwork Tue Nov 19 15:31:41 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Hajnoczi X-Patchwork-Id: 292478 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id AA6FB2C00A9 for ; Wed, 20 Nov 2013 02:32:20 +1100 (EST) Received: from localhost ([::1]:49955 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VinHk-00036e-In for incoming@patchwork.ozlabs.org; Tue, 19 Nov 2013 10:32:16 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39524) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VinHO-000360-C3 for qemu-devel@nongnu.org; Tue, 19 Nov 2013 10:32:00 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VinHH-0004X8-FK for qemu-devel@nongnu.org; Tue, 19 Nov 2013 10:31:54 -0500 Received: from mail-wi0-x235.google.com ([2a00:1450:400c:c05::235]:36547) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VinHH-0004X3-98 for qemu-devel@nongnu.org; Tue, 19 Nov 2013 10:31:47 -0500 Received: by mail-wi0-f181.google.com with SMTP id f4so5617004wiw.8 for ; Tue, 19 Nov 2013 07:31:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=ZlXvID06qWxpmE+wdbZZnoN3381hhGoet6z/NTkxTgY=; b=s14A0JCV0dmbfzHzIBQ9N+oQkYpzR5AQAdxhXxETJ+ruhVBwvfqwzrILb3T/hBNOuC oP6KOE++LeTIOYkxwxLz5fT2YZI1k7BG24cOb0uy7GRtZDQM4xgH9X+lSpo2aQCEB1KZ NiA8hHHIyy+TIscc2ql9woQhtcErn31+EEae8By7scpjkoVQwvxgJNDkyVPY11OVSO1D 9QyWDu3qxIWqmwkOOeGy9vrmFmFct6KBRTjP/K2Me7AsrZ2i0ZqOBAsjBvTkVgHyLcUV x5VM+p8GmwVtm8a2O28MTJzPHrg5G08mEjJFyuETJc58r2+1u9YZMys09zGV/sP0pFYl C2ew== X-Received: by 10.180.84.101 with SMTP id x5mr21247587wiy.58.1384875106442; Tue, 19 Nov 2013 07:31:46 -0800 (PST) Received: from localhost (95-91-233-26-dynip.superkabel.de. [95.91.233.26]) by mx.google.com with ESMTPSA id b7sm29322760wiz.8.2013.11.19.07.31.43 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 19 Nov 2013 07:31:45 -0800 (PST) Date: Tue, 19 Nov 2013 16:31:41 +0100 From: Stefan Hajnoczi To: Fam Zheng Message-ID: <20131119153141.GD3202@stefanha-thinkpad.redhat.com> References: <1384758111-24143-1-git-send-email-famz@redhat.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1384758111-24143-1-git-send-email-famz@redhat.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:400c:c05::235 Cc: kwolf@redhat.com, pbonzini@redhat.com, qemu-devel@nongnu.org, stefanha@redhat.com, mreitz@redhat.com Subject: Re: [Qemu-devel] [PATCH v5 0/4] Use blkdebug to make test deterministic X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org On Mon, Nov 18, 2013 at 03:01:47PM +0800, Fam Zheng wrote: > This adds "remove_break" command to block, which removes a break point defined > with "break". It is used in iotests.py to pause and resume drive in block job > cases to make the test deterministic. > > v5: Addressing Max's comments (thanks for reviewing) > [02] Resume all the requests. > [03] Fix event="" case. Change default value to None. > Change resume to bool. > [04] Change resume to bool > > v4: [01] Added. > [03] Add common method pair "pause_drive" and "resume_drive". > [04] Also fix 040, 055. > > Fam Zheng (4): > qemu-iotests: Drop local version of cancel_and_wait from 040 > blkdebug: add "remove_break" command > qemu-iotest: Add pause_drive and resume_drive methods > qemu-iotests: Make test case 030, 040 and 055 deterministic > > block.c | 13 +++++++++++++ > block/blkdebug.c | 27 +++++++++++++++++++++++++++ > include/block/block.h | 1 + > include/block/block_int.h | 2 ++ > qemu-io-cmds.c | 22 ++++++++++++++++++++++ > tests/qemu-iotests/030 | 16 +++++++++++----- > tests/qemu-iotests/040 | 19 +++---------------- > tests/qemu-iotests/055 | 15 +++++++++++---- > tests/qemu-iotests/iotests.py | 18 +++++++++++++++++- > 9 files changed, 107 insertions(+), 26 deletions(-) I get this failure after applying the patches onto my block-next tree: $ ./check -qcow2 055 QEMU -- /home/stefanha/qemu/tests/qemu-iotests/qemu QEMU_IMG -- /home/stefanha/qemu/tests/qemu-iotests/qemu-img QEMU_IO -- /home/stefanha/qemu/tests/qemu-iotests/qemu-io IMGFMT -- qcow2 (compat=1.1) IMGPROTO -- file PLATFORM -- Linux/x86_64 stefanha-thinkpad 3.11.8-300.fc20.x86_64 SOCKET_SCM_HELPER -- 055 9s ... [failed, exit status 1] - output mismatch (see 055.out.bad) Failures: 055 Failed 1 of 1 tests --- 055.out 2013-10-08 13:23:38.412934858 +0200 +++ 055.out.bad 2013-11-19 16:30:31.100351135 +0100 @@ -1,5 +1,15 @@ -.............. +.......F...... +====================================================================== +FAIL: test_pause (__main__.TestSingleDrive) +---------------------------------------------------------------------- +Traceback (most recent call last): + File "./055", line 80, in test_pause + self.assert_qmp(result, 'return[0]/offset', offset) + File "/home/stefanha/qemu/tests/qemu-iotests/iotests.py", line 232, in assert_qmp + self.assertEqual(result, value, 'values not equal "%s" and "%s"' % (str(result), str(value))) +AssertionError: values not equal "65536" and "0" + ---------------------------------------------------------------------- Ran 14 tests -OK +FAILED (failures=1)