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

Use non-zero value when initializing test buffers #1157

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Use non-zero value when initializing test buffers #1157

wants to merge 1 commit into from

Conversation

caio
Copy link

@caio caio commented Dec 20, 2020

Hi!

Picking up from PRs #564 and #600:

  • The constant is in the test module now as UNINITIALIZED_U8 with
    value 0xDE
  • Left the lone zeroed usize buffer untouched

I tried to find every candidate in tests/ and found a few tests from
inside src/ too.

And I've opted to leave the buffers from max_input_tests! in
src/digest.rs untouched as they are about the input length, but let me
know if you prefer otherwise.

Aside: the README recommends running cargo test --no-default-features
prior to a PR but it fails to compile for me (Windows, WSL2 with Ubuntu
20.04) because the test_file! macro is gated by the alloc feature.
Running cargo test --no-default-features --features alloc works fine.

@caio
Copy link
Author

caio commented Dec 20, 2020

Force-pushed an update to the branch due to a failed rustfmt check. That one should pass now :)

@codecov
Copy link

codecov bot commented Dec 20, 2020

Codecov Report

Merging #1157 (dd831cb) into main (1c36465) will decrease coverage by 1.77%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1157      +/-   ##
==========================================
- Coverage   93.69%   91.92%   -1.78%     
==========================================
  Files         115      106       -9     
  Lines       17462    14248    -3214     
==========================================
- Hits        16361    13097    -3264     
- Misses       1101     1151      +50     
Impacted Files Coverage Δ
src/test.rs 89.45% <ø> (+0.04%) ⬆️
tests/digest_tests.rs 95.19% <ø> (ø)
src/aead/chacha.rs 99.23% <100.00%> (-0.23%) ⬇️
src/ec/suite_b/ecdh.rs 100.00% <100.00%> (ø)
src/rsa/padding.rs 98.17% <100.00%> (+0.02%) ⬆️
src/rsa/signing.rs 97.10% <100.00%> (ø)
tests/aead_tests.rs 97.14% <100.00%> (-0.91%) ⬇️
tests/hkdf_tests.rs 95.08% <100.00%> (ø)
tests/hmac_tests.rs 94.91% <100.00%> (-0.25%) ⬇️
tests/pbkdf2_tests.rs 87.50% <100.00%> (ø)
... and 55 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1c36465...53e6d6c. Read the comment docs.

I agree to license my contributions to each file under the terms given
at the top of each file I changed.

Closes #128
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.

1 participant