-
Notifications
You must be signed in to change notification settings - Fork 238
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
test: replace deprecated libcheck macros #5654
Conversation
The common_check.h header file adds libcheck related macros which are not needed by cmocka test, using common.h is sufficient here.
The fail* macros are deprecated by libcheck some time ago. Recently a fix for a different issue in those macros cause a 'too many arguments for format' compiler warning which won't be fixed on the libckeck side since the macros are deprecated. This patch replaces the deprecated macros with the new ones: - fail -> ck_abort_msg - fail_unless -> ck_assert_msg - fail_if -> sss_ck_fail_if_msg The fail_if macro does not have a corresponding new version and I added a local replacement sss_ck_fail_if_msg which is based on ck_assert_msg.
Thank you for the patches. I agree in general. I only have a questions about
|
Hi, yes, I see All usage of Feel free to defer that patch until someone has the time to check the conditions. bye, |
Hi, I think it would be better to merge this patch while it is still applicable to avoid rebases in the future and open a ticket to remove sss_ck_fail_if_msg later. Abandoning the deprecated API and changing the conditions in one PR would require more brain energy and IMO it is better to do so in two steps :) So unless someone started to convert the conditions already or there is a different plan for this patch I would give +1 for this patch as is (+ opening the ticket I mentioned). The patch is already validated with green tests. Just my 2c |
Ok. |
The fail* macros are deprecated by libcheck some time ago. Recently a fix
for a different issue in those macros cause a 'too many arguments for
format' compiler warning which won't be fixed on the libckeck side since
the macros are deprecated.
This patch replaces the deprecated macros with the new ones:
The fail_if macro does not have a corresponding new version and I added a
local replacement sss_ck_fail_if_msg which is based on ck_assert_msg.