From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:40811) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SUbx0-0001uM-3d for qemu-devel@nongnu.org; Wed, 16 May 2012 06:59:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SUbwx-0003Hi-Cg for qemu-devel@nongnu.org; Wed, 16 May 2012 06:59:25 -0400 Received: from mx1.redhat.com ([209.132.183.28]:11255) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SUbwx-0003Dm-4G for qemu-devel@nongnu.org; Wed, 16 May 2012 06:59:23 -0400 Message-ID: <4FB38880.4000401@redhat.com> Date: Wed, 16 May 2012 12:59:12 +0200 From: Kevin Wolf MIME-Version: 1.0 References: <1337073445-9679-1-git-send-email-zhihuili@linux.vnet.ibm.com> <1337073445-9679-3-git-send-email-zhihuili@linux.vnet.ibm.com> <4FB22171.7050104@redhat.com> <4FB222FF.8050905@redhat.com> <4FB22405.9060203@redhat.com> <4FB363F7.5080601@linux.vnet.ibm.com> In-Reply-To: <4FB363F7.5080601@linux.vnet.ibm.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH 2/3 v6] Replace bdrv_* to bdrv_aio_* functions in DMA mode in fdc.c List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Zhi Hui Li Cc: Paolo Bonzini , zhihuili@cn.ibm.com, =?UTF-8?B?SGVydsOpIFBvdXNzaW5lYXU=?= , qemu-devel@nongnu.org Am 16.05.2012 10:23, schrieb Zhi Hui Li: > On 2012=E5=B9=B405=E6=9C=8815=E6=97=A5 17:38, Paolo Bonzini wrote: >> Il 15/05/2012 11:33, Kevin Wolf ha scritto: >>>>> which blindly overwrites status2. Hence the new code was not writt= en >>>>> based on it. However, the new code is untested as far as I know. >>> In the thread of an earlier version of this series, I said that a qte= st >>> for floppy is required. This only confirms it. >> >> The problem with writing a qtest is that the spec is incredibly comple= x >> and obscure. It's probably even better to rip out code that cannot be >> tested properly, so you don't have to test it at all... >> >> (Mostly tongue-in-cheek of course. A qtest for basic read/write in PI= O >> and DMA modes is indeed a very good idea). >> >> Paolo >> >> >=20 > Yes , I think maybe Paolo is right. >=20 > Because the spec is incredibly complex and obscure and I am newer. > To write the whole code's qtest beyond my ability. I am afraid I can't=20 > finish it. so I want only do a qtest about basic read/write in PIO > and DMA modes. I don't know whether it is OK. Don't worry, any test is better than no test. We should try to add a qtest for basic operation to fdc-test.c. More detailed tests can be added later, or maybe we find good additions during review. I know that the floppy controller spec is hard to read. Writing test cases basically means translating it into clearer requirements. > (I don't know whether we can use qtest to replace the real test,=20 > especially on PIO mode 's test.) In theory yes, qtest can do everything if you have a complete set of test cases to cover the whole spec. In practice it will just help to find regressions earlier (floppy isn't tested very often manually). Kevin