On Tue, Jul 29, 2025 at 01:02:18PM +0200, Peter Krempa via Devel wrote:
> On Tue, Jul 29, 2025 at 10:42:09 +0200, Michal Prívozník via Devel wrote:
> > On 7/24/25 15:49, James Le Cuirot wrote:
> > > From: James Le Cuirot <[email protected]>
> > >
> > > Distros may provide compatibility symlinks after moving firmware files
> > > around, but they won't work for existing VMs when doing a straight
> > > string comparison.
> > >
> > > virFileComparePaths has been used to do this, but it was previously
> > > only resolving the last path component, despite what the description
> > > says.
> > >
> > > James Le Cuirot (2):
> > > util: Fully resolve paths with virFileComparePaths
> > > qemu: Match firmware with fully resolved and canonicalized paths
> > >
> > > src/qemu/qemu_firmware.c | 11 ++++++-----
> > > src/util/virfile.c | 4 ++--
> > > 2 files changed, 8 insertions(+), 7 deletions(-)
> > >
> > > --
> > > 2.49.0
> > >
> >
> > Reviewed-by: Michal Privoznik <[email protected]>
> >
> > and merged. Congratulations on your first libvirt contribution!
>
> Note that this patch made the tests depend on host. While the pipelines
> did pass the local build on Fedora caused differences in test output
> which I attempted to fix, but ultimately that broke the pipelines in
> turn.
More details is that qemuxmlconftest.c has installed mock content
for /usr/share/edk2:
tests/qemuxmlconftest.c: virFileWrapperAddPrefix("/sys/devices/system",
tests/qemuxmlconftest.c: virFileWrapperAddPrefix(SYSCONFDIR
"/qemu/firmware",
tests/qemuxmlconftest.c: virFileWrapperAddPrefix(PREFIX
"/share/qemu/firmware",
tests/qemuxmlconftest.c:
virFileWrapperAddPrefix("/home/user/.config/qemu/firmware",
tests/qemuxmlconftest.c: virFileWrapperAddPrefix(SYSCONFDIR
"/qemu/vhost-user",
tests/qemuxmlconftest.c: virFileWrapperAddPrefix(PREFIX
"/share/qemu/vhost-user",
tests/qemuxmlconftest.c:
virFileWrapperAddPrefix("/home/user/.config/qemu/vhost-user",
tests/qemuxmlconftest.c:
virFileWrapperAddPrefix("/usr/libexec/qemu/vhost-user",
tests/qemuxmlconftest.c: virFileWrapperAddPrefix("/usr/libexec/virtiofsd",
Somewhere the new file canonicalization, however, it bypassing the
rewritten paths, and working off the real /usr/share/edk2 that
contains symlinks, which get rewritten. Thus we can the non-determinstic
build failures depending on the build environment/OS.
With 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 :|