Re: [libvirt PATCH] Revert "tests: Avoid gnulib replacements in mocks"

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

 



On Thu, Feb 04, 2021 at 11:48:26AM +0100, Andrea Bolognani wrote:
> Now that we're no longer using gnulib, we can treat macOS the
> same as all other targets.
> 
> This reverts commit 0ae6f5cea54d95c0d1dedf04a0a2accfe2529fb2
> 
> Signed-off-by: Andrea Bolognani <abologna@xxxxxxxxxx>
> ---
> Roman,
> 
> this seems to work fine both locally and on Cirrus CI[1], but
> I'd like to have your thumbs up before pushing.
> 

Hi,

I thought about that too back in Oct/Nov. Thanks for doing the change!

Reviewed-by: Roman Bolshakov <r.bolshakov@xxxxxxxxx>
Tested-by: Roman Bolshakov <r.bolshakov@xxxxxxxxx>

Regards,
Roman

> Thanks!
> 
> [1] https://gitlab.com/abologna/libvirt/-/jobs/1007362310
> 
>  tests/virfilewrapper.c     |  5 -----
>  tests/virmockstathelpers.c | 10 ----------
>  2 files changed, 15 deletions(-)
> 
> diff --git a/tests/virfilewrapper.c b/tests/virfilewrapper.c
> index ca2356b5c9..7034e22420 100644
> --- a/tests/virfilewrapper.c
> +++ b/tests/virfilewrapper.c
> @@ -163,12 +163,7 @@ int access(const char *path, int mode)
>      return real_access(newpath ? newpath : path, mode);
>  }
>  
> -# ifdef __APPLE__
> -int _open(const char *path, int flags, ...) __asm("_open");
> -int _open(const char *path, int flags, ...)
> -# else
>  int open(const char *path, int flags, ...)
> -# endif
>  {
>      g_autofree char *newpath = NULL;
>      va_list ap;
> diff --git a/tests/virmockstathelpers.c b/tests/virmockstathelpers.c
> index 3bd2437ffe..49485cd360 100644
> --- a/tests/virmockstathelpers.c
> +++ b/tests/virmockstathelpers.c
> @@ -204,12 +204,7 @@ static int virMockStatRedirect(const char *path, char **newpath);
>  #endif
>  
>  #ifdef MOCK_STAT
> -# ifdef __APPLE__
> -int _stat(const char *path, struct stat *sb) __asm("_stat$INODE64");
> -int _stat(const char *path, struct stat *sb)
> -# else
>  int stat(const char *path, struct stat *sb)
> -# endif
>  {
>      g_autofree char *newpath = NULL;
>  
> @@ -279,13 +274,8 @@ __xstat64(int ver, const char *path, struct stat64 *sb)
>  #endif
>  
>  #ifdef MOCK_LSTAT
> -# ifdef __APPLE__
> -int _lstat(const char *path, struct stat *sb) __asm("_lstat$INODE64");
> -int _lstat(const char *path, struct stat *sb)
> -# else
>  int
>  lstat(const char *path, struct stat *sb)
> -# endif
>  {
>      g_autofree char *newpath = NULL;
>  
> -- 
> 2.26.2
> 




[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