From 7e6834ba5eff5c0e61891ec1935e5e0ca8291c2f Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Thu, 29 Oct 2026 12:32:23 -0300 Subject: tests on FreeBSD: Linux's /proc/1 fixtures, the builtins lists, daemon.py and fs.py without /proc - The refusing directory some tests name is Linux's /proc/1/root: that part skips elsewhere. The committed builtins-*.json are Linux builds' (Tty9p): their check skips, and a key the docs give a word this build leaves out is found in the other's list. - kitty: a shared memory object is sized before it is written (FreeBSD's write does not grow it); a FIFO in /dev/shm is Linux's case. - daemon.py asks ps and procstat where there is no /proc, and finds bash on PATH. fs.py runs printenv once a name, and skips two permission checks as root, who searches and writes anywhere. Co-Authored-By: Claude Opus 5.5 --- src/fs.zig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/fs.zig') diff --git a/src/fs.zig b/src/fs.zig index 08379697..9104c93f 100644 --- a/src/fs.zig +++ b/src/fs.zig @@ -708,7 +708,8 @@ pub fn deniedAbove(dir: []const u8) bool { } test "a directory under one that may not be searched or written is denied, one merely missing is not" { - try std.testing.expect(deniedAbove("/proc/1/root/x/y")); + // The refusing directory is Linux's /proc/1/root. + if (comptime @import("builtin").os.tag == .linux) try std.testing.expect(deniedAbove("/proc/1/root/x/y")); try std.testing.expect(!deniedAbove("/tmp/pardes-surely-missing-dir/a/b")); } -- cgit v1.3