diff options
Diffstat (limited to 'internal/outcome')
| -rw-r--r-- | internal/outcome/run_test.go | 10 | ||||
| -rw-r--r-- | internal/outcome/sppipewire.go | 7 | ||||
| -rw-r--r-- | internal/outcome/sppipewire_test.go | 4 |
3 files changed, 16 insertions, 5 deletions
diff --git a/internal/outcome/run_test.go b/internal/outcome/run_test.go index f2aa1638..01d487a8 100644 --- a/internal/outcome/run_test.go +++ b/internal/outcome/run_test.go @@ -68,7 +68,11 @@ func TestOutcomeRun(t *testing.T) { ). // spPipeWireOp - PipeWire(m("/tmp/hakurei.0/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/pipewire")). + PipeWire( + m("/tmp/hakurei.0/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/pipewire"), + "org.chromium.Chromium", + "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + ). // spDBusOp MustProxyDBus( @@ -335,7 +339,7 @@ func TestOutcomeRun(t *testing.T) { Ensure(m("/tmp/hakurei.0/tmpdir/9"), 01700).UpdatePermType(system.User, m("/tmp/hakurei.0/tmpdir/9"), acl.Read, acl.Write, acl.Execute). Ephemeral(system.Process, m("/tmp/hakurei.0/ebf083d1b175911782d413369b64ce7c"), 0711). Wayland(m("/tmp/hakurei.0/ebf083d1b175911782d413369b64ce7c/wayland"), m("/run/user/1971/wayland-0"), "org.chromium.Chromium", "ebf083d1b175911782d413369b64ce7c"). - PipeWire(m("/tmp/hakurei.0/ebf083d1b175911782d413369b64ce7c/pipewire")). + PipeWire(m("/tmp/hakurei.0/ebf083d1b175911782d413369b64ce7c/pipewire"), "org.chromium.Chromium", "ebf083d1b175911782d413369b64ce7c"). MustProxyDBus(&hst.BusConfig{ Talk: []string{ "org.freedesktop.Notifications", @@ -486,7 +490,7 @@ func TestOutcomeRun(t *testing.T) { Ensure(m("/run/user/1971/hakurei"), 0700).UpdatePermType(system.User, m("/run/user/1971/hakurei"), acl.Execute). UpdatePermType(hst.EWayland, m("/run/user/1971/wayland-0"), acl.Read, acl.Write, acl.Execute). Ephemeral(system.Process, m("/tmp/hakurei.0/8e2c76b066dabe574cf073bdb46eb5c1"), 0711). - PipeWire(m("/tmp/hakurei.0/8e2c76b066dabe574cf073bdb46eb5c1/pipewire")). + PipeWire(m("/tmp/hakurei.0/8e2c76b066dabe574cf073bdb46eb5c1/pipewire"), "org.chromium.Chromium", "8e2c76b066dabe574cf073bdb46eb5c1"). MustProxyDBus(&hst.BusConfig{ Talk: []string{ "org.freedesktop.FileManager1", "org.freedesktop.Notifications", diff --git a/internal/outcome/sppipewire.go b/internal/outcome/sppipewire.go index b8c855f6..b9359f7e 100644 --- a/internal/outcome/sppipewire.go +++ b/internal/outcome/sppipewire.go @@ -18,7 +18,12 @@ func (s spPipeWireOp) toSystem(state *outcomeStateSys) error { return errNotEnabled } - state.sys.PipeWire(state.instance().Append("pipewire")) + appId := state.appId + if appId == "" { + // use instance ID in case app id is not set + appId = "app.hakurei." + state.id.String() + } + state.sys.PipeWire(state.instance().Append("pipewire"), appId, state.id.String()) return nil } diff --git a/internal/outcome/sppipewire_test.go b/internal/outcome/sppipewire_test.go index d53f6d6d..35ad8e50 100644 --- a/internal/outcome/sppipewire_test.go +++ b/internal/outcome/sppipewire_test.go @@ -30,7 +30,9 @@ func TestSpPipeWireOp(t *testing.T) { Ephemeral(system.Process, m(wantInstancePrefix), 0711). // toSystem PipeWire( - m(wantInstancePrefix + "/pipewire"), + m(wantInstancePrefix+"/pipewire"), + "org.chromium.Chromium", + "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", ), sysUsesInstance(nil), nil, insertsOps(afterSpRuntimeOp(nil)), []stub.Call{ // this op configures the container state and does not make calls during toContainer }, &container.Params{ |
