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: improve test coverage for os package #44959

Merged
merged 1 commit into from
Oct 15, 2022

Conversation

juanarbol
Copy link
Member

No description provided.

@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 Oct 11, 2022
Comment on lines 113 to 114
// From libuv docs
// "The priority value range is between -20 (high priority) and 19 (low priority)"
Copy link
Contributor

Choose a reason for hiding this comment

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

This comment isn't really relevant here (or there is a bug in the code change). The range mentioned here is the priority that is passed to setPriority(), but you're calling getPriority().

The code change here is trying to get the priority of process id = -21. That explains why the error is ESRCH - although not on macOS apparently.

Copy link
Member Author

Choose a reason for hiding this comment

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

That makes sense. I will remove the comment.

Replacing -21 w/ -1 (negative numbers in general) should make the same effect; for that case, macOS will always return EINVAL as described in the getpriority() macOS ref. I will change the expected error to do a "match" instead.

@juanarbol juanarbol force-pushed the juan/os-getpriority-test branch from 6c3c9e9 to fac591b Compare October 14, 2022 16:45
@lpinca lpinca added the request-ci Add this label to start a Jenkins CI on a PR. label Oct 14, 2022
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Oct 14, 2022
@nodejs-github-bot
Copy link
Collaborator

@jasnell jasnell added the commit-queue Add this label to land a pull request using GitHub Actions. label Oct 15, 2022
@nodejs-github-bot nodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Oct 15, 2022
@nodejs-github-bot nodejs-github-bot merged commit 5e30559 into nodejs:main Oct 15, 2022
@nodejs-github-bot
Copy link
Collaborator

Landed in 5e30559

@juanarbol juanarbol deleted the juan/os-getpriority-test branch October 24, 2022 13:48
RafaelGSS pushed a commit that referenced this pull request Nov 1, 2022
PR-URL: #44959
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
@RafaelGSS RafaelGSS mentioned this pull request Nov 1, 2022
RafaelGSS pushed a commit that referenced this pull request Nov 10, 2022
PR-URL: #44959
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
danielleadams pushed a commit that referenced this pull request Dec 30, 2022
PR-URL: #44959
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
danielleadams pushed a commit that referenced this pull request Dec 30, 2022
PR-URL: #44959
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
danielleadams pushed a commit that referenced this pull request Jan 3, 2023
PR-URL: #44959
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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