Skip to content

Restore Check 0.9.4 compatibility with a ck_assert shim in the test header - #172

Merged
TheStormN merged 2 commits into
cisco:masterfrom
OpenIDC:check-0.9.4-compat
Sep 11, 2026
Merged

TheStormN merged 2 commits into
cisco:masterfrom
OpenIDC:check-0.9.4-compat

Conversation

@zandbelt

@zandbelt zandbelt commented Sep 11, 2026 •

Copy link
Copy Markdown
Contributor

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_assert family (ck_assert, ck_assert_msg, ck_assert_int_eq, ck_assert_str_eq) only arrived in Check 0.9.6, and ck_assert_uint_eq in 0.9.10.

Two commits:

  1. test: provide the ck_assert family for Check 0.9.4 to 0.9.9. Twenty-three lines in check_cjose.h under #ifndef: ck_assert_msg, ck_assert, ck_assert_int_eq, ck_assert_uint_eq and ck_assert_str_eq, using the definitions of the release that introduced each (the integer comparisons print intmax_t / uintmax_t like later releases do). The .c test files are unchanged.
  2. Revert the 0.12.0 bump in README.md, CMakeLists.txt, configure.ac and configure, with the rationale in the commit message. RHEL 6 ships Check 0.9.8, RHEL 7 0.9.9, RHEL 8 0.12.0 (checked against the CentOS vault and Rocky mirrors); 1.0.x remains free to raise the floor.

Changes since the first revision, per the review: ck_assert_uint_eq joined the shim so the two uses in check_concatkdf.c stay 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_eq and 0.9.6 to 0.9.9 on ck_assert_uint_eq; with it, a deliberately wrong expected length reports Assertion 'otherinfoLen==24' failed: otherinfoLen==23, 24==24 on 0.9.4 and 0.9.9 exactly as 0.9.10 does.

🤖 Generated with Claude Code

@zandbelt

Copy link
Copy Markdown
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

@TheStormN

Copy link
Copy Markdown
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.

Comment thread test/check_cjose.h
zandbelt and others added 2 commits September 11, 2026 18:45
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 zandbelt changed the title Restore Check 0.9.4 compatibility, verified by a Check matrix in CI Restore Check 0.9.4 compatibility with a ck_assert shim in the test header Sep 11, 2026
@zandbelt

Copy link
Copy Markdown
Contributor Author

Agreed, the Check workflow is dropped; the PR is now just the shim in check_cjose.h plus the revert of the 0.12.0 bump, rebased on current master. The regular CI compiles and runs the tests against the distro's Check as before.

@TheStormN
TheStormN merged commit f91f806 into cisco:master Sep 11, 2026
31 checks passed
@zandbelt
zandbelt deleted the check-0.9.4-compat branch September 12, 2026 05:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

make test fails with documented check version

2 participants