Re: [libvirt PATCH 5/5] tests: Allow expansion of mocked stat symbols

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

 



On Mon, Mar 07, 2022 at 10:04:06AM +0100, Martin Kletzander wrote:
> When libc uses a define to rewrite stat64 to stat our mocks do not work if they
> are chained because the symbol that we are looking up is being stringified and
> therefore preventing the stat64->stat expansion per C-preprocessor rules.  One
> stringification macro is just enough to make it work.

This doesn't sound right to me.

If we're implementing a mock for 'stat64', we should not be looking
up 'stat'.  We should  be implmenting a mock for 'stat' instead.

It sounds more like we got MOCK_STAT and MOCK_STAT64 incorrectly
defined surely.

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 :|




[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