Skip to content
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

Correct data corruption tests #613

Merged
merged 1 commit into from
Mar 27, 2020
Merged

Conversation

ilammy
Copy link
Collaborator

@ilammy ilammy commented Mar 26, 2020

Replace 256 - byte with ~byte as an example of data corruption. I don't know what the person writing that was thinking, but if the byte happens to be equal exactly 128 then 256 – 128 = 128, nothing gets corrupted, and the tests fail. They do occasionally fail, when the stars are just right, this was attributed to some issue in the token parsers of Secure Cell which ignored some of the bytes. Now all that code has been updated to be more strict so any changes in the data should be reliably detected and result in a failure.

Checklist

Replace "256 - byte" with "~byte" as an example of data corruption.
I don't know what the person writing that thought, but if the byte
happens to be equal exactly 128 then 256 - 128 = 128, nothing gets
corrupted, and the tests fail. They do occasionally fail, when the
stars are just right, this was attributed to some issue in the token
parsers of Secure Cell which ignored some of the bytes. Now all that
code has been updated to be more strict so *any* changes in the data
should be reliably detected and result in a failure.
@ilammy ilammy added tests Themis test suite W-WasmThemis 🌐 Wrapper: WasmThemis, JavaScript API, npm packages labels Mar 26, 2020
Copy link
Contributor

@vixentael vixentael left a comment

Choose a reason for hiding this comment

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

Don’t be so hard on yourself 🤗

@ilammy ilammy merged commit 3eeb737 into cossacklabs:master Mar 27, 2020
@ilammy ilammy deleted the wasm-flaky-test branch March 27, 2020 16:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tests Themis test suite W-WasmThemis 🌐 Wrapper: WasmThemis, JavaScript API, npm packages
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants