mirror of
https://github.com/libuv/libuv
synced 2025-03-28 21:13:16 +00:00
test: handle uv_os_setpriority() windows edge case
Refs: https://github.com/nodejs/node/pull/22817 Refs: https://github.com/libuv/help/issues/64 PR-URL: https://github.com/libuv/libuv/pull/2002 Reviewed-By: Bartosz Sosnowski <bartosz@janeasystems.com>
This commit is contained in:
parent
3dc0f53965
commit
4bd01873eb
@ -54,8 +54,10 @@ TEST_IMPL(process_priority) {
|
||||
#ifndef _WIN32
|
||||
ASSERT(priority == i);
|
||||
#else
|
||||
/* On Windows, only elevated users can set UV_PRIORITY_HIGHEST. Other
|
||||
users will silently be set to UV_PRIORITY_HIGH. */
|
||||
if (i < UV_PRIORITY_HIGH)
|
||||
ASSERT(priority == UV_PRIORITY_HIGHEST);
|
||||
ASSERT(priority == UV_PRIORITY_HIGHEST || priority == UV_PRIORITY_HIGH);
|
||||
else if (i < UV_PRIORITY_ABOVE_NORMAL)
|
||||
ASSERT(priority == UV_PRIORITY_HIGH);
|
||||
else if (i < UV_PRIORITY_NORMAL)
|
||||
|
Loading…
x
Reference in New Issue
Block a user