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

test: fix test test-tls-dhe for OpenSSL32 #54903

Merged
merged 2 commits into from
Sep 14, 2024

Conversation

mhdawson
Copy link
Member

Refs: #53382

  • OpenSSL32 has a minimum dh key size by 2048 by default.
  • Adjust test to use larger 3072 key instead of 1024 when OpenSSL32 is present.

Refs: nodejs#53382

- OpenSSL32 has a minimum dh key size by 2048 by default.
- Adjust test to use larger 3072 key instead of 1024
  when OpenSSL32 is present.

Signed-off-by: Michael Dawson <midawson@redhat.com>
@nodejs-github-bot nodejs-github-bot added needs-ci PRs that need a full CI run. test Issues and PRs related to the tests. labels Sep 12, 2024
@mhdawson
Copy link
Member Author

mhdawson commented Sep 12, 2024

if (!common.hasOpenSSL(3, 2)) {
await testCustomParam(1024, dheCipher);
} else {
await testCustomParam(3072, dheCipher);
Copy link
Member

Choose a reason for hiding this comment

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

Do we need to test 3072-bit keys? We're already testing 2048-bit keys on the line below. And if we do need to test 3072-bit keys, that could be with all version of OpenSSL?

Copy link
Member Author

Choose a reason for hiding this comment

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

We tested with two different keys before so I kept it that way, we could add 3072 for all versions but that might add to runtime. I think what is in the PR is my first choice but I don't feel to strongly one way or the other.

Copy link
Member

@lpinca lpinca Sep 12, 2024

Choose a reason for hiding this comment

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

I think testing the 3072-bit key will only slow down the test, but I also have no strong opinion.

Copy link

codecov bot commented Sep 12, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 88.05%. Comparing base (9db6327) to head (722f460).
Report is 23 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #54903   +/-   ##
=======================================
  Coverage   88.05%   88.05%           
=======================================
  Files         651      651           
  Lines      183405   183405           
  Branches    35822    35823    +1     
=======================================
  Hits       161499   161499           
+ Misses      15159    15158    -1     
- Partials     6747     6748    +1     

see 24 files with indirect coverage changes

Signed-off-by: Michael Dawson <midawson@redhat.com>
@richardlau
Copy link
Member

CI run on OpenSSL32 - https://ci.nodejs.org/job/richardlau-node-test-commit-linux-containered/42/

Test has failed:
https://ci.nodejs.org/job/richardlau-node-test-commit-linux-containered/42/nodes=ubuntu2204_sharedlibs_openssl32_x64/testReport/junit/(root)/parallel/test_tls_dhe/

duration_ms: 428.137
exitcode: 1
severity: fail
stack: |-
  Mismatched <anonymous> function calls. Expected exactly 1, actual 0.
      at mustCall (/home/iojs/build/workspace/richardlau-node-test-commit-linux-containered/test/common/index.js:451:10)
      at _expectWarning (/home/iojs/build/workspace/richardlau-node-test-commit-linux-containered/test/common/index.js:690:10)
      at Proxy.expectWarning (/home/iojs/build/workspace/richardlau-node-test-commit-linux-containered/test/common/index.js:726:31)
      at Object.<anonymous> (/home/iojs/build/workspace/richardlau-node-test-commit-linux-containered/test/parallel/test-tls-dhe.js:47:8)
      at Module._compile (node:internal/modules/cjs/loader:1546:14)
      at Module._extensions..js (node:internal/modules/cjs/loader:1691:10)
      at Module.load (node:internal/modules/cjs/loader:1317:32)
      at Module._load (node:internal/modules/cjs/loader:1127:12)
      at TracingChannel.traceSync (node:diagnostics_channel:315:14)
...

@mhdawson
Copy link
Member Author

another run on openssl after pushing an update to address one thing I'd missed - https://ci.nodejs.org/job/richardlau-node-test-commit-linux-containered/44/

@mhdawson
Copy link
Member Author

@richardlau, test passes on OpenSSL32 after the update.

@richardlau richardlau added the request-ci Add this label to start a Jenkins CI on a PR. label Sep 12, 2024
@richardlau richardlau added the commit-queue-squash Add this label to instruct the Commit Queue to squash all the PR commits into the first one. label Sep 12, 2024
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Sep 12, 2024
@nodejs-github-bot

This comment was marked as outdated.

@mhdawson mhdawson added the request-ci Add this label to start a Jenkins CI on a PR. label Sep 12, 2024
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Sep 12, 2024
@nodejs-github-bot

This comment was marked as outdated.

@nodejs-github-bot
Copy link
Collaborator

nodejs-github-bot commented Sep 12, 2024

@richardlau richardlau added the commit-queue Add this label to land a pull request using GitHub Actions. label Sep 13, 2024
@nodejs-github-bot nodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Sep 14, 2024
@nodejs-github-bot nodejs-github-bot merged commit c4f2954 into nodejs:main Sep 14, 2024
62 checks passed
@nodejs-github-bot
Copy link
Collaborator

Landed in c4f2954

RafaelGSS pushed a commit that referenced this pull request Sep 16, 2024
Refs: #53382

- OpenSSL32 has a minimum dh key size by 2048 by default.
- Adjust test to use larger 3072 key instead of 1024
  when OpenSSL32 is present.

Signed-off-by: Michael Dawson <midawson@redhat.com>
PR-URL: #54903
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
@RafaelGSS RafaelGSS mentioned this pull request Sep 16, 2024
RafaelGSS pushed a commit that referenced this pull request Sep 16, 2024
Refs: #53382

- OpenSSL32 has a minimum dh key size by 2048 by default.
- Adjust test to use larger 3072 key instead of 1024
  when OpenSSL32 is present.

Signed-off-by: Michael Dawson <midawson@redhat.com>
PR-URL: #54903
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
RafaelGSS pushed a commit that referenced this pull request Sep 17, 2024
Refs: #53382

- OpenSSL32 has a minimum dh key size by 2048 by default.
- Adjust test to use larger 3072 key instead of 1024
  when OpenSSL32 is present.

Signed-off-by: Michael Dawson <midawson@redhat.com>
PR-URL: #54903
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
RafaelGSS pushed a commit that referenced this pull request Sep 17, 2024
Refs: #53382

- OpenSSL32 has a minimum dh key size by 2048 by default.
- Adjust test to use larger 3072 key instead of 1024
  when OpenSSL32 is present.

Signed-off-by: Michael Dawson <midawson@redhat.com>
PR-URL: #54903
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
commit-queue-squash Add this label to instruct the Commit Queue to squash all the PR commits into the first one. needs-ci PRs that need a full CI run. test Issues and PRs related to the tests.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants