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

Fix bn_assert_fits_in_bytes for big-endian #1258

Merged
merged 1 commit into from
Nov 15, 2023

Conversation

justsmth
Copy link
Contributor

@justsmth justsmth commented Oct 19, 2023

Issues:

N/A

Description of changes:

  • A recently merged upstream commit broke big-endian.
  • This change fixes bn_assert_fits_in_bytes for big-endian and adds new testing for the function.

Call-outs:

N/A

Testing:

PPC32:

❯ ppc-qemu.sh crypto/crypto_test --gtest_filter="BNAssertTest.*" 2>/dev/null
Note: Google Test filter = BNAssertTest.*
[==========] Running 4 tests from 1 test suite.
[----------] Global test environment set-up.
[----------] 4 tests from BNAssertTest
[ RUN      ] BNAssertTest.assert_fits_in_bytes_large
[       OK ] BNAssertTest.assert_fits_in_bytes_large (13019 ms)
[ RUN      ] BNAssertTest.assert_fits_in_bytes_small
[       OK ] BNAssertTest.assert_fits_in_bytes_small (6170 ms)
[ RUN      ] BNAssertTest.assert_fits_in_bytes_zero
[       OK ] BNAssertTest.assert_fits_in_bytes_zero (1 ms)
[ RUN      ] BNAssertTest.assert_fits_in_bytes_boundary
[       OK ] BNAssertTest.assert_fits_in_bytes_boundary (16484 ms)
[----------] 4 tests from BNAssertTest (35682 ms total)

[----------] Global test environment tear-down
[==========] 4 tests from 1 test suite ran. (35693 ms total)
[  PASSED  ] 4 tests.

PPC64:

❯ ppc64-qemu.sh crypto/crypto_test --gtest_filter="BNAssertTest.*" 2>/dev/null
Note: Google Test filter = BNAssertTest.*
[==========] Running 4 tests from 1 test suite.
[----------] Global test environment set-up.
[----------] 4 tests from BNAssertTest
[ RUN      ] BNAssertTest.assert_fits_in_bytes_large
[       OK ] BNAssertTest.assert_fits_in_bytes_large (16466 ms)
[ RUN      ] BNAssertTest.assert_fits_in_bytes_small
[       OK ] BNAssertTest.assert_fits_in_bytes_small (6157 ms)
[ RUN      ] BNAssertTest.assert_fits_in_bytes_zero
[       OK ] BNAssertTest.assert_fits_in_bytes_zero (0 ms)
[ RUN      ] BNAssertTest.assert_fits_in_bytes_boundary
[       OK ] BNAssertTest.assert_fits_in_bytes_boundary (13748 ms)
[----------] 4 tests from BNAssertTest (36375 ms total)

[----------] Global test environment tear-down
[==========] 4 tests from 1 test suite ran. (36382 ms total)
[  PASSED  ] 4 tests.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license and the ISC license.

@justsmth justsmth requested a review from a team as a code owner October 19, 2023 14:36
@justsmth justsmth force-pushed the fix-be-bn-assert-fits branch from 0e41287 to 1d5272e Compare October 19, 2023 20:15
@justsmth justsmth requested review from nebeid and dkostic October 20, 2023 12:20
@justsmth justsmth force-pushed the fix-be-bn-assert-fits branch 2 times, most recently from f7a1820 to 75e976a Compare October 20, 2023 18:57
@justsmth justsmth force-pushed the fix-be-bn-assert-fits branch from 4165279 to 097b018 Compare November 3, 2023 14:09
@justsmth justsmth enabled auto-merge (squash) November 3, 2023 22:15
@justsmth justsmth force-pushed the fix-be-bn-assert-fits branch from 097b018 to e82a177 Compare November 15, 2023 14:02
@justsmth justsmth merged commit af43516 into aws:main Nov 15, 2023
19 checks passed
@justsmth justsmth deleted the fix-be-bn-assert-fits branch November 15, 2023 16:43
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.

3 participants