[PATCH 0/6] tests: Detect for unused files

Michal Privoznik via Devel posted 6 patches 1 week ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/cover.1778154292.git.mprivozn@redhat.com
tests/cputest.c                               | 103 ++++++++++++++----
tests/cputestdata/ppc64-guest-host-model.xml  |   3 -
.../ppc64-host+guest-host-model.xml           |   3 -
tests/cputestdata/x86_64-bogus-vendor.xml     |   4 -
tests/networkxmlconfdata/passthrough-pf.conf  |  11 --
tests/networkxmlconftest.c                    |  35 +++++-
tests/qemuxmlconftest.c                       |  82 ++++----------
tests/testutils.c                             |  58 ++++++++++
tests/testutils.h                             |  14 +++
9 files changed, 207 insertions(+), 106 deletions(-)
delete mode 100644 tests/cputestdata/ppc64-guest-host-model.xml
delete mode 100644 tests/cputestdata/ppc64-host+guest-host-model.xml
delete mode 100644 tests/cputestdata/x86_64-bogus-vendor.xml
delete mode 100644 tests/networkxmlconfdata/passthrough-pf.conf
[PATCH 0/6] tests: Detect for unused files
Posted by Michal Privoznik via Devel 1 week ago
One of the functionality implemented into qemuxmlconftest is to detect
unused test files. This generalizes the idea and implements it into two
other tests (networkxmlconftest and cputest). But if we find this
useful, it can be implemented into the rest of the tests.

Now, I was contemplating an idea of turning `existingTestCases` variable
into a global one (just like we have testDebug, testVerbose, etc.). It
would make the changes a lot cleaner but also it's a global variable
after all. What do you think?

Michal Prívozník (6):
  testutils: Introduce unused file detection
  qemuxmlconftest: Switch to virTestEnumerateTestCases()
  networkxmlconfdata: Remove passthrough-pf.conf
  networkxmlconftest: Detect unused files
  cputestdata: Drop unused files
  cputest: Detect unused files

 tests/cputest.c                               | 103 ++++++++++++++----
 tests/cputestdata/ppc64-guest-host-model.xml  |   3 -
 .../ppc64-host+guest-host-model.xml           |   3 -
 tests/cputestdata/x86_64-bogus-vendor.xml     |   4 -
 tests/networkxmlconfdata/passthrough-pf.conf  |  11 --
 tests/networkxmlconftest.c                    |  35 +++++-
 tests/qemuxmlconftest.c                       |  82 ++++----------
 tests/testutils.c                             |  58 ++++++++++
 tests/testutils.h                             |  14 +++
 9 files changed, 207 insertions(+), 106 deletions(-)
 delete mode 100644 tests/cputestdata/ppc64-guest-host-model.xml
 delete mode 100644 tests/cputestdata/ppc64-host+guest-host-model.xml
 delete mode 100644 tests/cputestdata/x86_64-bogus-vendor.xml
 delete mode 100644 tests/networkxmlconfdata/passthrough-pf.conf

-- 
2.53.0

Re: [PATCH 0/6] tests: Detect for unused files
Posted by Ján Tomko via Devel 1 week ago
On a Thursday in 2026, Michal Privoznik via Devel wrote:
>One of the functionality implemented into qemuxmlconftest is to detect
>unused test files. This generalizes the idea and implements it into two
>other tests (networkxmlconftest and cputest). But if we find this
>useful, it can be implemented into the rest of the tests.
>
>Now, I was contemplating an idea of turning `existingTestCases` variable
>into a global one (just like we have testDebug, testVerbose, etc.). It
>would make the changes a lot cleaner but also it's a global variable
>after all. What do you think?
>
>Michal Prívozník (6):
>  testutils: Introduce unused file detection
>  qemuxmlconftest: Switch to virTestEnumerateTestCases()
>  networkxmlconfdata: Remove passthrough-pf.conf
>  networkxmlconftest: Detect unused files
>  cputestdata: Drop unused files
>  cputest: Detect unused files
>

Reviewed-by: Ján Tomko <jtomko@redhat.com>

Jano