Skip to content

Comments

TEST: Enable and fix test_bn2padded() in test/bntest.c#17133

Closed
levitte wants to merge 2 commits intoopenssl:masterfrom
levitte:fix-bntest-20211125
Closed

TEST: Enable and fix test_bn2padded() in test/bntest.c#17133
levitte wants to merge 2 commits intoopenssl:masterfrom
levitte:fix-bntest-20211125

Conversation

@levitte
Copy link
Member

@levitte levitte commented Nov 25, 2021

This looks like old code, written when the padded variety of BN_bn2bin()
was developped, and disabled by default... and forgotten.

A few simple changes to update it to the current API is all that was
needed to enable it.

This looks like old code, written when the padded variety of BN_bn2bin()
was developped, and disabled by default...  and forgotten.

A few simple changes to update it to the current API is all that was
needed to enable it.
@levitte levitte added branch: master Applies to master branch branch: 3.0 Applies to openssl-3.0 branch labels Nov 25, 2021
@levitte
Copy link
Member Author

levitte commented Nov 25, 2021

I see this as a bug in test/bntest.c; we forgot to update and enable the test code when the BN_bn2binpad() function had matured. Therefore, this should go to 3.0 as well as master.

@t8m
Copy link
Member

t8m commented Nov 25, 2021

CI failure is relevant.

@levitte
Copy link
Member Author

levitte commented Nov 25, 2021

CI failure is relevant.

Fixed

@t8m t8m added approval: done This pull request has the required number of approvals triaged: bug The issue/pr is/fixes a bug triaged: feature The issue/pr requests/adds a feature labels Nov 25, 2021
@t8m
Copy link
Member

t8m commented Nov 25, 2021

Approved for master. I am not sure about 3.0. Probably OTC needs to decide.

@t8m t8m added the hold: discussion The community needs to establish a consensus how to move forward with the issue or PR label Nov 25, 2021
@t8m
Copy link
Member

t8m commented Nov 25, 2021

Question for OTC to decide: Is adding a new test or fixing and enabling a broken old one a bug fix eligible for stable releases?

@paulidale
Copy link
Contributor

Adding a new test is against policy.
Fixing a bug in an existing test ought to be okay -- but if it's not failing is it really a bug?

This feels like it's a new test even though the code was there, it's conditioned away.

@levitte
Copy link
Member Author

levitte commented Nov 26, 2021

For me, it's quite clear cut. That test was supposed to do something, but did nothing, i.e. it fails to do what it was supposed to do. Bug. That it's graceful about its failure to do something doesn't matter in my mind.

But OK, OTC decision in the end.

@openssl-machine
Copy link
Collaborator

24 hours has passed since 'approval: done' was set, but as this PR has been updated in that time the label 'approval: ready to merge' is not being automatically set. Please review the updates and set the label manually.

@levitte levitte added the branch: 1.1.1 Applies to OpenSSL_1_1_1-stable branch (EOL) label Nov 26, 2021
@levitte
Copy link
Member Author

levitte commented Nov 26, 2021

Merged into master:

23750f6 TEST: Enable and fix test_bn2padded() in test/bntest.c

openssl-machine pushed a commit that referenced this pull request Nov 26, 2021
This looks like old code, written when the padded variety of BN_bn2bin()
was developped, and disabled by default...  and forgotten.

A few simple changes to update it to the current API is all that was
needed to enable it.

Reviewed-by: Tomas Mraz <[email protected]>
(Merged from #17133)
@mattcaswell
Copy link
Member

OTC: This is allowed for backport to 3.0 and 1.1.1

@mattcaswell mattcaswell removed the hold: discussion The community needs to establish a consensus how to move forward with the issue or PR label Nov 30, 2021
openssl-machine pushed a commit that referenced this pull request Nov 30, 2021
This looks like old code, written when the padded variety of BN_bn2bin()
was developped, and disabled by default...  and forgotten.

A few simple changes to update it to the current API is all that was
needed to enable it.

Reviewed-by: Tomas Mraz <[email protected]>
(Merged from #17133)

(cherry picked from commit 23750f6)
@levitte
Copy link
Member Author

levitte commented Nov 30, 2021

Backport merges:

3.0:
015e3f5 TEST: Enable and fix test_bn2padded() in test/bntest.c

1.1.1:
162bd56 TEST: Enable and fix test_bn2padded() in test/bntest.c

@levitte levitte closed this Nov 30, 2021
@levitte levitte deleted the fix-bntest-20211125 branch November 30, 2021 09:03
openssl-machine pushed a commit that referenced this pull request Nov 30, 2021
This looks like old code, written when the padded variety of BN_bn2bin()
was developped, and disabled by default...  and forgotten.

A few simple changes to update it to the current API is all that was
needed to enable it.

Reviewed-by: Tomas Mraz <[email protected]>
(Merged from #17133)

(cherry picked from commit 23750f6)