FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

test: add fix so that test exits if port 42 is unprivileged by 7suyash7 · Pull Request #45904 · nodejs/node · GitHub

/ node Public

test: add fix so that test exits if port 42 is unprivileged - #45904

Merged
nodejs-github-bot merged 6 commits into
nodejs:mainfrom
7suyash7:test
Jan 18, 2023
Merged

test: add fix so that test exits if port 42 is unprivileged#45904
nodejs-github-bot merged 6 commits into
nodejs:mainfrom
7suyash7:test

Conversation

Copy link
Copy Markdown
Contributor

fixes: #45838

nodejs-github-bot added needs-ci PRs that need a full CI run. test Issues and PRs related to the tests. labels Dec 18, 2022

Copy link
Copy Markdown
Member

The way the test is written now makes it possible for future regressions to go undetected so that's no good, unfortunately.

I'd simply call out to sysctl(1) with execSync() to check the value. There's at least one other instance of that in our test suite so it's not without precedent.

Copy link
Copy Markdown
Contributor Author

Okay, I'll make these changes

Copy link
Copy Markdown
Contributor Author

@bnoordhuis is this fine?

Copy link
Copy Markdown
Contributor Author

added these changes @bnoordhuis

Copy link
Copy Markdown
Contributor Author

Can you try merging again? Had some lint errors, hopefully, they are fixed now. @bnoordhuis

Copy link
Copy Markdown
Contributor Author

Can you please take a look?

const { execSync } = require('child_process');

if (common.isLinux) {
const sysctlOutput = execSync('sysctl net.ipv4.ip_unprivileged_port_start').toString();

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Add a comment?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Sure, should I add one now? (PR is closing to merging I think...)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

PR is closing to merging I think...

I am not sure what you mean here, you can still push changes and I'll re-run CI after :]

If you prefer to put it in another change to practice making changes in Node.js as a new contributor - that's also fine with me.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

I would like it if I could put it in another change so I can practice making changes, that would be really helpful!

benjamingr added the request-ci Add this label to start a Jenkins CI on a PR. label Dec 22, 2022
github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Dec 22, 2022

Copy link
Copy Markdown
Collaborator

lpinca added the commit-queue-squash Add this label to instruct the Commit Queue to squash all the PR commits into the first one. label Jan 10, 2023
lpinca added the commit-queue Add this label to land a pull request using GitHub Actions. label Jan 18, 2023
nodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Jan 18, 2023
nodejs-github-bot merged commit 60cc1ba into nodejs:main Jan 18, 2023

Copy link
Copy Markdown
Collaborator

Landed in 60cc1ba

RafaelGSS pushed a commit that referenced this pull request Jan 20, 2023
PR-URL: #45904
Fixes: #45838
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
RafaelGSS mentioned this pull request Jan 20, 2023
juanarbol pushed a commit that referenced this pull request Jan 26, 2023
PR-URL: #45904
Fixes: #45838
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
juanarbol mentioned this pull request Jan 28, 2023
juanarbol pushed a commit that referenced this pull request Jan 31, 2023
PR-URL: #45904
Fixes: #45838
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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.

test: check net.ipv4.ip_unprivileged_port_start in parallel/test-cluster-bind-privileged-port

5 participants


Back | FazBrowse Home | New Git URL