Re: Test failures on macOS 12

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




> On 9 Aug 2022, at 11:28, Andrea Bolognani <abologna@xxxxxxxxxx> wrote:
> 
> On Mon, Aug 08, 2022 at 08:19:28PM +0200, Christophe de Dinechin wrote:
>> Hi Andrea,
>> 
>> I saw your call to Sergio and Marc-André on IRC, and I thought I would
>> spend a few minutes inviestigating.
> 
> Thanks, I appreciate that!
> 
>>>> 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@xxxxxxxxxxxx>
>> 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@xxxxxxxxxx>
>> Signed-off-by: Christophe de Dinechin <christophe@xxxxxxxxxxxx>
>> ---
>> 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?
> 
> Yeah, this seems to help and the change makes sense to me.
> 
> I wonder why we didn't run into this much earlier though? As I
> mentioned, the test runs successfully as-is on macOS 11. Plus, many
> other tests rely on library injection and yet work okay even without
> this change.
> 
> Anyway, I'm happy to add my
> 
>  Reviewed-by: Andrea Bolognani <abologna@xxxxxxxxxx>
> 
> to this patch and push it. The authorship information looks a bit
> funky though, with the two S-o-bs...

I did not know which one you’d prefer (in case there is a policy).
If I get to choose, assign that to Red Hat (and change the author accordingly).

(and I’ll change my libvirt gitconfig accordingly in the future)


Thanks,
Christophe


> Should I drop the @redhat.com
> one and only keep the one with your personal email address, matching
> the commit authorship information?
> 
> -- 
> Andrea Bolognani / Red Hat / Virtualization
> 





[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux