Skip to content

Conversation

@jackctj117
Copy link
Contributor

Fix test verbose macros to use WOLFHSM_CFG_DEBUG_VERBOSE

  • Replace WOLFHSM_CFG_TEST_VERBOSE with WOLFHSM_CFG_DEBUG_VERBOSE
    in all test files to match Makefile DEBUG_VERBOSE=1 variable
  • Fix HexDump functions to buffer lines and print atomically
    to prevent interleaved output

@jackctj117 jackctj117 self-assigned this Nov 19, 2025
@jackctj117 jackctj117 requested a review from bigbrett November 20, 2025 20:11
src/wh_utils.c Outdated
if ((count % HEXDUMP_BYTES_PER_LINE) == 0) {
linePos = 0;
}
linePos += snprintf(line + linePos, sizeof(line) - linePos, "%02X ", *ptr);
Copy link
Contributor

Choose a reason for hiding this comment

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

so you are reintroducing printfs here? Seems to defeat the purpose of having the WOLFHSM_CFG_PRINTF macro

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The snprintf was for formatting, I will change it. There are some other snprintf occurrences as well still in the code base for smilier reasons. Working on change now.

Copy link
Contributor Author

@jackctj117 jackctj117 Nov 20, 2025

Choose a reason for hiding this comment

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

Changing to manually converting bytes instead of relying on snprintf

Copy link
Contributor

Choose a reason for hiding this comment

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

I think if we use them in other places and they are legit needed then we should probably have our own internal macro for it. Preference to removing the need for it unless absolutely necessary but it might be a bigger change

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.

3 participants