From 9bc8532d56fc5c1f727919d21f464dff09316913 Mon Sep 17 00:00:00 2001 From: Ophestra Date: Tue, 26 Aug 2025 03:15:32 +0900 Subject: container/initdev: mount tmpfs on shm for ro dev Programs expect /dev/shm to be a writable tmpfs. Signed-off-by: Ophestra --- container/initdev_test.go | 2 ++ 1 file changed, 2 insertions(+) (limited to 'container/initdev_test.go') diff --git a/container/initdev_test.go b/container/initdev_test.go index 9d2529c9..de756d0b 100644 --- a/container/initdev_test.go +++ b/container/initdev_test.go @@ -645,6 +645,7 @@ func TestMountDevOp(t *testing.T) { {"readlink", expectArgs{"/host/proc/self/fd/1"}, "/dev/pts/2", nil}, {"bindMount", expectArgs{"/host/dev/pts/2", "/sysroot/dev/console", uintptr(0), false}, nil, nil}, {"remount", expectArgs{"/sysroot/dev", uintptr(1)}, nil, nil}, + {"mountTmpfs", expectArgs{"tmpfs", "/sysroot/dev/shm", uintptr(0x6), 0, os.FileMode(01777)}, nil, nil}, }, nil}, {"success rw", &Params{ParentPerm: 0750, RetainSession: true}, &MountDevOp{ @@ -715,6 +716,7 @@ func TestMountDevOp(t *testing.T) { {"mkdir", expectArgs{"/sysroot/dev/mqueue", os.FileMode(0750)}, nil, nil}, {"mount", expectArgs{"mqueue", "/sysroot/dev/mqueue", "mqueue", uintptr(0xe), ""}, nil, nil}, {"remount", expectArgs{"/sysroot/dev", uintptr(1)}, nil, nil}, + {"mountTmpfs", expectArgs{"tmpfs", "/sysroot/dev/shm", uintptr(0x6), 0, os.FileMode(01777)}, nil, nil}, }, nil}, }) -- cgit v1.3.1