[libvirt] [PATCH 0/4] Refactor and fix sysinfo data retrieval and the testing of the code

Peter Krempa posted 4 patches 7 years, 1 month ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/cover.1488813740.git.pkrempa@redhat.com
src/Makefile.am                                  |   2 +-
src/libvirt_private.syms                         |   7 +
src/util/virsysinfo.c                            | 172 ++++++++++++-----------
src/util/virsysinfopriv.h                        |  44 ++++++
tests/sysinfodata/aarch64-moonshotcpuinfo.data   |  72 ++++++++++
tests/sysinfodata/aarch64-moonshotsysinfo.expect |   1 +
tests/sysinfotest.c                              | 115 ++++-----------
7 files changed, 241 insertions(+), 172 deletions(-)
create mode 100644 src/util/virsysinfopriv.h
create mode 100644 tests/sysinfodata/aarch64-moonshotcpuinfo.data
create mode 100644 tests/sysinfodata/aarch64-moonshotsysinfo.expect
[libvirt] [PATCH 0/4] Refactor and fix sysinfo data retrieval and the testing of the code
Posted by Peter Krempa 7 years, 1 month ago
src/util/virsysinfo.c was a big mess of conditionally compiled functions with
the same name for each platform. Also the test was run only for the current
platform. Remove the churn and make all tests run on all platforms since there
is no platform dependency.

Peter Krempa (4):
  util: sysinfo: Reduce amount of conditionally compiled code
  tests: sysinfo: Export virSysinfoSetup via the private header
  tests: sysinfo: Run all sysinfo tests all the time
  tests: sysinfo: Add test data for HP moonshot aarch64 box

 src/Makefile.am                                  |   2 +-
 src/libvirt_private.syms                         |   7 +
 src/util/virsysinfo.c                            | 172 ++++++++++++-----------
 src/util/virsysinfopriv.h                        |  44 ++++++
 tests/sysinfodata/aarch64-moonshotcpuinfo.data   |  72 ++++++++++
 tests/sysinfodata/aarch64-moonshotsysinfo.expect |   1 +
 tests/sysinfotest.c                              | 115 ++++-----------
 7 files changed, 241 insertions(+), 172 deletions(-)
 create mode 100644 src/util/virsysinfopriv.h
 create mode 100644 tests/sysinfodata/aarch64-moonshotcpuinfo.data
 create mode 100644 tests/sysinfodata/aarch64-moonshotsysinfo.expect

-- 
2.11.0

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH 0/4] Refactor and fix sysinfo data retrieval and the testing of the code
Posted by Michal Privoznik 7 years, 1 month ago
On 03/06/2017 04:24 PM, Peter Krempa wrote:
> src/util/virsysinfo.c was a big mess of conditionally compiled functions with
> the same name for each platform. Also the test was run only for the current
> platform. Remove the churn and make all tests run on all platforms since there
> is no platform dependency.
> 
> Peter Krempa (4):
>   util: sysinfo: Reduce amount of conditionally compiled code
>   tests: sysinfo: Export virSysinfoSetup via the private header
>   tests: sysinfo: Run all sysinfo tests all the time
>   tests: sysinfo: Add test data for HP moonshot aarch64 box
> 
>  src/Makefile.am                                  |   2 +-
>  src/libvirt_private.syms                         |   7 +
>  src/util/virsysinfo.c                            | 172 ++++++++++++-----------
>  src/util/virsysinfopriv.h                        |  44 ++++++
>  tests/sysinfodata/aarch64-moonshotcpuinfo.data   |  72 ++++++++++
>  tests/sysinfodata/aarch64-moonshotsysinfo.expect |   1 +
>  tests/sysinfotest.c                              | 115 ++++-----------
>  7 files changed, 241 insertions(+), 172 deletions(-)
>  create mode 100644 src/util/virsysinfopriv.h
>  create mode 100644 tests/sysinfodata/aarch64-moonshotcpuinfo.data
>  create mode 100644 tests/sysinfodata/aarch64-moonshotsysinfo.expect
> 

ACK

Michal

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list