diff options
| author | Ophestra <cat@gensokyo.uk> | 2025-08-26 03:15:32 +0900 |
|---|---|---|
| committer | Ophestra <cat@gensokyo.uk> | 2025-08-26 03:27:07 +0900 |
| commit | 9bc8532d56fc5c1f727919d21f464dff09316913 (patch) | |
| tree | 1c933c8c4fec2c0516b3f70fe8d5bb75cc2259dc /test | |
| parent | 07194c74cb464cb073cabda33779c1782eaf0d74 (diff) | |
container/initdev: mount tmpfs on shm for ro dev
Programs expect /dev/shm to be a writable tmpfs.
Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'test')
| -rw-r--r-- | test/sandbox/case/mapuid.nix | 3 | ||||
| -rw-r--r-- | test/sandbox/case/pd.nix | 3 | ||||
| -rw-r--r-- | test/sandbox/case/pdlike.nix | 3 | ||||
| -rw-r--r-- | test/sandbox/case/preset.nix | 3 | ||||
| -rw-r--r-- | test/sandbox/case/tty.nix | 3 |
5 files changed, 10 insertions, 5 deletions
diff --git a/test/sandbox/case/mapuid.nix b/test/sandbox/case/mapuid.nix index 486d4390..d0335796 100644 --- a/test/sandbox/case/mapuid.nix +++ b/test/sandbox/case/mapuid.nix @@ -72,7 +72,7 @@ in ptmx = fs "80001ff" null null; pts = fs "800001ed" { ptmx = fs "42001b6" null null; } null; random = fs "42001b6" null null; - shm = fs "800001ed" { } null; + shm = fs "801001ff" { } null; stderr = fs "80001ff" null null; stdin = fs "80001ff" null null; stdout = fs "80001ff" null null; @@ -256,6 +256,7 @@ in (ent "/" "/.hakurei/store" "rw,relatime" "overlay" "overlay" "rw,lowerdir=/host/nix/.ro-store:/host/nix/.rw-store/upper,upperdir=/host/tmp/.hakurei-store-rw/upper,workdir=/host/tmp/.hakurei-store-rw/work,redirect_dir=nofollow,userxattr") (ent "/etc" ignore "ro,nosuid,nodev,relatime" "ext4" "/dev/disk/by-label/nixos" "rw") (ent "/var/lib/hakurei/u0/a3" "/var/lib/hakurei/u0/a3" "rw,nosuid,nodev,relatime" "ext4" "/dev/disk/by-label/nixos" "rw") + (ent "/" "/dev/shm" "rw,nosuid,nodev,relatime" "tmpfs" "ephemeral" "rw,uid=1000003,gid=1000003") (ent "/" "/run/user" "rw,nosuid,nodev,relatime" "tmpfs" "ephemeral" "rw,size=4k,mode=755,uid=1000003,gid=1000003") (ent "/tmp/hakurei.0/runtime/3" "/run/user/1000" "rw,nosuid,nodev,relatime" "ext4" "/dev/disk/by-label/nixos" "rw") (ent "/tmp/hakurei.0/tmpdir/3" "/tmp" "rw,nosuid,nodev,relatime" "ext4" "/dev/disk/by-label/nixos" "rw") diff --git a/test/sandbox/case/pd.nix b/test/sandbox/case/pd.nix index 6bad3e73..0222892e 100644 --- a/test/sandbox/case/pd.nix +++ b/test/sandbox/case/pd.nix @@ -36,7 +36,7 @@ ptmx = fs "80001ff" null null; pts = fs "800001ed" { ptmx = fs "42001b6" null null; } null; random = fs "42001b6" null null; - shm = fs "800001ed" { } null; + shm = fs "801001ff" { } null; stderr = fs "80001ff" null null; stdin = fs "80001ff" null null; stdout = fs "80001ff" null null; @@ -185,6 +185,7 @@ (ent "/etc" ignore "ro,nosuid,nodev,relatime" "ext4" "/dev/disk/by-label/nixos" "rw") (ent "/" "/run/user/1000" "rw,nosuid,nodev,relatime" "tmpfs" "ephemeral" "rw,size=8k,mode=755,uid=1000000,gid=1000000") (ent "/" "/run/dbus" "rw,nosuid,nodev,relatime" "tmpfs" "ephemeral" "rw,size=8k,mode=755,uid=1000000,gid=1000000") + (ent "/" "/dev/shm" "rw,nosuid,nodev,relatime" "tmpfs" "ephemeral" "rw,uid=1000000,gid=1000000") (ent "/" "/run/user" "rw,nosuid,nodev,relatime" "tmpfs" "ephemeral" "rw,size=4k,mode=755,uid=1000000,gid=1000000") (ent "/tmp/hakurei.0/runtime/0" "/run/user/65534" "rw,nosuid,nodev,relatime" "ext4" "/dev/disk/by-label/nixos" "rw") (ent "/tmp/hakurei.0/tmpdir/0" "/tmp" "rw,nosuid,nodev,relatime" "ext4" "/dev/disk/by-label/nixos" "rw") diff --git a/test/sandbox/case/pdlike.nix b/test/sandbox/case/pdlike.nix index 1fdc5925..60dcef55 100644 --- a/test/sandbox/case/pdlike.nix +++ b/test/sandbox/case/pdlike.nix @@ -70,7 +70,7 @@ in ptmx = fs "80001ff" null null; pts = fs "800001ed" { ptmx = fs "42001b6" null null; } null; random = fs "42001b6" null null; - shm = fs "800001ed" { } null; + shm = fs "801001ff" { } null; stderr = fs "80001ff" null null; stdin = fs "80001ff" null null; stdout = fs "80001ff" null null; @@ -251,6 +251,7 @@ in (ent "/dri" "/dev/dri" "rw,nosuid" "devtmpfs" "devtmpfs" ignore) (ent "/etc" ignore "ro,nosuid,nodev,relatime" "ext4" "/dev/disk/by-label/nixos" "rw") (ent "/var/lib/hakurei/u0/a5" "/var/lib/hakurei/u0/a5" "rw,nosuid,nodev,relatime" "ext4" "/dev/disk/by-label/nixos" "rw") + (ent "/" "/dev/shm" "rw,nosuid,nodev,relatime" "tmpfs" "ephemeral" "rw,uid=1000005,gid=1000005") (ent "/" "/run/user" "rw,nosuid,nodev,relatime" "tmpfs" "ephemeral" "rw,size=4k,mode=755,uid=1000005,gid=1000005") (ent "/tmp/hakurei.0/runtime/5" "/run/user/65534" "rw,nosuid,nodev,relatime" "ext4" "/dev/disk/by-label/nixos" "rw") (ent "/tmp/hakurei.0/tmpdir/5" "/tmp" "rw,nosuid,nodev,relatime" "ext4" "/dev/disk/by-label/nixos" "rw") diff --git a/test/sandbox/case/preset.nix b/test/sandbox/case/preset.nix index 721659f5..ba1ab4c9 100644 --- a/test/sandbox/case/preset.nix +++ b/test/sandbox/case/preset.nix @@ -69,7 +69,7 @@ in ptmx = fs "80001ff" null null; pts = fs "800001ed" { ptmx = fs "42001b6" null null; } null; random = fs "42001b6" null null; - shm = fs "800001ed" { } null; + shm = fs "801001ff" { } null; stderr = fs "80001ff" null null; stdin = fs "80001ff" null null; stdout = fs "80001ff" null null; @@ -249,6 +249,7 @@ in (ent "/dri" "/dev/dri" "rw,nosuid" "devtmpfs" "devtmpfs" ignore) (ent "/etc" ignore "ro,nosuid,nodev,relatime" "ext4" "/dev/disk/by-label/nixos" "rw") (ent "/var/lib/hakurei/u0/a1" "/var/lib/hakurei/u0/a1" "rw,nosuid,nodev,relatime" "ext4" "/dev/disk/by-label/nixos" "rw") + (ent "/" "/dev/shm" "rw,nosuid,nodev,relatime" "tmpfs" "ephemeral" "rw,uid=1000001,gid=1000001") (ent "/" "/run/user" "rw,nosuid,nodev,relatime" "tmpfs" "ephemeral" "rw,size=4k,mode=755,uid=1000001,gid=1000001") (ent "/tmp/hakurei.0/runtime/1" "/run/user/65534" "rw,nosuid,nodev,relatime" "ext4" "/dev/disk/by-label/nixos" "rw") (ent "/tmp/hakurei.0/tmpdir/1" "/tmp" "rw,nosuid,nodev,relatime" "ext4" "/dev/disk/by-label/nixos" "rw") diff --git a/test/sandbox/case/tty.nix b/test/sandbox/case/tty.nix index 0aed7831..f06a9068 100644 --- a/test/sandbox/case/tty.nix +++ b/test/sandbox/case/tty.nix @@ -74,7 +74,7 @@ in ptmx = fs "80001ff" null null; pts = fs "800001ed" { ptmx = fs "42001b6" null null; } null; random = fs "42001b6" null null; - shm = fs "800001ed" { } null; + shm = fs "801001ff" { } null; stderr = fs "80001ff" null null; stdin = fs "80001ff" null null; stdout = fs "80001ff" null null; @@ -261,6 +261,7 @@ in (ent "/" "/.hakurei/store" "rw,relatime" "overlay" "overlay" "rw,lowerdir=/host/nix/.ro-store:/host/nix/.rw-store/upper,upperdir=/host/tmp/.hakurei-store-rw/upper,workdir=/host/tmp/.hakurei-store-rw/work,redirect_dir=nofollow,uuid=on,userxattr") (ent "/etc" ignore "ro,nosuid,nodev,relatime" "ext4" "/dev/disk/by-label/nixos" "rw") (ent "/var/lib/hakurei/u0/a2" "/var/lib/hakurei/u0/a2" "rw,nosuid,nodev,relatime" "ext4" "/dev/disk/by-label/nixos" "rw") + (ent "/" "/dev/shm" "rw,nosuid,nodev,relatime" "tmpfs" "ephemeral" "rw,uid=1000002,gid=1000002") (ent "/" "/run/user" "rw,nosuid,nodev,relatime" "tmpfs" "ephemeral" "rw,size=4k,mode=755,uid=1000002,gid=1000002") (ent "/tmp/hakurei.0/runtime/2" "/run/user/65534" "rw,nosuid,nodev,relatime" "ext4" "/dev/disk/by-label/nixos" "rw") (ent "/tmp/hakurei.0/tmpdir/2" "/tmp" "rw,nosuid,nodev,relatime" "ext4" "/dev/disk/by-label/nixos" "rw") |
