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

Reply via email to