From: Nadav Amit <nadav.amit@xxxxxxxxx> Currently, if a test is expected to fail, but surprisingly it passes, the test is considered as "failing". This means that running on old KVM-unit-tests on new KVM versions can falsely report failures. Fix it and simplify the logic. Signed-off-by: Nadav Amit <nadav.amit@xxxxxxxxx> --- lib/report.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/lib/report.c b/lib/report.c index ca9b4fd..8c8db14 100644 --- a/lib/report.c +++ b/lib/report.c @@ -96,10 +96,12 @@ static void va_report(const char *msg_fmt, puts("\n"); if (skip) skipped++; - else if (xfail && !pass) - xfailures++; - else if (xfail || !pass) - failures++; + else if (!pass) { + if (xfail) + xfailures++; + else + failures++; + } spin_unlock(&lock); } -- 2.17.1