Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package libvirt for openSUSE:Factory checked 
in at 2022-11-13 18:08:49
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/libvirt (Old)
 and      /work/SRC/openSUSE:Factory/.libvirt.new.1597 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "libvirt"

Sun Nov 13 18:08:49 2022 rev:364 rq:1035317 version:8.9.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/libvirt/libvirt.changes  2022-11-04 
17:31:52.355831605 +0100
+++ /work/SRC/openSUSE:Factory/.libvirt.new.1597/libvirt.changes        
2022-11-13 18:08:50.979399922 +0100
@@ -1,0 +2,7 @@
+Fri Nov 11 16:23:28 UTC 2022 - James Fehlig <jfeh...@suse.com>
+
+- tests: Fix libxlxml2domconfigtest
+  f81ee7b5-tests-Fix-libxlxml2domconfigtest.patch
+  bsc#1205204
+
+-------------------------------------------------------------------

New:
----
  f81ee7b5-tests-Fix-libxlxml2domconfigtest.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ libvirt.spec ++++++
--- /var/tmp/diff_new_pack.lvDetM/_old  2022-11-13 18:08:51.907405314 +0100
+++ /var/tmp/diff_new_pack.lvDetM/_new  2022-11-13 18:08:51.915405361 +0100
@@ -304,6 +304,7 @@
 Source99:       baselibs.conf
 Source100:      %{name}-rpmlintrc
 # Upstream patches
+Patch0:         f81ee7b5-tests-Fix-libxlxml2domconfigtest.patch
 # Patches pending upstream review
 Patch100:       libxl-dom-reset.patch
 Patch101:       network-don-t-use-dhcp-authoritative-on-static-netwo.patch

++++++ f81ee7b5-tests-Fix-libxlxml2domconfigtest.patch ++++++
>From e0d5a7c51a70da651c98f18f188743efcff8813b Mon Sep 17 00:00:00 2001
From: Jim Fehlig <jfeh...@suse.com>
Date: Thu, 10 Nov 2022 17:55:38 -0700
Subject: [PATCH] tests: Fix libxlxml2domconfigtest

Downstream CI recently encountered failures of libxlxml2domconfigtest when
building libvirt packages against Xen 4.17 rc3 packages. The test fails on
vnuma_hvm config, where suddently the actual json produced by
libxl_domain_config_to_json() contains a 'pnode' entry in the 'vnuma_nodes'
list, which is absent in the expected json. It appears the test has thus far
passed by luck. E.g. I was able to make the test pass in the failing
environment by changing the meson buildtype from debugoptimized to debug.

When a VM config contains vnuma settings, libxlMakeVnumaList() checks if the
number of requested vnuma nodes exceeds the number of physical nodes. The
number of physical nodes is retrieved with libxl_get_physinfo(), which can
return wildly different results in the context of unit tests. This change
mocks libxl_get_physinfo() to return consistent results. All fields of the
libxl_physinfo struct are set to 0 except nr_nodes, which is set to 6 to
ensure the vnuma_hvm configuration is properly tested.

Signed-off-by: Jim Fehlig <jfeh...@suse.com>
Reviewed-by: Michal Privoznik <mpriv...@redhat.com>
(cherry picked from commit f81ee7b549242c93bead8c8772bb31047da00415)
---
 tests/libxlmock.c                           | 15 +++++++++++++++
 tests/libxlxml2domconfigdata/vnuma-hvm.json |  5 +++++
 2 files changed, 20 insertions(+)

Index: libvirt-8.9.0/tests/libxlmock.c
===================================================================
--- libvirt-8.9.0.orig/tests/libxlmock.c
+++ libvirt-8.9.0/tests/libxlmock.c
@@ -70,6 +70,21 @@ VIR_MOCK_IMPL_RET_ARGS(libxl_get_version
     return &info;
 }
 
+VIR_MOCK_IMPL_RET_ARGS(libxl_get_physinfo,
+                       int,
+                       libxl_ctx *, ctx,
+                       libxl_physinfo *, physinfo)
+{
+    memset(physinfo, 0, sizeof(*physinfo));
+    physinfo->nr_nodes = 6;
+
+    /* silence gcc warning about unused function */
+    if (0)
+        real_libxl_get_physinfo(ctx, physinfo);
+
+    return 0;
+}
+
 VIR_MOCK_STUB_RET_ARGS(libxl_get_free_memory,
                        int, 0,
                        libxl_ctx *, ctx,
Index: libvirt-8.9.0/tests/libxlxml2domconfigdata/vnuma-hvm.json
===================================================================
--- libvirt-8.9.0.orig/tests/libxlxml2domconfigdata/vnuma-hvm.json
+++ libvirt-8.9.0/tests/libxlxml2domconfigdata/vnuma-hvm.json
@@ -39,6 +39,7 @@
                     41,
                     51
                 ],
+                "pnode": 1,
                 "vcpus": [
                     1
                 ]
@@ -53,6 +54,7 @@
                     31,
                     41
                 ],
+                "pnode": 2,
                 "vcpus": [
                     2
                 ]
@@ -67,6 +69,7 @@
                     21,
                     31
                 ],
+                "pnode": 3,
                 "vcpus": [
                     3
                 ]
@@ -81,6 +84,7 @@
                     10,
                     21
                 ],
+                "pnode": 4,
                 "vcpus": [
                     4
                 ]
@@ -95,6 +99,7 @@
                     21,
                     10
                 ],
+                "pnode": 5,
                 "vcpus": [
                     5
                 ]

Reply via email to