test: skip test failing when run under root

Signed-off-by: LiviaMedeiros <livia@cirno.name>
PR-URL: https://github.com/nodejs/node/pull/66666
Reviewed-By: Xuguang Mei <meixuguang@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
This commit is contained in:
Livia Medeiros authored and GitHub committed 2026-10-13 18:55:52 +00:00
1 parent ea6ec93b2f
commit 4599b6a0f2
1 file changed
+3
@@ -6,6 +6,9 @@ const fs = require('node:fs');
const path = require('node:path');
const { execSync } = require('child_process');
if (!common.isWindows && process.getuid() === 0)
common.skip('running this test as root would ignore directory permissions');
tmpdir.refresh(); // Prepare a clean temporary directory
function countOccurrences(haystack, needle) {