From f33aea9ff9c5eb678c6f1de59132aab69a59757e Mon Sep 17 00:00:00 2001 From: Ophestra Date: Sun, 2 Nov 2025 12:22:32 +0900 Subject: internal/env: cleaner runtime dir fallback This now places rundir inside the fallback runtime dir, so special case in internal/outcome is avoided. Signed-off-by: Ophestra --- internal/outcome/sppulse_test.go | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'internal/outcome/sppulse_test.go') diff --git a/internal/outcome/sppulse_test.go b/internal/outcome/sppulse_test.go index 9aecb198..84a53a7e 100644 --- a/internal/outcome/sppulse_test.go +++ b/internal/outcome/sppulse_test.go @@ -127,10 +127,10 @@ func TestSpPulseOp(t *testing.T) { call("open", stub.ExpectArgs{"/proc/nonexistent/cookie"}, &stubOsFile{Reader: bytes.NewReader(sampleCookie)}, nil), }, newI(). // state.ensureRuntimeDir - Ensure(m(wantRunDirPath), 0700). - UpdatePermType(system.User, m(wantRunDirPath), acl.Execute). Ensure(m(wantRuntimePath), 0700). UpdatePermType(system.User, m(wantRuntimePath), acl.Execute). + Ensure(m(wantRunDirPath), 0700). + UpdatePermType(system.User, m(wantRunDirPath), acl.Execute). // state.runtime Ephemeral(system.Process, m(wantRuntimeSharePath), 0700). UpdatePerm(m(wantRuntimeSharePath), acl.Execute). @@ -159,10 +159,10 @@ func TestSpPulseOp(t *testing.T) { call("open", stub.ExpectArgs{"/proc/nonexistent/cookie"}, &stubOsFile{Reader: bytes.NewReader(sampleCookie[:len(sampleCookie)-0xe])}, nil), }, newI(). // state.ensureRuntimeDir - Ensure(m(wantRunDirPath), 0700). - UpdatePermType(system.User, m(wantRunDirPath), acl.Execute). Ensure(m(wantRuntimePath), 0700). UpdatePermType(system.User, m(wantRuntimePath), acl.Execute). + Ensure(m(wantRunDirPath), 0700). + UpdatePermType(system.User, m(wantRunDirPath), acl.Execute). // state.runtime Ephemeral(system.Process, m(wantRuntimeSharePath), 0700). UpdatePerm(m(wantRuntimeSharePath), acl.Execute). @@ -192,10 +192,10 @@ func TestSpPulseOp(t *testing.T) { call("open", stub.ExpectArgs{"/proc/nonexistent/cookie"}, &stubOsFile{Reader: bytes.NewReader(sampleCookie)}, nil), }, newI(). // state.ensureRuntimeDir - Ensure(m(wantRunDirPath), 0700). - UpdatePermType(system.User, m(wantRunDirPath), acl.Execute). Ensure(m(wantRuntimePath), 0700). UpdatePermType(system.User, m(wantRuntimePath), acl.Execute). + Ensure(m(wantRunDirPath), 0700). + UpdatePermType(system.User, m(wantRunDirPath), acl.Execute). // state.runtime Ephemeral(system.Process, m(wantRuntimeSharePath), 0700). UpdatePerm(m(wantRuntimeSharePath), acl.Execute). @@ -222,10 +222,10 @@ func TestSpPulseOp(t *testing.T) { call("verbose", stub.ExpectArgs{[]any{"cannot locate PulseAudio cookie (tried $PULSE_COOKIE, $XDG_CONFIG_HOME/pulse/cookie, $HOME/.pulse-cookie)"}}, nil, nil), }, newI(). // state.ensureRuntimeDir - Ensure(m(wantRunDirPath), 0700). - UpdatePermType(system.User, m(wantRunDirPath), acl.Execute). Ensure(m(wantRuntimePath), 0700). UpdatePermType(system.User, m(wantRuntimePath), acl.Execute). + Ensure(m(wantRunDirPath), 0700). + UpdatePermType(system.User, m(wantRunDirPath), acl.Execute). // state.runtime Ephemeral(system.Process, m(wantRuntimeSharePath), 0700). UpdatePerm(m(wantRuntimeSharePath), acl.Execute). -- cgit v1.3.1