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-net-autoselectfamily for kernel without IPv6 support #48265

Merged

Conversation

LiviaMedeiros
Copy link
Contributor

If CONFIG_IPV6 is disabled, the observed error on some platforms is EAFNOSUPPORT instead of EADDRNOTAVAIL.

@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 May 31, 2023
@LiviaMedeiros LiviaMedeiros added the request-ci Add this label to start a Jenkins CI on a PR. label May 31, 2023
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label May 31, 2023
@nodejs-github-bot

This comment was marked as outdated.

@nodejs-github-bot

This comment was marked as outdated.

@nodejs-github-bot
Copy link
Collaborator

@@ -85,6 +85,8 @@ function createDnsServer(ipv6Addr, ipv4Addr, cb) {
if (common.hasIPv6) {
assert.strictEqual(error.code, 'ECONNREFUSED');
assert.strictEqual(error.message, `connect ECONNREFUSED ::1:${port}`);
} else if (error.code === 'EAFNOSUPPORT') {
assert.strictEqual(error.message, `connect EAFNOSUPPORT ::1:${port} - Local (undefined:undefined)`);
Copy link
Member

Choose a reason for hiding this comment

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

That undefined:undefined is a bit weird.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Well, it makes sense for systems without IPv6 support to not know how to represent invalid/unknown source [address]:port. 😄
It is possible to adjust all exceptionWithHostPort(..., additional) calls so they will try to provide more descriptive error in this specific case, but not worth it imho.

@lpinca lpinca added author ready PRs that have at least one approval, no pending requests for changes, and a CI started. commit-queue Add this label to land a pull request using GitHub Actions. labels Jun 4, 2023
@nodejs-github-bot nodejs-github-bot added commit-queue-failed An error occurred while landing this pull request using GitHub Actions. and removed commit-queue Add this label to land a pull request using GitHub Actions. labels Jun 4, 2023
@nodejs-github-bot
Copy link
Collaborator

Commit Queue failed
- Loading data for nodejs/node/pull/48265
✔  Done loading data for nodejs/node/pull/48265
----------------------------------- PR info ------------------------------------
Title      test: fix `test-net-autoselectfamily` for kernel without IPv6 support (#48265)
   ⚠  Could not retrieve the email or name of the PR author's from user's GitHub profile!
Branch     LiviaMedeiros:net-test-asf-cmd-option-noipv6 -> nodejs:main
Labels     test, author ready, needs-ci
Commits    1
 - test: fix `test-net-autoselectfamily` for kernel without IPv6 support
Committers 1
 - LiviaMedeiros 
PR-URL: https://github.com/nodejs/node/pull/48265
Reviewed-By: Luigi Pinca 
------------------------------ Generated metadata ------------------------------
PR-URL: https://github.com/nodejs/node/pull/48265
Reviewed-By: Luigi Pinca 
--------------------------------------------------------------------------------
   ℹ  This PR was created on Wed, 31 May 2023 16:13:48 GMT
   ✔  Approvals: 1
   ✔  - Luigi Pinca (@lpinca): https://github.com/nodejs/node/pull/48265#pullrequestreview-1456022547
   ✘  This PR needs to wait 82 more hours to land (or 0 hours if there is one more approval)
   ✔  Last GitHub CI successful
   ℹ  Last Full PR CI on 2023-06-01T12:55:51Z: https://ci.nodejs.org/job/node-test-pull-request/52050/
- Querying data for job/node-test-pull-request/52050/
   ✔  Last Jenkins CI successful
--------------------------------------------------------------------------------
   ✔  Aborted `git node land` session in /home/runner/work/node/node/.ncu
https://github.com/nodejs/node/actions/runs/5167492972

@LiviaMedeiros LiviaMedeiros added commit-queue Add this label to land a pull request using GitHub Actions. and removed commit-queue-failed An error occurred while landing this pull request using GitHub Actions. labels Jun 7, 2023
@nodejs-github-bot nodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Jun 7, 2023
@nodejs-github-bot nodejs-github-bot merged commit 9c5efdd into nodejs:main Jun 7, 2023
@nodejs-github-bot
Copy link
Collaborator

Landed in 9c5efdd

RafaelGSS pushed a commit that referenced this pull request Jul 3, 2023
PR-URL: #48265
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
@RafaelGSS RafaelGSS mentioned this pull request Jul 3, 2023
Ceres6 pushed a commit to Ceres6/node that referenced this pull request Aug 14, 2023
PR-URL: nodejs#48265
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Ceres6 pushed a commit to Ceres6/node that referenced this pull request Aug 14, 2023
PR-URL: nodejs#48265
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
@ruyadorno
Copy link
Member

hi @LiviaMedeiros this commit is not landing cleanly in v18.x-staging and will need manual backporting.

@ruyadorno ruyadorno added the backport-requested-v18.x PRs awaiting manual backport to the v18.x-staging branch. label Aug 29, 2023
@LiviaMedeiros
Copy link
Contributor Author

Sure; I'll open backport PR if https://github.com/nodejs/node/blame/v18.18.0-proposal/test/parallel/test-net-autoselectfamily-commandline-option.js will become affected by this problem and this PR still won't be landable.

Right now affected test seem to not rely in EADDRNOTAVAIL in v18.x branch (and there's a chance that the PR that added this test was semver-major) so this PR can be skipped.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
author ready PRs that have at least one approval, no pending requests for changes, and a CI started. backport-requested-v18.x PRs awaiting manual backport to the v18.x-staging branch. 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.

4 participants