aboutsummaryrefslogtreecommitdiffhomepage
path: root/internal/outcome/spcontainer_test.go
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2026-10-13 18:55:52 +0900
committerOphestra <cat@gensokyo.uk>2026-10-13 18:55:52 +0900
commit0abf367b1334b76f5e8f989cf0c07b5d00b25868 (patch)
tree9d78aae80b86770762e5d86358fd1d89c18c3f35 /internal/outcome/spcontainer_test.go
parent11e395a1a7453b93c695e849bd93d8c2c0af6aef (diff)
internal/acl: skip superfluous acl_set_file
This slightly reduces startup latency. Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'internal/outcome/spcontainer_test.go')
-rw-r--r--internal/outcome/spcontainer_test.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/internal/outcome/spcontainer_test.go b/internal/outcome/spcontainer_test.go
index 7dd47735..d9436cb4 100644
--- a/internal/outcome/spcontainer_test.go
+++ b/internal/outcome/spcontainer_test.go
@@ -313,7 +313,7 @@ func TestSpFilesystemOp(t *testing.T) {
UpdatePermType(system.User, m("/var/lib/hakurei/u0"),
acl.Execute).
UpdatePermType(system.User, m("/var/lib/hakurei/u0/org.chromium.Chromium"),
- acl.Read, acl.Write, acl.Execute), nil, nil, insertsOps(needsApplyState(func(state *outcomeStateParams) {
+ acl.Read|acl.Write|acl.Execute), nil, nil, insertsOps(needsApplyState(func(state *outcomeStateParams) {
state.filesystem = append(configSmall.Container.Filesystem, hst.FilesystemConfigJSON{})
})), []stub.Call{
// this op configures the container state and does not make calls during toContainer
@@ -346,7 +346,7 @@ func TestSpFilesystemOp(t *testing.T) {
UpdatePermType(system.User, m("/var/lib/hakurei/u0"),
acl.Execute).
UpdatePermType(system.User, m("/var/lib/hakurei/u0/org.chromium.Chromium"),
- acl.Read, acl.Write, acl.Execute), nil, nil, insertsOps(needsApplyState(func(state *outcomeStateParams) {
+ acl.Read|acl.Write|acl.Execute), nil, nil, insertsOps(needsApplyState(func(state *outcomeStateParams) {
state.filesystem = configSmall.Container.Filesystem
})), []stub.Call{
// this op configures the container state and does not make calls during toContainer
@@ -401,7 +401,7 @@ func TestSpFilesystemOp(t *testing.T) {
UpdatePermType(system.User, m("/var/lib/hakurei/u0"),
acl.Execute).
UpdatePermType(system.User, m("/var/lib/hakurei/u0/org.chromium.Chromium"),
- acl.Read, acl.Write, acl.Execute), nil, nil, insertsOps(needsApplyState(func(state *outcomeStateParams) {
+ acl.Read|acl.Write|acl.Execute), nil, nil, insertsOps(needsApplyState(func(state *outcomeStateParams) {
state.filesystem = config.Container.Filesystem[1:]
})), []stub.Call{
// this op configures the container state and does not make calls during toContainer
@@ -445,14 +445,14 @@ func TestFlattenExtraPerms(t *testing.T) {
UpdatePermType(system.User, m("/var/lib/hakurei/u0"),
acl.Execute).
UpdatePermType(system.User, m("/var/lib/hakurei/u0/org.chromium.Chromium"),
- acl.Read, acl.Write, acl.Execute)},
+ acl.Read|acl.Write|acl.Execute)},
{"template", hst.Template().ExtraPerms, newI().
Ensure(m("/var/lib/hakurei/u0"), 0700).
UpdatePermType(system.User, m("/var/lib/hakurei/u0"),
acl.Execute).
UpdatePermType(system.User, m("/var/lib/hakurei/u0/org.chromium.Chromium"),
- acl.Read, acl.Write, acl.Execute)},
+ acl.Read|acl.Write|acl.Execute)},
}
for _, tc := range testCases {
t.Run(tc.name, func(t *testing.T) {