Skip to content

Conversation

tpambor
Copy link
Contributor

@tpambor tpambor commented Oct 8, 2025

Add __printf_like attribute to ztest assertion functions zassert, zassume, zexpect to validate format strings and arguments at compile time.

Re-land #96335 after it was reverted in #96910. The test failures have been fixed in individual PRs, for details, see #96968.

Fixes #96968

@tpambor tpambor force-pushed the zassert-validate branch 4 times, most recently from 36b9786 to c12ceb9 Compare October 12, 2025 15:21
Add __printf_like attribute to ztest assertion functions
zassert, zassume, zexpect to validate format strings and arguments
at compile time.

Signed-off-by: Tim Pambor <[email protected]>
@tpambor tpambor marked this pull request as ready for review October 14, 2025 17:13
@zephyrbot zephyrbot added the area: Testsuite Testsuite label Oct 14, 2025
Copy link

@cfriedt cfriedt merged commit 99fd6d4 into zephyrproject-rtos:main Oct 16, 2025
27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Tracking issue for format string errors in ztest assertion functions

5 participants