I'm trying to understand failures in the libvirt test suite since the
Fedora rawhide mass rebuild.
Our test suite makes extensive use of mocking to replace functions in
the library being tested. We do this either by loading a LD_PRELOAD,
or by having the test program define a symbol with the same name as
the one in the library to replace it. It appears this is being
broken by LTO
Disabling LTO in the RPM spec confirms this and makes things pass
again. Hacking the makefiles to remove the -fno-lto option when
building the test suite binaries also fixes things.
I don't see any mention of LD_PRELOAD being impacted by LTO in the
Fedora feature change page, but I can imagine how it would be.
What is still confusing me is that 40+ of our test programs rely
on LD_PRELOAD, but only one of them actually broke from LTO. It
seems the LTO is inconsistent is how it affects the test binaries
in some way.
Regards,
Daniel
--
|:
https://berrange.com -o-
https://www.flickr.com/photos/dberrange :|
|:
https://libvirt.org -o-
https://fstop138.berrange.com :|
|:
https://entangle-photo.org -o-
https://www.instagram.com/dberrange :|