ehlo,
I was not able to mock functions with linker flang -wrap when
they was called indirectly by another function from dynamic library.
(It works with dirrect invocation of function)
mc_client_tests_LDFLAGS = \
-Wl,-wrap,sss_nss_check_header \
-Wl,-wrap,sss_open_cloexec \
$(NULL)
This is a reason why I wrote mocked function in unit test
e.g.
__real_sss_open_cloexec
__wrap_sss_open_cloexec
sss_open_cloexec
If you know better way how to mock functions I will be glad to change test.
LS