On 14 February 2013 12:17, Paolo Bonzini <pbonz...@redhat.com> wrote:
> Il 14/02/2013 12:44, Andreas Färber ha scritto:
>> What seems more likely is that we would
>> have written a qtest which checked for the same wrong
>> behaviour we incorrectly put into the code, which
>> doesn't help anybody.
>
> Hmm, that's not how I write tests...  You write them as black boxes, and
> if things don't match what you expect, you either replicate the qtest on
> real hardware or check the datasheet.

In this case the data sheet was ambiguous. The only way
to avoid the bug would be to examine actual hardware
behaviour, or to have different people write the test and
the code. If the patch author had written the test case
they'd just have resolved the ambiguity in the same (wrong)
way in both code and test.

-- PMM

Reply via email to