From patchwork Tue Mar 29 02:49:35 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeff Cody X-Patchwork-Id: 602717 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3qYwHZ2wdgz9t7M for ; Tue, 29 Mar 2016 13:50:18 +1100 (AEDT) Received: from localhost ([::1]:44162 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1akjjU-0000Bj-NF for incoming@patchwork.ozlabs.org; Mon, 28 Mar 2016 22:50:16 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39736) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1akjj0-0007gK-Hc for qemu-devel@nongnu.org; Mon, 28 Mar 2016 22:49:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1akjiz-0001Oa-Hq for qemu-devel@nongnu.org; Mon, 28 Mar 2016 22:49:46 -0400 Received: from mx1.redhat.com ([209.132.183.28]:54995) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1akjix-0001Na-GV; Mon, 28 Mar 2016 22:49:43 -0400 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (Postfix) with ESMTPS id 0B0A5C049E1B; Tue, 29 Mar 2016 02:49:43 +0000 (UTC) Received: from localhost (ovpn-112-65.phx2.redhat.com [10.3.112.65]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u2T2nfGf006862 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA256 bits=256 verify=NO); Mon, 28 Mar 2016 22:49:42 -0400 From: Jeff Cody To: qemu-block@nongnu.org Date: Mon, 28 Mar 2016 22:49:35 -0400 Message-Id: <1459219776-15818-3-git-send-email-jcody@redhat.com> In-Reply-To: <1459219776-15818-1-git-send-email-jcody@redhat.com> References: <1459219776-15818-1-git-send-email-jcody@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.27 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Cc: peter.maydell@linaro.org, jcody@redhat.com, qemu-devel@nongnu.org Subject: [Qemu-devel] [PULL 2/3] 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 From: Alberto Garcia 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 Message-id: 2efa304da38b32d47c120ce728568a589c5a3afc.1458566441.git.berto@igalia.com Signed-off-by: Jeff Cody --- 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 32469ef..48a924c 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()