On Wed, Feb 27, 2013 at 11:40:37PM +0200, Michael S. Tsirkin wrote: > On Wed, Feb 27, 2013 at 06:03:41PM -0300, Lucas Meneghel Rodrigues wrote: > > On 02/27/2013 05:44 PM, Michael S. Tsirkin wrote: > > >>>+Using qemu (supported since qemu 1.3): > > >>>+qemu-system-x86_64 -enable-kvm -device pc-testdev -serial stdio -device isa-debug-exit,iobase=0xf4,iosize=0x4 -kernel ./x86/msr.flat > > >> > > >>I think it is worth here to point out that with new qemu, after the > > >>unittest is done, the exit status of qemu is 1, different from the > > >>'old style', whose exit status in successful completion is 0. > > > > ^ "comment above" > > > > >> > > >>>+exec ${command} "$@" > > >> > > >>^ What about checking the exit status of qemu here and print > > >>something like "test $@ PASS" or "test $@ FAIL"? > > > > > >How do we know how to interpret it? > > >Overall I think it's best to rely on test output > > >than on return status. > > > > See comment above. Well, test output may be good for humans, but it > > is really not good for machines [1], that's why when the test suite > > was developed, the convention was to make qemu to exit with a given > > return code on success and others on failure. > > Right but given a qemu binary, how do I find out what it is on success > and what it is on failure? > Since you know what device you are using you know expected value for successful/failure. > > Anyway, it was just a > > suggestion, feel free to disregard it. > > > > [1] having to parse the output and try to guess what is a pass or > > fail is a mess at best, and should be avoided unless we positively > > have no saner way of doing it. -- Gleb. -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html