introduce WARNING_OUT, when goto is not a hard error during tests#6945
Merged
JacobBarthelmeh merged 1 commit intowolfSSL:masterfrom Nov 7, 2023
Merged
introduce WARNING_OUT, when goto is not a hard error during tests#6945JacobBarthelmeh merged 1 commit intowolfSSL:masterfrom
JacobBarthelmeh merged 1 commit intowolfSSL:masterfrom
Conversation
| #define FOURK_BUF 4096 | ||
|
|
||
| #if defined(WOLFSSL_ESPIDF) | ||
| static const char* TAG = "wolfcrypt_test"; /* ESP_LOG() breadcrumb */ |
Contributor
There was a problem hiding this comment.
Is this only used when WOLFSSL_ESPIDF_ERROR_PAUSE is defined? If so please move it down into that macro guarded section of code to avoid unused warnings.
Contributor
Author
There was a problem hiding this comment.
No, it wasn't the only place, but I cleaned up the other one that was hard-coded with "wolfcrypt_test" text.
There will be a separate, future exercise to replace references to printf with the Espressif ESP_LOG.
Contributor
There was a problem hiding this comment.
@gojimmypi Sounds good, when replacing the printf's I recommend following the existing XPRINTF override pattern we have for using a custom printf in the tests.
0ab07bd to
e58fafc
Compare
JacobBarthelmeh
approved these changes
Nov 7, 2023
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.
Description
This is a revision of #6923 using a different source branch name as suggested.
Sometimes it may be desired to capture the call stack during test error conditions rather than just error out.
This PR introduces
WARNING_OUTthat will normally do the same thing asERROR_OUT, except when an alterative is defined, such as theWOLFSSL_ESPIDF_ERROR_PAUSEfor a customERROR_OUThandler in the Espressif environment.Not all uses of the current
ERROR_OUTare actually hard errors. Some simply capture expected but undesired results and still handle with the sameret = (err); goto eLabel;logic. TheWARNING_OUTis used for situations where we don't actually want to capture a custom call stack with alternateERROR_OUTcode.Note the
ecc_test_curve_sizetest is one example now usingWARNING_OUTinstead ofERROR_OUT.Other custom error-pausing code can easily be added as desired for other environments.
Also included is a variable-initialization for
argsinwolfcrypt_test_main().Fixes zd# n/a
Testing
How did you test?
manual testing in Espressif environment.
Confirmation with:
Checklist