Repository navigation
Restore Check 0.9.4 compatibility with a ck_assert shim in the test header - #172
Merged
Merged
Conversation
Contributor
Author
|
as mentioned elsewhere, this would be helpful for 0.7.x to be a complete drop in (upgrade) for 0.6.2.x |
Contributor
|
Ok, I will have a second thought about it, but isn't it a separate pipeline just for Check a bit overkill? While I understand the need for OpenSSL, having the unit tests compiled and run during standard CI seems good enough to me. |
TheStormN
reviewed
Sep 11, 2026
The tests use ck_assert, ck_assert_msg, ck_assert_int_eq and ck_assert_str_eq, which Check added in 0.9.6 on top of fail_unless, and ck_assert_uint_eq, which only arrived in 0.9.10, so they never compiled against the 0.9.4 that README.md, CMakeLists.txt and configure.ac declared as the minimum, and the two ck_assert_uint_eq in check_concatkdf.c also ruled out 0.9.6 to 0.9.9 (cisco#91, cisco#159). Define the five in check_cjose.h when check.h does not, using the definitions of the release that introduced each, with the integer comparisons printing intmax_t and uintmax_t like later releases do. The test code itself is unchanged. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Signed-off-by: Hans Zandbelt <hans.zandbelt@openidc.com>
This reverts commit 457e511. The bump was the alternative to cisco#159: the tests used ck_assert_uint_eq, which arrived in Check 0.9.10, and raising the documented minimum to 0.12.0 made the requirement true. With check_cjose.h now providing ck_assert_uint_eq and the rest of the ck_assert family to the releases that lack them, the tests build and pass unchanged against every Check release from 0.9.4 to 0.15.2, so the minimum can go back to the 0.9.4 that README.md, CMakeLists.txt and configure.ac declared before. That keeps RHEL 6 (Check 0.9.8) and RHEL 7 (0.9.9) able to run the test suite in the 0.x line; 1.0.x is free to raise the floor. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Signed-off-by: Hans Zandbelt <hans.zandbelt@openidc.com>
zandbelt
force-pushed
the
check-0.9.4-compat
branch
from
September 11, 2026 16:47
befc40f to
ba8e449
Compare
Contributor
Author
|
Agreed, the Check workflow is dropped; the PR is now just the shim in |
TheStormN
approved these changes
Sep 11, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #159 and #161, which fixed #91 by raising the documented Check minimum from 0.9.4 to 0.12.0. This restores the 0.9.4 minimum for the 0.x line without touching the test code: the tests never actually built against 0.9.4, because the
ck_assertfamily (ck_assert,ck_assert_msg,ck_assert_int_eq,ck_assert_str_eq) only arrived in Check 0.9.6, andck_assert_uint_eqin 0.9.10.Two commits:
check_cjose.hunder#ifndef:ck_assert_msg,ck_assert,ck_assert_int_eq,ck_assert_uint_eqandck_assert_str_eq, using the definitions of the release that introduced each (the integer comparisons printintmax_t/uintmax_tlike later releases do). The.ctest files are unchanged.Changes since the first revision, per the review:
ck_assert_uint_eqjoined the shim so the two uses incheck_concatkdf.cstay as they are (the #159 cherry-pick is gone), and the separate Check CI workflow is dropped; the regular CI keeps compiling and running the tests against the distro's Check.Verified locally against Check 0.9.4, 0.9.6, 0.9.8, 0.9.9, 0.9.10, 0.9.14, 0.10.0, 0.12.0 and 0.15.2: all pass. Without commit 1, 0.9.4 fails to build on
ck_assert_str_eqand 0.9.6 to 0.9.9 onck_assert_uint_eq; with it, a deliberately wrong expected length reportsAssertion 'otherinfoLen==24' failed: otherinfoLen==23, 24==24on 0.9.4 and 0.9.9 exactly as 0.9.10 does.🤖 Generated with Claude Code