On Tue, Jan 11, 2022 at 10:24:00AM +0000, Daniel P. Berrangé wrote:
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:
> > 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.
We'd have to also mock *running* the binary, as we get some
information out of that. Probably a better long-term approach, but I
don't think it should necessarily be a blocker for this series, which
already represents an improvement over the status quo.
--
Andrea Bolognani / Red Hat / Virtualization