Re: [PATCH 5/5] virschematest: Don't skip all "directory" tests

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

 



On 11/28/24 09:32, Peter Krempa wrote:
> Due to a bug in the optimization to avoid testing symlinked tests
> multiple times all tests were skipped.
> 
> In commit f997fcca71a16b102e6ee663 I made an attempt to optimize the
> tests by avoiding testing symlinks. This optimization was buggy as I've
> passed the 'd_name' field of 'struct dirent' which is just the filename
> to 'g_lstat()'. 'g_lstat()' obviously always failed with ENOENT. As the
> logic checked only for successful return of 'g_lstat()' the optimizatio
> was a dud.
> 
> Now in 4d8ebbfee83edb2 the 'g_lstat()' call was replaced by
> 'virFileIsLink()' checking all non-zero values. This meant that if
> 'virFileIsLink()' failed the test was skipped. Now since a bad argument
> was passed this failed always and thus was always skipped making
> 'virschematest' useless.
> 
> Fix it by passing the full path of the test and also explicitly check
> for '1' return value instead of any non-zero.
> 
> Fixes: f997fcca71a16b102e6ee663a3fb86bed8de9d7d
> Fixes: 4d8ebbfee83edb26b19a62465b9f98d0126db991

Collaboration works! :-D

Michal



[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