Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Add valgrind and string tests to host_tests #4939

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

Merged
merged 11 commits into from
Jul 27, 2018

Conversation

earlephilhower
Copy link
Collaborator

Valgrind identified an error that was causing intermittent failures in
the host tests, and can check for subtle memory access and allocation bugs.
Add it to the standard host_test suite, and any errors will cause test
failure.

Also start adding string tests, since two undefined behaviors have been
found so far just by inspection.

earlephilhower and others added 4 commits July 18, 2018 18:58
Valgrind identified an error that was causing intermittent failures in
the host tests, and can check for subtle memory access and allocation bugs.
Add it to the standard host_test suite, and any errors will cause test
failure.

Also start adding string tests, since two undefined behaviors have been
found so far just by inspection.
Looks like a possible bug in the concatenation operator, need to verify
expected behavior.
No need to be so chatty on the test.  Errors were a little hard to spot.
Go to normal verbosity.
Copy link
Collaborator

@devyte devyte left a comment

Choose a reason for hiding this comment

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

The more the merrier. These will help if we migrate to a std::string based implementation.

LCOV and genhtml can generate nice HTML coverage charts hilighting test
coverage issues in a much simpler way than gcov text format.  Generate these
automatically from gcov output.

Add additional string creation and comparison tests.
@earlephilhower
Copy link
Collaborator Author

The lcov stuff won't help the CI, but it does produce some very nice color-coded source HTML files that makes it way easier to see what's covered and what isn't.

Additional string tests and checks
@earlephilhower
Copy link
Collaborator Author

screenshot from 2018-07-25 20-03-24

@earlephilhower earlephilhower changed the title WIP - Add valgrind and string tests to host_tests Add valgrind and string tests to host_tests Jul 27, 2018
@earlephilhower earlephilhower added this to the 2.4.2 milestone Jul 27, 2018
Ensure that strings that are right on the edge of the allocation
size are handled properly and account for trailing 0.
@devyte devyte merged commit 03ea61a into esp8266:master Jul 27, 2018
@earlephilhower earlephilhower deleted the newhosttests branch September 30, 2018 17:44
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.

2 participants