diff options
| author | Ophestra <cat@gensokyo.uk> | 2025-11-05 02:47:43 +0900 |
|---|---|---|
| committer | Ophestra <cat@gensokyo.uk> | 2025-11-05 02:47:43 +0900 |
| commit | c1399f5030abde76728ba7982a7a22fd49e75359 (patch) | |
| tree | 06e2a2ce11dbd7536150fd57824e406f101d50d9 /container/initbind_test.go | |
| parent | 9ac63aac0cb025d1de195dbc57d0c89ebd1d7cc5 (diff) | |
std: rename from comp
Seccomp lookup tables are going to be relocated here, and PNR constants.
Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'container/initbind_test.go')
| -rw-r--r-- | container/initbind_test.go | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/container/initbind_test.go b/container/initbind_test.go index 86ab1f9c..40b5039b 100644 --- a/container/initbind_test.go +++ b/container/initbind_test.go @@ -7,7 +7,7 @@ import ( "testing" "hakurei.app/container/check" - "hakurei.app/container/comp" + "hakurei.app/container/std" "hakurei.app/container/stub" ) @@ -25,7 +25,7 @@ func TestBindMountOp(t *testing.T) { {"skip optional", new(Params), &BindMountOp{ Source: check.MustAbs("/bin/"), Target: check.MustAbs("/bin/"), - Flags: comp.BindOptional, + Flags: std.BindOptional, }, []stub.Call{ call("evalSymlinks", stub.ExpectArgs{"/bin/"}, "", syscall.ENOENT), }, nil, nil, nil}, @@ -33,7 +33,7 @@ func TestBindMountOp(t *testing.T) { {"success optional", new(Params), &BindMountOp{ Source: check.MustAbs("/bin/"), Target: check.MustAbs("/bin/"), - Flags: comp.BindOptional, + Flags: std.BindOptional, }, []stub.Call{ call("evalSymlinks", stub.ExpectArgs{"/bin/"}, "/usr/bin", nil), }, nil, []stub.Call{ @@ -46,7 +46,7 @@ func TestBindMountOp(t *testing.T) { {"ensureFile device", new(Params), &BindMountOp{ Source: check.MustAbs("/dev/null"), Target: check.MustAbs("/dev/null"), - Flags: comp.BindWritable | comp.BindDevice, + Flags: std.BindWritable | std.BindDevice, }, []stub.Call{ call("evalSymlinks", stub.ExpectArgs{"/dev/null"}, "/dev/null", nil), }, nil, []stub.Call{ @@ -57,7 +57,7 @@ func TestBindMountOp(t *testing.T) { {"mkdirAll ensure", new(Params), &BindMountOp{ Source: check.MustAbs("/bin/"), Target: check.MustAbs("/bin/"), - Flags: comp.BindEnsure, + Flags: std.BindEnsure, }, []stub.Call{ call("mkdirAll", stub.ExpectArgs{"/bin/", os.FileMode(0700)}, nil, stub.UniqueError(4)), }, stub.UniqueError(4), nil, nil}, @@ -65,7 +65,7 @@ func TestBindMountOp(t *testing.T) { {"success ensure", new(Params), &BindMountOp{ Source: check.MustAbs("/bin/"), Target: check.MustAbs("/usr/bin/"), - Flags: comp.BindEnsure, + Flags: std.BindEnsure, }, []stub.Call{ call("mkdirAll", stub.ExpectArgs{"/bin/", os.FileMode(0700)}, nil, nil), call("evalSymlinks", stub.ExpectArgs{"/bin/"}, "/usr/bin", nil), @@ -79,7 +79,7 @@ func TestBindMountOp(t *testing.T) { {"success device ro", new(Params), &BindMountOp{ Source: check.MustAbs("/dev/null"), Target: check.MustAbs("/dev/null"), - Flags: comp.BindDevice, + Flags: std.BindDevice, }, []stub.Call{ call("evalSymlinks", stub.ExpectArgs{"/dev/null"}, "/dev/null", nil), }, nil, []stub.Call{ @@ -92,7 +92,7 @@ func TestBindMountOp(t *testing.T) { {"success device", new(Params), &BindMountOp{ Source: check.MustAbs("/dev/null"), Target: check.MustAbs("/dev/null"), - Flags: comp.BindWritable | comp.BindDevice, + Flags: std.BindWritable | std.BindDevice, }, []stub.Call{ call("evalSymlinks", stub.ExpectArgs{"/dev/null"}, "/dev/null", nil), }, nil, []stub.Call{ @@ -182,7 +182,7 @@ func TestBindMountOp(t *testing.T) { {"zero", new(BindMountOp), false}, {"nil source", &BindMountOp{Target: check.MustAbs("/")}, false}, {"nil target", &BindMountOp{Source: check.MustAbs("/")}, false}, - {"flag optional ensure", &BindMountOp{Source: check.MustAbs("/"), Target: check.MustAbs("/"), Flags: comp.BindOptional | comp.BindEnsure}, false}, + {"flag optional ensure", &BindMountOp{Source: check.MustAbs("/"), Target: check.MustAbs("/"), Flags: std.BindOptional | std.BindEnsure}, false}, {"valid", &BindMountOp{Source: check.MustAbs("/"), Target: check.MustAbs("/")}, true}, }) @@ -217,7 +217,7 @@ func TestBindMountOp(t *testing.T) { }, &BindMountOp{ Source: check.MustAbs("/etc/"), Target: check.MustAbs("/etc/.host/048090b6ed8f9ebb10e275ff5d8c0659"), - Flags: comp.BindOptional, + Flags: std.BindOptional, }, false}, {"source differs", &BindMountOp{ @@ -256,7 +256,7 @@ func TestBindMountOp(t *testing.T) { {"hostdev", &BindMountOp{ Source: check.MustAbs("/dev/"), Target: check.MustAbs("/dev/"), - Flags: comp.BindWritable | comp.BindDevice, + Flags: std.BindWritable | std.BindDevice, }, "mounting", `"/dev/" flags 0x6`}, }) } |
