Re: [libvirt] [PATCH v2 2/2] test: qemuhotplugtest mock virFileMakePath

2020-01-22 Thread Christian Ehrhardt
On Fri, Jan 17, 2020 at 6:47 PM Andrea Bolognani wrote: > On Thu, 2020-01-16 at 09:28 +0100, Christian Ehrhardt wrote: > > +VIR_MOCK_IMPL_RET_ARGS(virFileMakePath, int, > > + const char *, path) > > +{ > > +const char *home; > > + > > +

Re: [libvirt] [PATCH v2 2/2] test: qemuhotplugtest mock virFileMakePath

2020-01-17 Thread Andrea Bolognani
On Thu, 2020-01-16 at 09:28 +0100, Christian Ehrhardt wrote: > +VIR_MOCK_IMPL_RET_ARGS(virFileMakePath, int, > + const char *, path) > +{ > +const char *home; > + > +VIR_MOCK_REAL_INIT(virFileMakePath); > + > +/* ignore non-existing homes (e.g. in build

[libvirt] [PATCH v2 2/2] test: qemuhotplugtest mock virFileMakePath

2020-01-16 Thread Christian Ehrhardt
In certain build environments (e.g. Debian and Ubuntu) $HOME is set to a non existing path intentionally. That breaks and crashes qemuhotplugtest by failing the init in virHostdevManagerGetDefault. Avoid that issue by mocking the virFileMakePath behavior if it is passed a path that matches $HOME