[libvirt] [PATCH 08/11] tests: Lookup extended stat/lstat in mocks

Daniel P. Berrangé berrange at redhat.com
Wed Aug 21 17:06:15 UTC 2019


On Wed, Aug 21, 2019 at 07:13:20PM +0300, Roman Bolshakov wrote:
> macOS syscall interface (/usr/lib/system/libsystem_kernel.dylib) has
> three kinds of stat but only one of them can be used to fill
> "struct stat": stat$INODE64.
> 
> virmockstathelpers looks up regular stat instead of stat$INODE64.  That
> causes a failure in qemufirmwaretest because "struct stat" is laid out
> differently from the values returned by stat.
> 
> Introduce VIR_MOCK_REAL_INIT_ALIASED that can be used to lookup
> stat$INODE64 and lstat$INODE64 and use it to setup real functions on
> macOS.
> 
> Signed-off-by: Roman Bolshakov <r.bolshakov at yadro.com>
> ---
>  tests/virmock.h            | 10 ++++++++++
>  tests/virmockstathelpers.c |  8 ++++++++
>  2 files changed, 18 insertions(+)

Reviewed-by: Daniel P. Berrangé <berrange at redhat.com>


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




More information about the libvir-list mailing list