ring icon indicating copy to clipboard operation
ring copied to clipboard

Use non-zero value when initializing test buffers

Open caio opened this issue 5 years ago • 2 comments

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 avatar Dec 20 '20 13:12 caio

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

caio avatar Dec 20 '20 13:12 caio

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%) :arrow_up:
tests/digest_tests.rs 95.19% <ø> (ø)
src/aead/chacha.rs 99.23% <100.00%> (-0.23%) :arrow_down:
src/ec/suite_b/ecdh.rs 100.00% <100.00%> (ø)
src/rsa/padding.rs 98.17% <100.00%> (+0.02%) :arrow_up:
src/rsa/signing.rs 97.10% <100.00%> (ø)
tests/aead_tests.rs 97.14% <100.00%> (-0.91%) :arrow_down:
tests/hkdf_tests.rs 95.08% <100.00%> (ø)
tests/hmac_tests.rs 94.91% <100.00%> (-0.25%) :arrow_down:
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.

codecov[bot] avatar Dec 20 '20 13:12 codecov[bot]