-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
String values in YAML should test edge cases better. #11687
Merged
bzbarsky-apple
merged 1 commit into
project-chip:master
from
bzbarsky-apple:better-string-testing
Nov 11, 2021
Merged
String values in YAML should test edge cases better. #11687
bzbarsky-apple
merged 1 commit into
project-chip:master
from
bzbarsky-apple:better-string-testing
Nov 11, 2021
Conversation
This file contains 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
pullapprove
bot
requested review from
anush-apple,
austinh0,
balducci-apple,
carol-apple,
chrisdecenzo,
chulspro,
Damian-Nordic,
electrocucaracha,
franck-apple,
hawk248,
jelderton,
jepenven-silabs,
jmartinez-silabs,
kghost,
kpschoedel,
LuDuda,
lzgrablic02,
mlepage-google,
mrjerryjohns,
msandstedt,
mspang,
pan-apple,
robszewczyk,
sagar-apple,
saurabhst,
selissia,
tecimovic and
turon
November 11, 2021 18:47
pullapprove
bot
requested review from
vivien-apple,
wbschiller,
woody-apple and
yufengwangca
November 11, 2021 18:47
woody-apple
approved these changes
Nov 11, 2021
Fast tracking, given this is editing a test tool to improve tests. |
/rebase |
woody-apple
force-pushed
the
better-string-testing
branch
from
November 11, 2021 19:09
edf258e
to
5ee1d7f
Compare
bzbarsky-apple
force-pushed
the
better-string-testing
branch
from
November 11, 2021 20:42
5ee1d7f
to
811c6e8
Compare
This adds garbage to the ends of all the strings and octet strings being sent in yaml tests, and makes sure that garbage is not included in the length, so the span is correct. The idea is to catch cases where someone uses a span's pointer without checking its length. This also adds a way to embed a 0 byte in an octet string (by using \x00 in the yaml string) and adds support for both sending and checking for such values.
bzbarsky-apple
force-pushed
the
better-string-testing
branch
from
November 11, 2021 21:18
811c6e8
to
9c0b6dc
Compare
PR #11687: Size comparison from 4374a54 to 9c0b6dc Increases above 0.2%:
Increases (1 build for linux)
Full report (38 builds for efr32, esp32, k32w, linux, mbed, nrfconnect, p6, qpg, telink)
|
PSONALl
pushed a commit
to PSONALl/connectedhomeip
that referenced
this pull request
Dec 3, 2021
) This adds garbage to the ends of all the strings and octet strings being sent in yaml tests, and makes sure that garbage is not included in the length, so the span is correct. The idea is to catch cases where someone uses a span's pointer without checking its length. This also adds a way to embed a 0 byte in an octet string (by using \x00 in the yaml string) and adds support for both sending and checking for such values.
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.
This adds garbage to the ends of all the strings and octet strings
being sent in yaml tests, and makes sure that garbage is not included
in the length, so the span is correct. The idea is to catch cases
where someone uses a span's pointer without checking its length.
This also adds a way to embed a 0 byte in an octet string (by using
\x00 in the yaml string) and adds support for both sending and
checking for such values.
Problem
No testing of octet string with embedded null.
Change overview
Add support for it, and a test.
Testing
Manual inspection of the generated test code.