On Tue, Jun 17, 2014 at 02:46:30PM +0200, Paolo Bonzini wrote: > Il 17/06/2014 14:21, Andrew Jones ha scritto: > >would look better as > > > >report(msg1, cond1) -> FAIL > >report_skip(msg2, !cond1, cond1 && cond2) -> SKIP > >report_skip(msg3, !cond1, cond1 && cond3) -> SKIP > > I think a lot of the time there is other code before the report that you > want to skip. Is anything more a "report_skip(msg1);" (that print a SKIP > message) that useful? So you can do > > if (!(msr & 0x1000) { > report_skip("Frob bit 12 of msr"); This is enough to output "msg: SKIP" in a format consistent with PASS and FAIL. However, it's not necessarily enough to output the test case too. E.g. we'd need if (cond1) { /* do stuff to prepare for report conditions */ report("msg1", cond2); report("msg2", cond3); } else { report_skip("msg1"); report_skip("msg2"); } It'd be nice to avoid the message redundancy in the cases that we're able to. However, ... > return; > } > > Unless what you really want is not a SKIP but an expected failure, then I ...yes, I was thinking along the lines of an 'expected failure' report, not the above issue, and 'XFAIL' does convey that idea better. > agree with the idea. Something like > > report_xfail(msg2, cond1, cond2) > > would print: > > PASS if cond1 = false, cond2 = true > FAIL if cond1 = false, cond2 = false > XPASS if cond1 = true, cond2 = true > XFAIL if cond1 = true, cond2 = false > > An XPASS would ultimately exit with status 1, just like a FAIL. Yeah, XPASS is good. report_skip would make PASS ambiguous. Not good. I'll drop the idea of outputting SKIP, switch to report_xfail, and send a v2. Thanks, drew > > Paolo > -- > 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 -- 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