On Mon, Apr 19, 2021 at 07:14:10PM +0200, Pavel Hrdina wrote: > This will allow us to run tests using firewall on hosts where the mocked > binaries are not available/installed instead of skipping these tests. > > Signed-off-by: Pavel Hrdina <phrdina@xxxxxxxxxx> > --- > src/util/virfile.h | 3 ++- > tests/meson.build | 1 + > tests/virfirewallmock.c | 34 ++++++++++++++++++++++++++++++++++ > 3 files changed, 37 insertions(+), 1 deletion(-) > create mode 100644 tests/virfirewallmock.c Reviewed-by: Daniel P. Berrangé <berrange@xxxxxxxxxx> > > diff --git a/src/util/virfile.h b/src/util/virfile.h > index a02779f0ec..b9f7b1766f 100644 > --- a/src/util/virfile.h > +++ b/src/util/virfile.h > @@ -184,7 +184,8 @@ int virFileResolveAllLinks(const char *linkpath, > int virFileIsLink(const char *linkpath) > ATTRIBUTE_NONNULL(1) G_GNUC_WARN_UNUSED_RESULT; > > -char *virFindFileInPath(const char *file); > +char *virFindFileInPath(const char *file) > + G_GNUC_NO_INLINE; Hmm, pre-existing bug - we have virFindFileinPath mocke in the testutilsqemu.c file already. Our mock test case doesn't report this bug since we're only validating functions present in a file ending in mock.c 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 :|