diff options
| author | Ophestra <cat@gensokyo.uk> | 2025-11-05 06:00:39 +0900 |
|---|---|---|
| committer | Ophestra <cat@gensokyo.uk> | 2025-11-05 06:00:39 +0900 |
| commit | fba201c9953a490da914b09e09eaaa697a4b36e1 (patch) | |
| tree | 9aa54e81577b6e3e580176f266d70a286ed52d9e /container/init_test.go | |
| parent | 7f27a6dc5173bc6c4b71918b98a2d6b72bd37d30 (diff) | |
container/std: relocate rule types
This enables its use in hst for #15.
Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'container/init_test.go')
| -rw-r--r-- | container/init_test.go | 86 |
1 files changed, 43 insertions, 43 deletions
diff --git a/container/init_test.go b/container/init_test.go index ae037210..7ab4c917 100644 --- a/container/init_test.go +++ b/container/init_test.go @@ -69,7 +69,7 @@ func TestInitEntrypoint(t *testing.T) { Uid: 1 << 32, Gid: 1 << 31, Hostname: "hakurei-check", - SeccompRules: make([]seccomp.NativeRule, 0), + SeccompRules: make([]std.NativeRule, 0), SeccompPresets: std.PresetStrict, RetainSession: true, Privileged: true, @@ -94,7 +94,7 @@ func TestInitEntrypoint(t *testing.T) { Gid: 1 << 31, Hostname: "hakurei-check", Ops: (*Ops)(sliceAddr(make(Ops, 1))), - SeccompRules: make([]seccomp.NativeRule, 0), + SeccompRules: make([]std.NativeRule, 0), SeccompPresets: std.PresetStrict, RetainSession: true, Privileged: true, @@ -122,7 +122,7 @@ func TestInitEntrypoint(t *testing.T) { Gid: 1 << 31, Hostname: "hakurei-check", Ops: (*Ops)(sliceAddr(make(Ops, 1))), - SeccompRules: make([]seccomp.NativeRule, 0), + SeccompRules: make([]std.NativeRule, 0), SeccompPresets: std.PresetStrict, RetainSession: true, Privileged: true, @@ -151,7 +151,7 @@ func TestInitEntrypoint(t *testing.T) { Gid: 1 << 31, Hostname: "hakurei-check", Ops: (*Ops)(sliceAddr(make(Ops, 1))), - SeccompRules: make([]seccomp.NativeRule, 0), + SeccompRules: make([]std.NativeRule, 0), SeccompPresets: std.PresetStrict, RetainSession: true, Privileged: true, @@ -181,7 +181,7 @@ func TestInitEntrypoint(t *testing.T) { Gid: 1 << 31, Hostname: "hakurei-check", Ops: (*Ops)(sliceAddr(make(Ops, 1))), - SeccompRules: make([]seccomp.NativeRule, 0), + SeccompRules: make([]std.NativeRule, 0), SeccompPresets: std.PresetStrict, RetainSession: true, Privileged: true, @@ -212,7 +212,7 @@ func TestInitEntrypoint(t *testing.T) { Gid: 1 << 31, Hostname: "hakurei-check", Ops: (*Ops)(sliceAddr(make(Ops, 1))), - SeccompRules: make([]seccomp.NativeRule, 0), + SeccompRules: make([]std.NativeRule, 0), SeccompPresets: std.PresetStrict, RetainSession: true, Privileged: true, @@ -244,7 +244,7 @@ func TestInitEntrypoint(t *testing.T) { Gid: 1 << 31, Hostname: "hakurei-check", Ops: (*Ops)(sliceAddr(make(Ops, 1))), - SeccompRules: make([]seccomp.NativeRule, 0), + SeccompRules: make([]std.NativeRule, 0), SeccompPresets: std.PresetStrict, RetainSession: true, Privileged: true, @@ -278,7 +278,7 @@ func TestInitEntrypoint(t *testing.T) { Gid: 1 << 31, Hostname: "hakurei-check", Ops: (*Ops)(sliceAddr(make(Ops, 1))), - SeccompRules: make([]seccomp.NativeRule, 0), + SeccompRules: make([]std.NativeRule, 0), SeccompPresets: std.PresetStrict, RetainSession: true, Privileged: true, @@ -314,7 +314,7 @@ func TestInitEntrypoint(t *testing.T) { Gid: 1 << 31, Hostname: "hakurei-check", Ops: (*Ops)(sliceAddr(make(Ops, 1))), - SeccompRules: make([]seccomp.NativeRule, 0), + SeccompRules: make([]std.NativeRule, 0), SeccompPresets: std.PresetStrict, RetainSession: true, Privileged: true, @@ -352,7 +352,7 @@ func TestInitEntrypoint(t *testing.T) { Gid: 1 << 31, Hostname: "hakurei-check", Ops: new(Ops).Bind(nil, nil, std.BindDevice), - SeccompRules: make([]seccomp.NativeRule, 0), + SeccompRules: make([]std.NativeRule, 0), SeccompPresets: std.PresetStrict, RetainSession: true, Privileged: true, @@ -390,7 +390,7 @@ func TestInitEntrypoint(t *testing.T) { Gid: 1 << 31, Hostname: "hakurei-check", Ops: new(Ops).Bind(check.MustAbs("/"), check.MustAbs("/"), std.BindDevice).Proc(check.MustAbs("/proc/")), - SeccompRules: make([]seccomp.NativeRule, 0), + SeccompRules: make([]std.NativeRule, 0), SeccompPresets: std.PresetStrict, RetainSession: true, Privileged: true, @@ -429,7 +429,7 @@ func TestInitEntrypoint(t *testing.T) { Gid: 1 << 31, Hostname: "hakurei-check", Ops: new(Ops).Bind(check.MustAbs("/"), check.MustAbs("/"), std.BindDevice).Proc(check.MustAbs("/proc/")), - SeccompRules: make([]seccomp.NativeRule, 0), + SeccompRules: make([]std.NativeRule, 0), SeccompPresets: std.PresetStrict, RetainSession: true, Privileged: true, @@ -468,7 +468,7 @@ func TestInitEntrypoint(t *testing.T) { Gid: 1 << 31, Hostname: "hakurei-check", Ops: new(Ops).Bind(check.MustAbs("/"), check.MustAbs("/"), std.BindDevice).Proc(check.MustAbs("/proc/")), - SeccompRules: make([]seccomp.NativeRule, 0), + SeccompRules: make([]std.NativeRule, 0), SeccompPresets: std.PresetStrict, RetainSession: true, Privileged: true, @@ -508,7 +508,7 @@ func TestInitEntrypoint(t *testing.T) { Gid: 1 << 31, Hostname: "hakurei-check", Ops: new(Ops).Bind(check.MustAbs("/"), check.MustAbs("/"), std.BindDevice).Proc(check.MustAbs("/proc/")), - SeccompRules: make([]seccomp.NativeRule, 0), + SeccompRules: make([]std.NativeRule, 0), SeccompPresets: std.PresetStrict, RetainSession: true, Privileged: true, @@ -549,7 +549,7 @@ func TestInitEntrypoint(t *testing.T) { Gid: 1 << 31, Hostname: "hakurei-check", Ops: new(Ops).Bind(check.MustAbs("/"), check.MustAbs("/"), std.BindDevice).Proc(check.MustAbs("/proc/")), - SeccompRules: make([]seccomp.NativeRule, 0), + SeccompRules: make([]std.NativeRule, 0), SeccompPresets: std.PresetStrict, RetainSession: true, Privileged: true, @@ -591,7 +591,7 @@ func TestInitEntrypoint(t *testing.T) { Gid: 1 << 31, Hostname: "hakurei-check", Ops: new(Ops).Bind(check.MustAbs("/"), check.MustAbs("/"), std.BindDevice).Proc(check.MustAbs("/proc/")), - SeccompRules: make([]seccomp.NativeRule, 0), + SeccompRules: make([]std.NativeRule, 0), SeccompPresets: std.PresetStrict, RetainSession: true, Privileged: true, @@ -634,7 +634,7 @@ func TestInitEntrypoint(t *testing.T) { Gid: 1 << 31, Hostname: "hakurei-check", Ops: new(Ops).Bind(check.MustAbs("/"), check.MustAbs("/"), std.BindDevice).Proc(check.MustAbs("/proc/")), - SeccompRules: make([]seccomp.NativeRule, 0), + SeccompRules: make([]std.NativeRule, 0), SeccompPresets: std.PresetStrict, RetainSession: true, Privileged: true, @@ -678,7 +678,7 @@ func TestInitEntrypoint(t *testing.T) { Gid: 1 << 31, Hostname: "hakurei-check", Ops: new(Ops).Bind(check.MustAbs("/"), check.MustAbs("/"), std.BindDevice).Proc(check.MustAbs("/proc/")), - SeccompRules: make([]seccomp.NativeRule, 0), + SeccompRules: make([]std.NativeRule, 0), SeccompPresets: std.PresetStrict, RetainSession: true, Privileged: true, @@ -723,7 +723,7 @@ func TestInitEntrypoint(t *testing.T) { Gid: 1 << 31, Hostname: "hakurei-check", Ops: new(Ops).Bind(check.MustAbs("/"), check.MustAbs("/"), std.BindDevice).Proc(check.MustAbs("/proc/")), - SeccompRules: make([]seccomp.NativeRule, 0), + SeccompRules: make([]std.NativeRule, 0), SeccompPresets: std.PresetStrict, RetainSession: true, Privileged: true, @@ -769,7 +769,7 @@ func TestInitEntrypoint(t *testing.T) { Gid: 1 << 31, Hostname: "hakurei-check", Ops: new(Ops).Bind(check.MustAbs("/"), check.MustAbs("/"), std.BindDevice).Proc(check.MustAbs("/proc/")), - SeccompRules: make([]seccomp.NativeRule, 0), + SeccompRules: make([]std.NativeRule, 0), SeccompPresets: std.PresetStrict, RetainSession: true, Privileged: true, @@ -824,7 +824,7 @@ func TestInitEntrypoint(t *testing.T) { Gid: 1 << 31, Hostname: "hakurei-check", Ops: new(Ops).Bind(check.MustAbs("/"), check.MustAbs("/"), std.BindDevice).Proc(check.MustAbs("/proc/")), - SeccompRules: make([]seccomp.NativeRule, 0), + SeccompRules: make([]std.NativeRule, 0), SeccompPresets: std.PresetStrict, RetainSession: true, Privileged: true, @@ -879,7 +879,7 @@ func TestInitEntrypoint(t *testing.T) { Gid: 1 << 31, Hostname: "hakurei-check", Ops: new(Ops).Bind(check.MustAbs("/"), check.MustAbs("/"), std.BindDevice).Proc(check.MustAbs("/proc/")), - SeccompRules: make([]seccomp.NativeRule, 0), + SeccompRules: make([]std.NativeRule, 0), SeccompPresets: std.PresetStrict, RetainSession: true, Privileged: true, @@ -935,7 +935,7 @@ func TestInitEntrypoint(t *testing.T) { Gid: 1 << 31, Hostname: "hakurei-check", Ops: new(Ops).Bind(check.MustAbs("/"), check.MustAbs("/"), std.BindDevice).Proc(check.MustAbs("/proc/")), - SeccompRules: make([]seccomp.NativeRule, 0), + SeccompRules: make([]std.NativeRule, 0), SeccompPresets: std.PresetStrict, RetainSession: true, Privileged: true, @@ -992,7 +992,7 @@ func TestInitEntrypoint(t *testing.T) { Gid: 1 << 31, Hostname: "hakurei-check", Ops: new(Ops).Bind(check.MustAbs("/"), check.MustAbs("/"), std.BindDevice).Proc(check.MustAbs("/proc/")), - SeccompRules: make([]seccomp.NativeRule, 0), + SeccompRules: make([]std.NativeRule, 0), SeccompPresets: std.PresetStrict, RetainSession: true, Privileged: true, @@ -1051,7 +1051,7 @@ func TestInitEntrypoint(t *testing.T) { Gid: 1 << 31, Hostname: "hakurei-check", Ops: new(Ops).Bind(check.MustAbs("/"), check.MustAbs("/"), std.BindDevice).Proc(check.MustAbs("/proc/")), - SeccompRules: make([]seccomp.NativeRule, 0), + SeccompRules: make([]std.NativeRule, 0), SeccompPresets: std.PresetStrict, RetainSession: true, Privileged: true, @@ -1111,7 +1111,7 @@ func TestInitEntrypoint(t *testing.T) { Gid: 1 << 31, Hostname: "hakurei-check", Ops: new(Ops).Bind(check.MustAbs("/"), check.MustAbs("/"), std.BindDevice).Proc(check.MustAbs("/proc/")), - SeccompRules: make([]seccomp.NativeRule, 0), + SeccompRules: make([]std.NativeRule, 0), SeccompPresets: std.PresetStrict, RetainSession: true, Privileged: true, @@ -1172,7 +1172,7 @@ func TestInitEntrypoint(t *testing.T) { Gid: 1 << 31, Hostname: "hakurei-check", Ops: new(Ops).Bind(check.MustAbs("/"), check.MustAbs("/"), std.BindDevice).Proc(check.MustAbs("/proc/")), - SeccompRules: make([]seccomp.NativeRule, 0), + SeccompRules: make([]std.NativeRule, 0), SeccompPresets: std.PresetStrict, RetainSession: true, Privileged: true, @@ -1234,7 +1234,7 @@ func TestInitEntrypoint(t *testing.T) { Gid: 1 << 31, Hostname: "hakurei-check", Ops: new(Ops).Bind(check.MustAbs("/"), check.MustAbs("/"), std.BindDevice).Proc(check.MustAbs("/proc/")), - SeccompRules: make([]seccomp.NativeRule, 0), + SeccompRules: make([]std.NativeRule, 0), SeccompPresets: std.PresetStrict, RetainSession: true, Privileged: true, @@ -1297,7 +1297,7 @@ func TestInitEntrypoint(t *testing.T) { Gid: 1 << 31, Hostname: "hakurei-check", Ops: new(Ops).Bind(check.MustAbs("/"), check.MustAbs("/"), std.BindDevice).Proc(check.MustAbs("/proc/")), - SeccompRules: make([]seccomp.NativeRule, 0), + SeccompRules: make([]std.NativeRule, 0), SeccompPresets: std.PresetStrict, RetainSession: true, Privileged: true, @@ -1361,7 +1361,7 @@ func TestInitEntrypoint(t *testing.T) { Gid: 1 << 31, Hostname: "hakurei-check", Ops: new(Ops).Bind(check.MustAbs("/"), check.MustAbs("/"), std.BindDevice).Proc(check.MustAbs("/proc/")), - SeccompRules: make([]seccomp.NativeRule, 0), + SeccompRules: make([]std.NativeRule, 0), SeccompPresets: std.PresetStrict, RetainSession: true, Privileged: true, @@ -1426,7 +1426,7 @@ func TestInitEntrypoint(t *testing.T) { Gid: 1 << 31, Hostname: "hakurei-check", Ops: new(Ops).Bind(check.MustAbs("/"), check.MustAbs("/"), std.BindDevice).Proc(check.MustAbs("/proc/")), - SeccompRules: make([]seccomp.NativeRule, 0), + SeccompRules: make([]std.NativeRule, 0), SeccompPresets: std.PresetStrict, RetainSession: true, Privileged: true, @@ -1492,7 +1492,7 @@ func TestInitEntrypoint(t *testing.T) { Gid: 1 << 31, Hostname: "hakurei-check", Ops: new(Ops).Bind(check.MustAbs("/"), check.MustAbs("/"), std.BindDevice).Proc(check.MustAbs("/proc/")), - SeccompRules: make([]seccomp.NativeRule, 0), + SeccompRules: make([]std.NativeRule, 0), SeccompPresets: std.PresetStrict, RetainSession: true, Privileged: true, @@ -1566,7 +1566,7 @@ func TestInitEntrypoint(t *testing.T) { Gid: 1 << 31, Hostname: "hakurei-check", Ops: new(Ops).Bind(check.MustAbs("/"), check.MustAbs("/"), std.BindDevice).Proc(check.MustAbs("/proc/")), - SeccompRules: make([]seccomp.NativeRule, 0), + SeccompRules: make([]std.NativeRule, 0), SeccompPresets: std.PresetStrict, RetainSession: true, Privileged: true, @@ -1673,7 +1673,7 @@ func TestInitEntrypoint(t *testing.T) { Gid: 1 << 31, Hostname: "hakurei-check", Ops: new(Ops).Bind(check.MustAbs("/"), check.MustAbs("/"), std.BindDevice).Proc(check.MustAbs("/proc/")), - SeccompRules: make([]seccomp.NativeRule, 0), + SeccompRules: make([]std.NativeRule, 0), SeccompPresets: std.PresetStrict, RetainSession: true, Privileged: true, @@ -1781,7 +1781,7 @@ func TestInitEntrypoint(t *testing.T) { Gid: 1 << 31, Hostname: "hakurei-check", Ops: new(Ops).Bind(check.MustAbs("/"), check.MustAbs("/"), std.BindDevice).Proc(check.MustAbs("/proc/")), - SeccompRules: make([]seccomp.NativeRule, 0), + SeccompRules: make([]std.NativeRule, 0), SeccompPresets: std.PresetStrict, RetainSession: true, Privileged: true, @@ -1891,7 +1891,7 @@ func TestInitEntrypoint(t *testing.T) { Gid: 1 << 47, Hostname: "hakurei-check", Ops: new(Ops).Bind(check.MustAbs("/"), check.MustAbs("/"), std.BindDevice).Proc(check.MustAbs("/proc/")), - SeccompRules: make([]seccomp.NativeRule, 0), + SeccompRules: make([]std.NativeRule, 0), SeccompDisable: true, ParentPerm: 0750, }, 1971, 127, 2, false}, uintptr(0x39)}, stub.UniqueError(13), nil), @@ -2005,7 +2005,7 @@ func TestInitEntrypoint(t *testing.T) { Gid: 1 << 47, Hostname: "hakurei-check", Ops: new(Ops).Bind(check.MustAbs("/"), check.MustAbs("/"), std.BindDevice).Proc(check.MustAbs("/proc/")), - SeccompRules: make([]seccomp.NativeRule, 0), + SeccompRules: make([]std.NativeRule, 0), SeccompDisable: true, ParentPerm: 0750, }, 1971, 127, 2, false}, uintptr(0x39)}, stub.UniqueError(10), nil), @@ -2103,7 +2103,7 @@ func TestInitEntrypoint(t *testing.T) { Gid: 1 << 47, Hostname: "hakurei-check", Ops: new(Ops).Bind(check.MustAbs("/"), check.MustAbs("/"), std.BindDevice).Proc(check.MustAbs("/proc/")), - SeccompRules: make([]seccomp.NativeRule, 0), + SeccompRules: make([]std.NativeRule, 0), SeccompDisable: true, ParentPerm: 0750, }, 1971, 127, 2, false}, uintptr(0x39)}, stub.UniqueError(7), nil), @@ -2201,7 +2201,7 @@ func TestInitEntrypoint(t *testing.T) { Gid: 1 << 47, Hostname: "hakurei-check", Ops: new(Ops).Bind(check.MustAbs("/"), check.MustAbs("/"), std.BindDevice).Proc(check.MustAbs("/proc/")), - SeccompRules: make([]seccomp.NativeRule, 0), + SeccompRules: make([]std.NativeRule, 0), SeccompDisable: true, ParentPerm: 0750, }, 1971, 127, 2, false}, uintptr(0x39)}, stub.UniqueError(7), nil), @@ -2292,7 +2292,7 @@ func TestInitEntrypoint(t *testing.T) { Gid: 1 << 47, Hostname: "hakurei-check", Ops: new(Ops).Bind(check.MustAbs("/"), check.MustAbs("/"), std.BindDevice).Proc(check.MustAbs("/proc/")), - SeccompRules: make([]seccomp.NativeRule, 0), + SeccompRules: make([]std.NativeRule, 0), SeccompDisable: true, ParentPerm: 0750, }, 1971, 127, 2, false}, uintptr(0x39)}, stub.UniqueError(5), nil), @@ -2385,7 +2385,7 @@ func TestInitEntrypoint(t *testing.T) { Gid: 1 << 47, Hostname: "hakurei-check", Ops: new(Ops).Bind(check.MustAbs("/"), check.MustAbs("/"), std.BindDevice).Proc(check.MustAbs("/proc/")), - SeccompRules: make([]seccomp.NativeRule, 0), + SeccompRules: make([]std.NativeRule, 0), SeccompDisable: true, ParentPerm: 0750, }, 1971, 127, 2, false}, uintptr(0x39)}, stub.UniqueError(3), nil), @@ -2485,7 +2485,7 @@ func TestInitEntrypoint(t *testing.T) { Gid: 1 << 47, Hostname: "hakurei-check", Ops: new(Ops).Bind(check.MustAbs("/"), check.MustAbs("/"), std.BindDevice).Proc(check.MustAbs("/proc/")), - SeccompRules: make([]seccomp.NativeRule, 0), + SeccompRules: make([]std.NativeRule, 0), SeccompDisable: true, ParentPerm: 0750, }, 1971, 127, 2, false}, uintptr(0x39)}, stub.UniqueError(1), nil), @@ -2621,7 +2621,7 @@ func TestInitEntrypoint(t *testing.T) { Gid: 1 << 31, Hostname: "hakurei-check", Ops: new(Ops).Bind(check.MustAbs("/"), check.MustAbs("/"), std.BindDevice).Proc(check.MustAbs("/proc/")), - SeccompRules: make([]seccomp.NativeRule, 0), + SeccompRules: make([]std.NativeRule, 0), SeccompPresets: std.PresetStrict, RetainSession: true, Privileged: true, |
