From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:46040) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UhGKK-0007VI-HX for qemu-devel@nongnu.org; Tue, 28 May 2013 05:36:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UhGKA-0008VO-IY for qemu-devel@nongnu.org; Tue, 28 May 2013 05:36:20 -0400 Date: Tue, 28 May 2013 11:36:02 +0200 From: Kevin Wolf Message-ID: <20130528093602.GB5642@dhcp-200-207.str.redhat.com> References: <1369729127-24499-1-git-send-email-afaerber@suse.de> <20130528082743.GC2854@dhcp-200-207.str.redhat.com> <51A46ED1.7060503@suse.de> <20130528091855.GA5642@dhcp-200-207.str.redhat.com> <51A477C0.90507@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <51A477C0.90507@redhat.com> Subject: Re: [Qemu-devel] [PATCH] ide: Set BSY bit during FLUSH List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: stefano.stabellini@eu.citrix.com, Stefan Hajnoczi , Heiko Rommel , qemu-devel@nongnu.org, Bruce Rogers , "Gonglei (Arei)" , qemu-stable , Andreas =?iso-8859-1?Q?F=E4rber?= Am 28.05.2013 um 11:24 hat Paolo Bonzini geschrieben: > Il 28/05/2013 11:18, Kevin Wolf ha scritto: > >>> The other part why I haven't sent a fix yet is that I don't have a test > >>> case for it. > >> > >> Temporarily add a sleep(31) in qemu_fdatasync()? > >> > >> I was lazy in testing with -snapshot to not corrupt my disk image, which > >> would not trigger the same issue since qcow2-backed AFAIU. > >> > >>> I guess I need to extend blkdebug first before this can be > >>> reliably tested by qtest. > >> > >> It can't, since it's not a pure device emulation issue but depends on > >> the relative timing of filesystem operations and subsequent commands. > > > > That's why you need to take influence on the timing. It's no excuse for > > merging without a test case. If we only ever tested devices that have no > > relation to the outside world, our testing would be pretty useless and > > always stay as bad as it is today in many areas. > > I don't think the qtest would be timing dependent. The Linux testcase > is timing dependent, but for the qtest all you need to check is "is BUSY > set during a flush?". This can be done with blkdebug suspend/resume, > except that there is no way to call bdrv_debug_resume from QEMU. That's exactly what I was talking about, suspending a request is taking influence on its timing. I'm looking into this right now. (And it's not just resume, bdrv_debug_suspend can't be called from QEMU either) In fact, I'm checking whether we can have a monitor command to issue qemu-io commands, which will be more generally useful for test cases. We just need to make obvious that it doesn't become an ABI. Maybe prefix it with "__org.qemu.debug-" or something like that. Kevin