Repository navigation
Give the empty-PIN cache test hook C linkage - #259
Merged
Frauschi merged 1 commit intoOct 19, 2026
Merged
Conversation
tests/empty_pin_cache_test.c declared WP11_Test_SetEmptyPinCheckHook without extern "C", so the C++ debug build (cpp_debug_build) could not link the test. Wrap it like the other test hook declarations.
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The narrow linkage fix matches the library declaration and has no identified issues.
No open issues 🎉
What changed in this PR
Fixes the empty-PIN cache test’s C++ debug-build link failure by matching the library hook’s C linkage.
Changes:
- Wraps the hook declaration in an
extern "C"guard, leaving C compilation and test behavior unchanged.
| File | Description |
|---|---|
| tests/empty_pin_cache_test.c | Adds conditional C linkage to the debug hook declaration. |
Review effort: Balanced
Frauschi
approved these changes
Oct 19, 2026
Frauschi
added a commit
that referenced
this pull request
Oct 19, 2026
Write only changed token objects to storage. Failing unit test is unrelated and fixed by #259.
LinuxJedi
added a commit
that referenced
this pull request
Oct 21, 2026
* Set the version to 2.2.0 in configure.ac, CMakeLists.txt, the Doxyfiles and version.h, and add a Debian changelog entry. * Bump the shared library version to 4.1.0, as the autotools build now exports the PKCS#11 v3.0 and v3.2 functions (PR #258). * Add the 2.2 release notes to README.md, covering PR #203 through PR #259.
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.
tests/empty_pin_cache_test.cdeclares the debug-only hookWP11_Test_SetEmptyPinCheckHookwithoutextern "C". The C++ debug CI job (cpp_debug_build,CC=g++ --enable-debug) compiles the tests as C++, so the test references a C++-mangled symbol and fails to link:This fails
cpp_debug_buildon master (e2a6548) and on every PR built on it. The declaration is now wrapped like the other test hook declarations (#256).Testing:
clang++ -x c++against an--enable-debugbuild, the test failed to link before the change ("declaration possibly missing 'extern "C"'") and links after it.make testpasses (debug and default configs).