Add basic support for Guest Features such as: - cpu-hotplug - hyperv - hyperv-evmcs - hyperv-frequencies - hyperv-ipi - hyperv-reenlightenment - hyperv-relaxed - hyperv-reset - hyperv-runtime - hyperv-spinlocks - hyperv-synic - hyperv-tlbflush - hyperv-vapic - hyperv-vendor-id - hyperv-vpindex The Guest Features are, by default, inherited by systems which either clone or derive-from another systems. This series adds the machinery needed for: https://gitlab.com/libosinfo/osinfo-db/issues/12 - Changes since v1: https://www.redhat.com/archives/libosinfo/2018-November/msg00250.html This is a totally *new* implementation as the v1 as *really* *overcomplicated* and was adding pieces that were not needed at all (as FeatureLinks and all the code refactoring done to accomodate that). - Changes since v2: https://www.redhat.com/archives/libosinfo/2019-January/msg00037.html A cleanup has been done in the implementation proposed during v2 in order to make things even simplier. Also, Daniel's comment has been addressed about which features make or do not make sense to be present in the list. Fabiano Fidêncio (11): osinfo: Introduce OsinfoFeature tests: Add basic test for OsinfoFeature osinfo: Introduce OsinfoFeatureList tests: Add basic test for OsinfoListFeature os: Make os aware of Guest Features loader: Make loader aware of Guest Features test-os: Add basic tests for Guest Features test-os: Add test_features_inheritance_basic() test-os: Add test_features_inheritance_removal() os: Add osinfo_os_is_feature_supported() test-os: Add test_features_supported() .gitignore | 2 + osinfo/Makefile.am | 4 + osinfo/libosinfo.syms | 15 + osinfo/osinfo.h | 2 + osinfo/osinfo_feature.c | 313 ++++++++++++++++++ osinfo/osinfo_feature.h | 90 +++++ osinfo/osinfo_feature_private.h | 38 +++ osinfo/osinfo_featurelist.c | 88 +++++ osinfo/osinfo_featurelist.h | 75 +++++ osinfo/osinfo_loader.c | 71 ++++ osinfo/osinfo_os.c | 171 ++++++++++ osinfo/osinfo_os.h | 5 + po/POTFILES.in | 1 + tests/Makefile.am | 10 + .../test-os-features-basic-1.xml | 21 ++ .../test-os-features-basic-2-clone.xml | 10 + .../test-os-features-basic-2.xml | 10 + .../test-os-features-removed-1.xml | 14 + .../test-os-features-removed-2-clone.xml | 10 + .../test-os-features-removed-2.xml | 10 + .../test-os-features-removed-3.xml | 15 + .../test-os-features-removed-4-clone.xml | 10 + .../test-os-features-removed-4.xml | 10 + .../test-os-features-supported.xml | 21 ++ tests/test-feature.c | 68 ++++ tests/test-featurelist.c | 219 ++++++++++++ tests/test-os.c | 209 ++++++++++++ 27 files changed, 1512 insertions(+) create mode 100644 osinfo/osinfo_feature.c create mode 100644 osinfo/osinfo_feature.h create mode 100644 osinfo/osinfo_feature_private.h create mode 100644 osinfo/osinfo_featurelist.c create mode 100644 osinfo/osinfo_featurelist.h create mode 100644 tests/dbdata/os/libosinfo.org/test-os-features-basic-1.xml create mode 100644 tests/dbdata/os/libosinfo.org/test-os-features-basic-2-clone.xml create mode 100644 tests/dbdata/os/libosinfo.org/test-os-features-basic-2.xml create mode 100644 tests/dbdata/os/libosinfo.org/test-os-features-removed-1.xml create mode 100644 tests/dbdata/os/libosinfo.org/test-os-features-removed-2-clone.xml create mode 100644 tests/dbdata/os/libosinfo.org/test-os-features-removed-2.xml create mode 100644 tests/dbdata/os/libosinfo.org/test-os-features-removed-3.xml create mode 100644 tests/dbdata/os/libosinfo.org/test-os-features-removed-4-clone.xml create mode 100644 tests/dbdata/os/libosinfo.org/test-os-features-removed-4.xml create mode 100644 tests/dbdata/os/libosinfo.org/test-os-features-supported.xml create mode 100644 tests/test-feature.c create mode 100644 tests/test-featurelist.c -- 2.19.2 _______________________________________________ Libosinfo mailing list Libosinfo@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libosinfo