From ba65bb149a69f86fe26dd3a8381d95da8ba01add Mon Sep 17 00:00:00 2001 From: Filip Skokan Date: Mon, 31 Aug 2026 17:02:04 +0200 Subject: [PATCH] test: fix recursive fs.watch error fixture Use a child directory so recursive watcher setup always creates a second watch. Linux no longer watches regular files after the directory watcher optimization. Signed-off-by: Filip Skokan Assisted-by: Codex PR-URL: https://github.com/nodejs/node/pull/65683 Reviewed-By: James M Snell Reviewed-By: Rafael Gonzaga --- test/parallel/test-fs-watch-enoent.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/test/parallel/test-fs-watch-enoent.js b/test/parallel/test-fs-watch-enoent.js index 39c2a14b071..2a4befa72b3 100644 --- a/test/parallel/test-fs-watch-enoent.js +++ b/test/parallel/test-fs-watch-enoent.js @@ -99,8 +99,7 @@ tmpdir.refresh(); let calls = 0; expected.code = 'ENOSPC'; - fs.mkdirSync(directory); - fs.writeFileSync(`${directory}/file`, ''); + fs.mkdirSync(`${directory}/subdirectory`, { recursive: true }); fs.watch = common.mustCall(() => { if (calls++ === 0) { return { close };