-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add tests for streambuffers with different notification index #1150
Add tests for streambuffers with different notification index #1150
Conversation
/bot run formatting |
The problems with the spell check seem unrelated to the modified files, also I assume this PR shall be merged only after the functionality is merged and after updating the submodule revision. Is that correct? |
It seems one automated test is failing because of higher memory use:
Since the data structure slightly increased in size I'm assuming the problem is with that and requires increasing some limit in this MingW example. I'll look into that but I'm surprised the other demos (e.g. POSIX) don't fail in the same way. |
@@ -434,6 +474,7 @@ static void validate_stream_buffer_init_state( StreamBufferHandle_t xStreamBuffe | |||
TEST_ASSERT_EQUAL( 0U, xStreamBufferBytesAvailable( xStreamBuffer ) ); | |||
TEST_ASSERT_EQUAL( 0U, xStreamBufferNextMessageLengthBytes( xStreamBuffer ) ); | |||
TEST_ASSERT_EQUAL( 0, ucStreamBufferGetStreamBufferType( xStreamBuffer ) ); | |||
TEST_ASSERT_EQUAL( tskDEFAULT_INDEX_TO_NOTIFY, uxStreamBufferGetStreamBufferNumber( xStreamBuffer ) ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems like it should be uxStreamBufferGetStreamBufferNotificationIndex
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very bad copy paste mistake, thanks for noticing!
Description
This PR extends the unit tests for streambuffers to verify also the that the notification index matches, additionally it alters it to verify that we correctly handle different indices as introduced by FreeRTOS/FreeRTOS-Kernel#939
Test Steps
FreeRTOS/Test/CMock/stream_buffer/
make
Checklist:
Related Issue
FreeRTOS/FreeRTOS-Kernel#939
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.