From patchwork Wed May 13 13:27:37 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alberto Garcia X-Patchwork-Id: 471883 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)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 39BBC140662 for ; Wed, 13 May 2015 23:30:36 +1000 (AEST) Received: from localhost ([::1]:48954 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YsWk6-0007zx-Bd for incoming@patchwork.ozlabs.org; Wed, 13 May 2015 09:30:34 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57071) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YsWhY-0006GH-6p for qemu-devel@nongnu.org; Wed, 13 May 2015 09:27:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YsWhS-0003SL-MY for qemu-devel@nongnu.org; Wed, 13 May 2015 09:27:56 -0400 Received: from smtp3.mundo-r.com ([212.51.32.191]:44220 helo=smtp4.mundo-r.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YsWhS-0003S1-FX; Wed, 13 May 2015 09:27:50 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AhMFABhQU1VbdWOb/2dsb2JhbABcgw+BMrMLBQGBBJhYAoE5TAEBAQEBAYELhCEBAQR5EFE8GxmIMAHIMwEBCCKGFolEZQcWhBcFjCKRJIx3iX8jYYMZOzGBA4FDAQEB X-IPAS-Result: AhMFABhQU1VbdWOb/2dsb2JhbABcgw+BMrMLBQGBBJhYAoE5TAEBAQEBAYELhCEBAQR5EFE8GxmIMAHIMwEBCCKGFolEZQcWhBcFjCKRJIx3iX8jYYMZOzGBA4FDAQEB X-IronPort-AV: E=Sophos;i="5.13,420,1427752800"; d="scan'208";a="360677723" Received: from fanzine.igalia.com ([91.117.99.155]) by smtp4.mundo-r.com with ESMTP; 13 May 2015 15:27:47 +0200 Received: from maestria.local.igalia.com ([192.168.10.14] helo=mail.igalia.com) by fanzine.igalia.com with esmtps (Cipher TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim) id 1YsWhP-0002es-BK; Wed, 13 May 2015 15:27:47 +0200 Received: from fanzine.local.igalia.com ([192.168.10.13] helo=perseus.local) by mail.igalia.com with esmtps (Cipher TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim) id 1YsWhO-0000SB-2u; Wed, 13 May 2015 15:27:46 +0200 Received: from berto by perseus.local with local (Exim 4.85) (envelope-from ) id 1YsWhM-0002qo-Jc; Wed, 13 May 2015 16:27:44 +0300 From: Alberto Garcia To: qemu-devel@nongnu.org Date: Wed, 13 May 2015 16:27:37 +0300 Message-Id: <75872228062bea3706721438fdd9d63ec3b15e7f.1431523498.git.berto@igalia.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: References: In-Reply-To: References: X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 212.51.32.191 Cc: Alberto Garcia , qemu-block@nongnu.org Subject: [Qemu-devel] [PATCH 07/11] qemu-iotests: fix test_stream_partial() 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 This test is streaming to the top layer using the intermediate image as the base. This is a mistake since block-stream never copies data from the base image and its backing chain, so this is effectively a no-op. In addition to fixing the base parameter, this patch also writes some data to the intermediate image before the test, so there's something to copy and the test is meaningful. Signed-off-by: Alberto Garcia Reviewed-by: Max Reitz Reviewed-by: Fam Zheng --- tests/qemu-iotests/030 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/qemu-iotests/030 b/tests/qemu-iotests/030 index 7ca9b25..6e6cb5a 100755 --- a/tests/qemu-iotests/030 +++ b/tests/qemu-iotests/030 @@ -35,6 +35,7 @@ class TestSingleDrive(iotests.QMPTestCase): qemu_img('create', '-f', iotests.imgfmt, '-o', 'backing_file=%s' % backing_img, mid_img) qemu_img('create', '-f', iotests.imgfmt, '-o', 'backing_file=%s' % mid_img, test_img) qemu_io('-f', 'raw', '-c', 'write -P 0x1 0 512', backing_img) + qemu_io('-f', iotests.imgfmt, '-c', 'write -P 0x1 524288 512', mid_img) self.vm = iotests.VM().add_drive("blkdebug::" + test_img) self.vm.launch() @@ -93,7 +94,7 @@ class TestSingleDrive(iotests.QMPTestCase): def test_stream_partial(self): self.assert_no_active_block_jobs() - result = self.vm.qmp('block-stream', device='drive0', base=mid_img) + result = self.vm.qmp('block-stream', device='drive0', base=backing_img) self.assert_qmp(result, 'return', {}) self.wait_until_completed()