URL:
https://github.com/SSSD/sssd/pull/5654
Title: #5654: test: replace deprecated libcheck macros
sumit-bose commented:
"""
Thank you for the patches. I agree in general.
I only have a questions about `sss_ck_fail_if_msg`:
* `_ck_assert_failed` that you used for implementation doesn't seem to belong to
"official"/public libcheck API
* `sss_ck_fail_if_msg` defines absolutely the same error message as `fail_unless`
(while condition is negated)
* do we need `sss_ck_fail_if_msg` at all? why couldn't we use `fail_unless` with
negated expr?
Hi,
yes, I see `sss_ck_fail_if_msg` as a temporary solution and that's why I used
`_ck_assert_failed` because I didn't found a good and easy to use replacement with the
public API.
All usage of `sss_ck_fail_if_msg` should be replaced by `ck_assert_msg` with the
expression negated. I didn't want to do this with a simple replace expr->!(expr),
like the other changes in this patch, because I guess the resulting condition might be
hard to understand if expr already contains a non-trivial condition. So for a proper
change each of the conditions should be handled manually for with I didn't had the
time yet, I just wanted to get rid of the compiler warnings which might overshadow more
important warnings.
Feel free to defer that patch until someone has the time to check the conditions.
bye,
Sumit
"""
See the full comment at
https://github.com/SSSD/sssd/pull/5654#issuecomment-854585050