
14 Mar
2024
14 Mar
'24
7:25 a.m.
On Thu, Mar 14, 2024 at 10:34:27AM +0100, Michal Privoznik wrote:
Since virusbmock was written 10 years ago, back when we didn't have virmock.h and its helpers, it open codes symbol resolution (VIR_MOCK_REAL_INIT). With a bit of cleanup (e.g. renaming realopen to real_open and so on) it can use virmock.h provided macros.
And while at it, drop include of virusb.h - there is no compelling reason for it include the file. The mock just redirects paths passed to open()/opendir().
Signed-off-by: Michal Privoznik <mprivozn@redhat.com> --- tests/virusbmock.c | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-)
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>