2016-03-02 17:05+0100, Paolo Bonzini: > On 02/03/2016 16:42, Radim Krčmář wrote: >>> > I'm not sure how you would have something on stderr, except on the very >>> > last line? The idea being that 1) the test only writes to stdout 2) >>> > QEMU only writes to stderr 3) QEMU exits after writing to stderr. If >>> > this is true, the proposed assignment/printf pair works just fine. >> >> QEMU prints some warnings without immediately exiting, e.g. >> warning: host doesn't support requested feature: CPUID.01H:ECX.vmx [bit 5] >> >> So it's possible that stdout is printed after stderr. Preserving the >> visible output could be less confusing in these rare cases. I agree >> with the late printf if you think that the ugly code is not worth it. > > Perhaps we can add an "stderr:" line if $errors is not empty, so that it > is clear that the order is not maintained. I prefer to print stderr afterwards without any separator. ("stderr:\n" taints stderr and the information provided by it isn't that hard to figure out from the output or code. I think that this line would attract attention, because it is an unexpected element, and therefore waste more time than silently reordering the output. The line might be useful when we merge stdout and stderr into one stream, but that doesn't happen at this point.) -- 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