internal/pipewire: implement Registry::GlobalRemove
All checks were successful
Test / Create distribution (push) Successful in 41s
Test / Sandbox (push) Successful in 2m47s
Test / Sandbox (race detector) (push) Successful in 5m6s
Test / Hakurei (push) Successful in 5m30s
Test / Hpkg (push) Successful in 5m39s
Test / Hakurei (race detector) (push) Successful in 7m18s
Test / Flake checks (push) Successful in 1m41s

This is emitted by PipeWire when a global object disappears, because PipeWire insists that all clients that had called Core::GetRegistry must constantly sync its local registry state with the remote.

Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
2025-12-10 00:59:01 +09:00
parent ccc0d98bd7
commit d8417e2927
3 changed files with 68 additions and 0 deletions

View File

@@ -745,6 +745,23 @@ func TestRegistryGlobal(t *testing.T) {
}.run(t)
}
func TestRegistryGlobalRemove(t *testing.T) {
t.Parallel()
encodingTestCases[pipewire.RegistryGlobalRemove, *pipewire.RegistryGlobalRemove]{
{"sample", []byte{
/* size: rest of data*/ 0x10, 0, 0, 0,
/* type: Struct */ 0xe, 0, 0, 0,
/* size: 4 bytes */ 4, 0, 0, 0,
/* type: Int */ 4, 0, 0, 0,
/* value: 0xbad */ 0xad, 0xb, 0, 0,
/* padding */ 0, 0, 0, 0,
}, pipewire.RegistryGlobalRemove{
ID: 0xbad,
}, nil},
}.run(t)
}
func TestRegistryBind(t *testing.T) {
t.Parallel()