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

Peter Krempa pkrempa at redhat.com
Mon Mar 6 15:24:35 UTC 2017


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




More information about the libvir-list mailing list