Am 16.05.2012 10:23, schrieb Zhi Hui Li: > On 2012年05月15日 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 written >>>>> 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 qtest >>> for floppy is required. This only confirms it. >> >> The problem with writing a qtest is that the spec is incredibly complex >> 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 PIO >> and DMA modes is indeed a very good idea). >> >> Paolo >> >> > > Yes , I think maybe Paolo is right. > > 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 > 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, > 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