Skip to content

tests: stop using cmocka's deprecated check_expected() - #21752

Merged
TurboGit merged 1 commit into
darktable-org:masterfrom
piratenpanda:cmocka_fix
Aug 8, 2026
Merged

tests: stop using cmocka's deprecated check_expected() #21752
TurboGit merged 1 commit into
darktable-org:masterfrom
piratenpanda:cmocka_fix

Conversation

@piratenpanda

Copy link
Copy Markdown
Contributor

While building unit tests for the spektrafilm module I hit a compilation error. cmocka 1.1.8 deprecated the untyped check_expected() in favour of the width-explicit check_expected_int() / check_expected_uint(). The unit tests are built with -Werror, so on any distribution shipping that version test_filmicrgb no longer compiles, and with it every -DBUILD_TESTING=ON build fails.

Use the typed macro where it exists and keep the old spelling behind an #ifdef: the minimum cmocka the build accepts is 1.1.0, which has no typed variants, so dropping the old spelling outright would break the other end of the supported range.

@piratenpanda piratenpanda changed the title tests: stop using cmocka's deprecated check_expected() - #21751 tests: stop using cmocka's deprecated check_expected() Aug 8, 2026
@da-phil

da-phil commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

I think there is a similar issue when building with --enable-ai (via build.sh) or -DUSE_AI (when invoking cmake directly).
Did you try that too?

Edit: nevermind, this is a different issue. I'll look into that.

@TurboGit TurboGit left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@TurboGit
TurboGit merged commit 95614b8 into darktable-org:master Aug 8, 2026
5 checks passed
@TurboGit TurboGit added this to the 5.8 milestone Aug 8, 2026
@TurboGit TurboGit added the scope: codebase making darktable source code easier to manage label Aug 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scope: codebase making darktable source code easier to manage

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants