zdump/zg: Convert print macros to functions which can be mocked

This change allows mocking of print macros in unit tests.
Being able to do this in unit tests, enables us to catch output from
zgetdump functions and test it.

Signed-off-by: Alexander Egorenkov <egorenar@linux.ibm.com>
Reviewed-by: Marc Hartmayer <mhartmay@linux.ibm.com>
Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
This commit is contained in:
Alexander Egorenkov
2021-11-24 15:17:22 +01:00
committed by Jan Höppner
parent 2238eb820f
commit 0d407904dd
3 changed files with 62 additions and 18 deletions
+1 -1
View File
@@ -41,7 +41,7 @@ check_dep_zlib:
all: check_dep_fuse check_dep_zlib zgetdump
OBJECTS = zgetdump.o opts.o zg.o zg_error.o \
OBJECTS = zgetdump.o opts.o zg.o zg_error.o zg_print.o \
dfi.o dfi_mem_chunk.o dfi_vmcoreinfo.o \
dfi_lkcd.o dfi_elf.o \
dfi_s390.o dfi_s390_ext.o\