On Tue, Jan 11, 2022 at 10:18:23AM +0000, Andrea Bolognani wrote: > On Tue, Jan 11, 2022 at 09:59:06AM +0000, Daniel P. Berrangé wrote: > > On Tue, Jan 11, 2022 at 09:28:45AM +0100, Michal Prívozník wrote: > > > Thanks, but as I was looking through virFindFileInPath() I've noticed > > > that if the file exists but is not executable then NULL is returned, so > > > we will need a fallback case. Effectively this needs to be squashed in: > > > > Why do we need a fallback ? If someone has put 'dnsmasq' in $PATH > > without the execute bit set, surely that's just a broken deployment > > and returning NULL is correct. > > Agreed in general, but we want the test suite to still pass even if > dnsmasq is not installed on the build machine. The approach I > suggested in my other message would achieve that. Shouldn't we just mock the virFindFileInPath call in the test suite to return whatever fixed binary path we need, so we don't have to modify the driver code with special logic for tests. 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 :|