hst/fs: valid method on underlying interface
All checks were successful
Test / Create distribution (push) Successful in 33s
Test / Sandbox (push) Successful in 1m59s
Test / Hakurei (push) Successful in 3m6s
Test / Hpkg (push) Successful in 4m16s
Test / Sandbox (race detector) (push) Successful in 4m24s
Test / Hakurei (race detector) (push) Successful in 5m7s
Test / Flake checks (push) Successful in 1m39s

Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
2025-08-14 21:36:22 +09:00
parent c989e7785a
commit 0e543a58b3
6 changed files with 38 additions and 22 deletions

View File

@@ -10,14 +10,14 @@ import (
func TestFSEphemeral(t *testing.T) {
checkFs(t, "ephemeral", []fsTestCase{
{"nil", (*hst.FSEphemeral)(nil), nil, nil, nil, "<invalid>"},
{"nil", (*hst.FSEphemeral)(nil), false, nil, nil, nil, "<invalid>"},
{"full", &hst.FSEphemeral{
Dst: m("/run/user/65534"),
Write: true,
Size: 1 << 10,
Perm: 0700,
}, container.Ops{&container.MountTmpfsOp{
}, true, container.Ops{&container.MountTmpfsOp{
FSName: "ephemeral",
Path: m("/run/user/65534"),
Flags: syscall.MS_NOSUID | syscall.MS_NODEV,
@@ -26,7 +26,7 @@ func TestFSEphemeral(t *testing.T) {
}}, m("/run/user/65534"), nil,
"w+ephemeral(-rwx------):/run/user/65534"},
{"cover ro", &hst.FSEphemeral{Dst: m("/run/nscd")},
{"cover ro", &hst.FSEphemeral{Dst: m("/run/nscd")}, true,
container.Ops{&container.MountTmpfsOp{
FSName: "readonly",
Path: m("/run/nscd"),
@@ -39,7 +39,7 @@ func TestFSEphemeral(t *testing.T) {
Dst: hst.AbsTmp,
Write: true,
Size: -1,
}, container.Ops{&container.MountTmpfsOp{
}, true, container.Ops{&container.MountTmpfsOp{
FSName: "ephemeral",
Path: hst.AbsTmp,
Flags: syscall.MS_NOSUID | syscall.MS_NODEV,