Repository navigation
testing/ostest: stringify wdtest_assert at the first macro level - #4033
Merged
Merged
Conversation
xiaoxiang781216
previously approved these changes
Nov 12, 2026
jerpelea
previously approved these changes
Nov 12, 2026
wdtest_assert(x) forwarded x to _ASSERT(x, __FILE__, __LINE__), whose #f stringified the argument after the wdtest_assert -> _ASSERT chain had already macro-expanded it. Pass the stringified argument (#x) from wdtest_assert itself so the assert message holds the literal expression text instead of an expanded macro tree. This matches the NuttX change "include/assert: stringify assert expressions at the first macro level", which makes _ASSERT() take the expression string as a 4th parameter. Assisted-By: mimo-v2.6-pro Signed-off-by: ouyangxiangzhen <[email protected]>
Fix-Point
dismissed stale reviews from jerpelea and xiaoxiang781216
via
November 12, 2026 07:55
d9c0f13
Fix-Point
force-pushed
the
fix-assert-stringify
branch
from
November 12, 2026 07:55
d3783d2 to
d9c0f13
Compare
jerpelea
approved these changes
Nov 12, 2026
🔗 Cross-repo PR dependenciesThe read-only Build run reported the following dependent PR(s) and fetched head SHA(s): |
xiaoxiang781216
approved these changes
Nov 12, 2026
This was referenced Nov 13, 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.
Depends-On: apache/nuttx#21764
Summary
This PR updates ostest's
wdtest_assert()to pass its argument as literal text to_ASSERT().wdtest_assert(x)forwardedxto_ASSERT(x, __FILE__, __LINE__), whose#fstringified the argument after thewdtest_assert -> _ASSERTchain had already macro-expanded it. Passing#xfromwdtest_assertitself keeps the assert message as the literal expression text instead of an expanded macro tree.This is the apps-side companion to the NuttX change "include/assert: stringify assert expressions at the first macro level", which makes
_ASSERT()take the expression string as a 4th parameter.Impact
wdtest_assertreports the literal assertion text; no behavior change (the condition is evaluated exactly as before).Testing
CONFIG_DEBUG_ASSERTIONS_EXPRESSION=y: assert strings hold the source text, no large strings in the image).wdtest_assert; the change is a macro-level stringification fix with no behavior difference.