[libvirt PATCH] tests: do not include skipped tests in failedTests

Ján Tomko posted 1 patch 4 years, 1 month ago
Test syntax-check failed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/b9fa0d5f0e7ca9d42e966e3cc573d393486ab7ac.1583337340.git.jtomko@redhat.com
tests/testutils.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[libvirt PATCH] tests: do not include skipped tests in failedTests
Posted by Ján Tomko 4 years, 1 month ago
We recognize three return values from tests:
* OK    -> 0
* SKIP  -> EXIT_AM_SKIP
* ERROR -> anything else

Also check for EXIT_AM_SKIP when building a bitmap of failed tests,
otherwise the skipped tests would be printed in the suggested range
of tests that shoud be re-run.

Reported-by: Peter Krempa <pkrempa@redhat.com>
Signed-off-by: Ján Tomko <jtomko@redhat.com>
Fixes: cebb468ef5e82b8d4253e27ef70c67812cf93c5a
---
 tests/testutils.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/testutils.c b/tests/testutils.c
index 2f6d65364e..5fd81b70a2 100644
--- a/tests/testutils.c
+++ b/tests/testutils.c
@@ -172,7 +172,7 @@ virTestRun(const char *title,
             fprintf(stderr, "!");
     }
 
-    if (ret != 0)
+    if (ret != 0 && ret != EXIT_AM_SKIP)
         ignore_value(virBitmapSetBitExpand(failedTests, testCounter));
 
     g_unsetenv("VIR_TEST_MOCK_TESTNAME");
-- 
2.24.1

Re: [libvirt PATCH] tests: do not include skipped tests in failedTests
Posted by Peter Krempa 4 years, 1 month ago
On Wed, Mar 04, 2020 at 16:56:02 +0100, Ján Tomko wrote:
> We recognize three return values from tests:
> * OK    -> 0
> * SKIP  -> EXIT_AM_SKIP
> * ERROR -> anything else
> 
> Also check for EXIT_AM_SKIP when building a bitmap of failed tests,
> otherwise the skipped tests would be printed in the suggested range
> of tests that shoud be re-run.
> 
> Reported-by: Peter Krempa <pkrempa@redhat.com>
> Signed-off-by: Ján Tomko <jtomko@redhat.com>
> Fixes: cebb468ef5e82b8d4253e27ef70c67812cf93c5a

Reviewed-by: Peter Krempa <pkrempa@redhat.com>