Hi Andrea,
I saw your call to Sergio and Marc-André on IRC, and I thought I would
spend a few minutes inviestigating.
On 10 Jun 2022, at 11:34, Andrea Bolognani
<abologna(a)redhat.com> wrote:
On Fri, May 06, 2022 at 03:00:14AM -0700, Andrea Bolognani wrote:
> I'm trying to enable CI coverage for macOS 12, but I'm running into a
> couple of issues that I'm not sure how to handle.
>
> Note that the test suite currently passes on macOS 11[1], so these
> failures have to be a consequence to changes made to macOS that we
> haven't yet learned how to cope with.
>
> The first one is in vircryptotest:
>
> Encrypt aes265cbc ... Expected ciphertext doesn't match
>
> I've added some debug statements and it looks like the generated data
> is different every time, which seems like a pretty good indication
> that virrandommock is not being picked up correctly. This is not the
> only test program that uses that specific mock though, so I'm not
> sure what makes it fail when all the others are succeeding.
I believe that the following patch fixes this one:
From: Christophe de Dinechin <christophe(a)dinechin.org>
Date: Mon, 8 Aug 2022 20:14:08 +0200
Subject: [PATCH] tests: Pass the flat_namespace option to the linker
This fixes vircryptotest on macOS 12 (Monterey).
The test relies on library injection (using DYLD_INSERT_LIBRARIES)
to replace the normal random functions with functions giving predictable
results, defined in virrandommock.c. However, using DYLD_INSERT_LIBRARIES
only works when building with flat namespaces.
Adding the -Wl,-flat_namespace option to the linker fixes the problem.
The option was already defined in the top-level meson.build, but had been
forgotten in the test linker arguments.
Signed-off-by: Christophe de Dinechin <dinechin(a)redhat.com>
Signed-off-by: Christophe de Dinechin <christophe(a)dinechin.org>
---
tests/meson.build | 1 +
1 file changed, 1 insertion(+)
diff --git a/tests/meson.build b/tests/meson.build
index bc9d8ccc4c..d6b1bb2bf0 100644
--- a/tests/meson.build
+++ b/tests/meson.build
@@ -28,6 +28,7 @@ tests_dep = declare_dependency(
],
link_args: (
libvirt_export_dynamic
+ + libvirt_flat_namespace
+ coverage_flags
),
)
--
2.37.1
Could you please check?
>
> The other issue is in qemuxml2argvtest:
>
> error : virCommandWait:2752 : internal error: Child process
> (/usr/libexec/qemu/vhost-user/test-vhost-user-gpu --print-capabilities)
> unexpected fatal signal 6: dyld[8896]: symbol not found in flat
> namespace '_virQEMUCapsGet'
> error : qemuVhostUserFillDomainGPU:394 : operation failed: Unable to
> find a satisfying vhost-user-gpu
>
> So the various virFileWrapperAddPrefix() calls that cause the
> contents of tests/qemuvhostuserdata/ to override the host's own
> vhostuser configuration are still effective, but for some reason the
> trivial test-vhost-user-gpu shell script can't be run successfully
> because an internal libvirt symbol can't be found somehow? Confusing.
>
> Roman, does any of this ring a bell? Any chance you could
> investigate? macOS 12 has been out for a while now so I'd be very
> keen to have it added to CI.
Roman, any chance you can find some time to investigate the test
failures documented above? I'm afraid I've reached the limit of my
ability to debug macOS-specific behavior :(
--
Andrea Bolognani / Red Hat / Virtualization