From 9d8d7c63cb2d412e5c3d0ba8be8ff042756ca220 Mon Sep 17 00:00:00 2001 From: cjihrig Date: Tue, 11 Jan 2022 17:53:34 -0500 Subject: [PATCH] test: do not OR F_OK in fs.access() test MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit access() does not support OR'ing F_OK with other constants. This commit updates test-fs-access.js to not test that scenario. PR-URL: https://github.com/nodejs/node/pull/41484 Refs: https://github.com/libuv/libuv/pull/3410 Reviewed-By: Richard Lau Reviewed-By: Luigi Pinca Reviewed-By: Tobias Nießen --- test/parallel/test-fs-access.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/parallel/test-fs-access.js b/test/parallel/test-fs-access.js index 9fa4dfcf1fe4d8..d8e1c94300d2ed 100644 --- a/test/parallel/test-fs-access.js +++ b/test/parallel/test-fs-access.js @@ -82,10 +82,10 @@ fs.access(__filename, fs.R_OK, common.mustCall(function(...args) { fs.promises.access(__filename, fs.R_OK) .then(common.mustCall()) .catch(throwNextTick); -fs.access(readOnlyFile, fs.F_OK | fs.R_OK, common.mustCall(function(...args) { +fs.access(readOnlyFile, fs.R_OK, common.mustCall(function(...args) { assert.deepStrictEqual(args, [null]); })); -fs.promises.access(readOnlyFile, fs.F_OK | fs.R_OK) +fs.promises.access(readOnlyFile, fs.R_OK) .then(common.mustCall()) .catch(throwNextTick); @@ -153,7 +153,7 @@ assert.throws( // Regular access should not throw. fs.accessSync(__filename); -const mode = fs.F_OK | fs.R_OK | fs.W_OK; +const mode = fs.R_OK | fs.W_OK; fs.accessSync(readWriteFile, mode); // Invalid modes should throw.