From f270462c09ddfd770291a7c8a2cd204b2c63d730 Mon Sep 17 00:00:00 2001 From: Livia Medeiros Date: Thu, 21 Nov 2024 03:25:05 +0900 Subject: [PATCH] test: fix determining lower priority PR-URL: https://github.com/nodejs/node/pull/55908 Fixes: https://github.com/NixOS/nixpkgs/issues/355919 Reviewed-By: Luigi Pinca Reviewed-By: Antoine du Hamel --- test/parallel/test-os.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/parallel/test-os.js b/test/parallel/test-os.js index efaec2b3ead385..3d9fe5c1a60e2e 100644 --- a/test/parallel/test-os.js +++ b/test/parallel/test-os.js @@ -84,7 +84,8 @@ assert.ok(hostname.length > 0); // IBMi process priority is different. if (!common.isIBMi) { const { PRIORITY_BELOW_NORMAL, PRIORITY_LOW } = os.constants.priority; - const LOWER_PRIORITY = os.getPriority() > PRIORITY_BELOW_NORMAL ? PRIORITY_BELOW_NORMAL : PRIORITY_LOW; + // Priority means niceness: higher numeric value <=> lower priority + const LOWER_PRIORITY = os.getPriority() < PRIORITY_BELOW_NORMAL ? PRIORITY_BELOW_NORMAL : PRIORITY_LOW; os.setPriority(LOWER_PRIORITY); const priority = os.getPriority(); is.number(priority);