Received: from eggs.gnu.org ([2001:4830:134:3::10]:42050) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yle4Z-0002cP-2j for qemu-devel@nongnu.org; Fri, 24 Apr 2015 09:55:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Yle4Q-0005Vr-JR for qemu-devel@nongnu.org; Fri, 24 Apr 2015 09:55:15 -0400 From: Alberto Garcia In-Reply-To: <553A42FA.7090503@redhat.com> References: <57782138d21e277dddee0fd348a8ba437411bd64.1429875134.git.berto@igalia.com> <553A42FA.7090503@redhat.com> Date: Fri, 24 Apr 2015 15:55:00 +0200 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: [Qemu-devel] [PATCH 08/11] qemu-iotests: add no-op streaming test List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Max Reitz , qemu-devel@nongnu.org Cc: Kevin Wolf , qemu-block@nongnu.org, Stefan Hajnoczi On Fri 24 Apr 2015 03:19:54 PM CEST, Max Reitz wrote: >> This patch updates test_stream_partial() to test that the >> block-stream operation never copies data from the image specified as >> base. > > I think it would be better to add this as an own test case. But I > won't oppose adding it as a special case of test_stream_partial > either, because strictly speaking, streaming nothing is a special case > of streaming partially. That was the idea, but of course it can be moved to a new test, it's also fine with me. >> + self.assertNotEqual(qemu_io('-f', iotests.imgfmt, '-c', 'map', mid_img), >> + qemu_io('-f', iotests.imgfmt, '-c', 'map', test_img), >> + 'image file map matches backing file after a no-op') > > Well, you haven't really proven anything by doing this, except that > the mid_img hasn't been streamed completely into test_img... What you > want to prove is that test_img is empty after streaming, right? That's right, but what scenario would that be? A streaming operation that is completed without errors and leaves partial data on the destination image? There's only 512 bytes written in mid_img for this test case. If we suspect that it can go wrong maybe we should start comparing more things than just the qemu_io map output... Berto