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-os-process-priority failing on my Windows machine #22799

Closed
kfarnung opened this issue Sep 10, 2018 · 6 comments
Closed

test-os-process-priority failing on my Windows machine #22799

kfarnung opened this issue Sep 10, 2018 · 6 comments
Labels
test Issues and PRs related to the tests. windows Issues and PRs related to the Windows platform.

Comments

@kfarnung
Copy link
Contributor

  • Version: master
  • Platform: Windows
  • Subsystem: os

When I run the test suite I get the following failure:

=== release test-os-process-priority ===
Path: parallel/test-os-process-priority
assert.js:84
  throw new AssertionError(obj);
  ^

AssertionError [ERR_ASSERTION]: Expected inputs to be strictly equal:

-14 !== -20

    at checkPriority (E:\GitHub\node\test\parallel\test-os-process-priority.js:120:12)
    at Object.<anonymous> (E:\GitHub\node\test\parallel\test-os-process-priority.js:97:3)
    at Module._compile (internal/modules/cjs/loader.js:689:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
    at Module.load (internal/modules/cjs/loader.js:599:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
    at Function.Module._load (internal/modules/cjs/loader.js:530:3)
    at Function.Module.runMain (internal/modules/cjs/loader.js:742:12)
    at startup (internal/bootstrap/node.js:270:19)
    at bootstrapNodeJSCore (internal/bootstrap/node.js:801:3)
Command: E:\GitHub\node\Release\node.exe E:\GitHub\node\test\parallel\test-os-process-priority.js

I verified manually that setting the highest priority on my machine ends up setting high priority without any errors:

> const os = require('os')
undefined
> os.getPriority(0)
0
> os.setPriority(0, os.constants.priority.PRIORITY_HIGHEST)
undefined
> os.getPriority(0)
-14
> os.constants.priority.PRIORITY_HIGHEST
-20

It seems like although I'm asking for the highest priority Windows is pushing me down a level.

@kfarnung
Copy link
Contributor Author

Looks like this API was added by @cjihrig in #22407, is anyone else having issues with this test on Windows?

kfarnung added a commit to kfarnung/node-chakracore that referenced this issue Sep 11, 2018
The test also fails in upstream node on my machine, mark it flaky on
Windows rather than skipping it.

Refs: nodejs/node#22799
@refack
Copy link
Contributor

refack commented Sep 11, 2018

Two new contributors saw this in the last week.
I can't repro, but my computer is in a weird UAC situation, so I'm guessing it might be an "Elevation" issue.

@kfarnung
Copy link
Contributor Author

That's my guess as well, the documentation doesn't call it out, but I suspect that the request for real-time priority is being downgraded transparently. I'm on Windows Insiders builds, so it's possible there's something with that as well.

kfarnung added a commit to kfarnung/node-chakracore that referenced this issue Sep 11, 2018
The test also fails in upstream node on my machine, mark it flaky on
Windows rather than skipping it.

Refs: nodejs/node#22799
kfarnung added a commit to kfarnung/node-chakracore that referenced this issue Sep 11, 2018
The test also fails in upstream node on my machine, mark it flaky on
Windows rather than skipping it.

Refs: nodejs/node#22799
PR-URL: nodejs#594
Reviewed-By: Seth Brenith <sethb@microsoft.com>
kfarnung added a commit to kfarnung/node-chakracore that referenced this issue Sep 11, 2018
The test also fails in upstream node on my machine, mark it flaky on
Windows rather than skipping it.

Refs: nodejs/node#22799
PR-URL: nodejs#594
Reviewed-By: Seth Brenith <sethb@microsoft.com>
@addaleax addaleax added windows Issues and PRs related to the Windows platform. test Issues and PRs related to the tests. labels Sep 11, 2018
@bzoz
Copy link
Contributor

bzoz commented Sep 12, 2018

The test fails for normal user and succeeds for elevated one.

bzoz added a commit to JaneaSystems/node that referenced this issue Sep 12, 2018
@bzoz
Copy link
Contributor

bzoz commented Sep 12, 2018

Fix in #22817

@richardlau
Copy link
Member

Is this related to the SeIncreaseBasePriorityPrivilege user privilege?

@danbev danbev closed this as completed in 6e746f1 Sep 19, 2018
targos pushed a commit that referenced this issue Sep 19, 2018
PR-URL: #22817
Fixes: #22799
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
targos pushed a commit that referenced this issue Sep 20, 2018
PR-URL: #22817
Fixes: #22799
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
test Issues and PRs related to the tests. windows Issues and PRs related to the Windows platform.
Projects
None yet
Development

No branches or pull requests

5 participants