]> git.ipfire.org Git - thirdparty/libvirt.git/commit
virusbmock: Switch to VIR_MOCK_REAL_INIT()
authorMichal Privoznik <mprivozn@redhat.com>
Wed, 13 Mar 2024 16:35:15 +0000 (17:35 +0100)
committerMichal Privoznik <mprivozn@redhat.com>
Thu, 14 Mar 2024 12:03:21 +0000 (13:03 +0100)
commitce5efefecd36b5f7abae103591abe2aac06b781f
treef96386fe40925c5311f032decac5cc1a24abb97b
parent78993f618f96aebe41cf2a7652d61d119550ff13
virusbmock: Switch to VIR_MOCK_REAL_INIT()

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>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
tests/virusbmock.c