aeb9054b98
- Update to libvirt 7.3.0 - libvirt-admin package merged with libvirt-daemon - libvirt-bash-completion package merged with libvirt-client and libvirt-daemon packages - Many incremental improvements and bug fixes, see https://libvirt.org/news.html - Dropped patches: suse-bump-xen-version.patch - Added patches: libxl-add-mocking.patch OBS-URL: https://build.opensuse.org/request/show/893851 OBS-URL: https://build.opensuse.org/package/show/Virtualization/libvirt?expand=0&rev=888
47 lines
1.6 KiB
Diff
47 lines
1.6 KiB
Diff
commit 898598bfc8605a889a1389535597eca22943390f
|
|
Author: Jim Fehlig <jfehlig@suse.com>
|
|
Date: Mon May 17 11:52:25 2021 -0600
|
|
|
|
tests: libxl: Mock xs_open and xs_close
|
|
|
|
The Xen-related unit tests are failing against the recently released
|
|
Xen 4.15. Xen commit 90c9f9f4dd changed the implementation of
|
|
libxl_ctx_alloc to use xs_open instead of xs_daemon_open. libvirt has
|
|
already mocked xs_daemon-{open,close} and others to allow using libxl
|
|
in confined build environments. This patch adds xs_{open,close} to the
|
|
list of functions mocked in libxlmock.c
|
|
|
|
https://github.com/xen-project/xen/commit/90c9f9f4ddd55e11be0506bff10c6237507c6e0d
|
|
|
|
Signed-off-by: Jim Fehlig <jfehlig@suse.com>
|
|
|
|
Index: libvirt-7.3.0/tests/libxlmock.c
|
|
===================================================================
|
|
--- libvirt-7.3.0.orig/tests/libxlmock.c
|
|
+++ libvirt-7.3.0/tests/libxlmock.c
|
|
@@ -39,6 +39,14 @@ VIR_MOCK_IMPL_RET_VOID(xs_daemon_open,
|
|
return (void*)0x1;
|
|
}
|
|
|
|
+VIR_MOCK_IMPL_RET_ARGS(xs_open,
|
|
+ struct xs_handle *,
|
|
+ unsigned long, flags)
|
|
+{
|
|
+ VIR_MOCK_REAL_INIT(xs_open);
|
|
+ return (void*)0x1;
|
|
+}
|
|
+
|
|
VIR_MOCK_IMPL_RET_ARGS(xc_interface_open,
|
|
xc_interface *,
|
|
xentoollog_logger *, logger,
|
|
@@ -94,6 +102,9 @@ VIR_MOCK_STUB_RET_ARGS(xc_sharing_used_f
|
|
VIR_MOCK_STUB_VOID_ARGS(xs_daemon_close,
|
|
struct xs_handle *, handle)
|
|
|
|
+VIR_MOCK_STUB_VOID_ARGS(xs_close,
|
|
+ struct xs_handle *, xsh)
|
|
+
|
|
VIR_MOCK_STUB_RET_ARGS(bind,
|
|
int, 0,
|
|
int, sockfd,
|