detached e1de5a5

test(xwm): replace the sinkPeer sleep with a peer lock barrier

commit
e1de5a53cadd0d5f9ade1dd51cd0dd4decabc9c3
author
brice · · 2026-10-22 13:24 UTC
committer
brice · · 2026-10-22 17:54 UTC
parent
9439437
signature
GPG VerifiedCD88F9E564E0102646FB6077A1A07C7C7C3E349D · arch-gpg Verified for the committer email
1 file · +5 -0
M internal/adapters/wayland/xwm/configure_test.go +5 -0
@@ -511,6 +511,11 @@ func sinkPeer(t *testing.T, x *XWM, p *xpeer) {
511511 xproto.GetInputFocus(x.conn.Buf()) // served by the old loop iteration
512512 require.NoError(t, x.conn.Flush())
513513 p.waitReq(n, func(r xpeerReq) bool { return r.major == opGetInputFocus })
514+ // The peer records a request and answers it under mu: once the lock is
515+ // free again it is back in its sink loop, which does not allocate.
516+ p.mu.Lock()
517+ _ = p.seq
518+ p.mu.Unlock()
514519 x.src = nil // no source: write backpressure would not allocate either
515520 x.post = func(func()) {}
516521 x.warnedRing = true // the sink never answers: Expect slots stay used
@@ -511,6 +511,11 @@ func sinkPeer(t *testing.T, x *XWM, p *xpeer) {
511 xproto.GetInputFocus(x.conn.Buf()) // served by the old loop iteration511 xproto.GetInputFocus(x.conn.Buf()) // served by the old loop iteration
512 require.NoError(t, x.conn.Flush())512 require.NoError(t, x.conn.Flush())
513 p.waitReq(n, func(r xpeerReq) bool { return r.major == opGetInputFocus })513 p.waitReq(n, func(r xpeerReq) bool { return r.major == opGetInputFocus })
514+ // The peer records a request and answers it under mu: once the lock is
515+ // free again it is back in its sink loop, which does not allocate.
516+ p.mu.Lock()
517+ _ = p.seq
518+ p.mu.Unlock()
514 x.src = nil // no source: write backpressure would not allocate either519 x.src = nil // no source: write backpressure would not allocate either
515 x.post = func(func()) {}520 x.post = func(func()) {}
516 x.warnedRing = true // the sink never answers: Expect slots stay used521 x.warnedRing = true // the sink never answers: Expect slots stay used

Keyboard shortcuts

Single-key shortcuts are on. ctrl k and esc work whatever this says.

ctrl k :
go to a section, branch, tag, file or repository
?
this list
j k
move the row cursor down / up
enter
open the row under the cursor; on Files, a directory opens or closes in place
↑ ↓ ← → home end
in the file tree (focus on a row): previous / next row, close / open a directory or go to its parent / first entry, first / last row. They never open a file
l h
on Files: open a directory or a file / close a directory or go up to its parent, then to the parent page. Elsewhere: into the side panel (on a merge request, its files) / back to the content; there j k move between its controls
g g G
first / last row
/
filter the list; on Files, find a file anywhere in the repository (esc clears, enter opens the best match)
b
switch branch or tag
g s g f g c g b g m g i g r g a
tabs: summary, files, commits, branches & tags, merge requests, issues, releases, actions (when available)
g h
home
w
wide mode: use the whole width of the screen, or not (remembered)
y
copy a permalink pinned to the commit
d u x
diff: split / unified / collapse or expand all
e E
diff: the whole file in view / every file, with the lines the hunks hide
n
merge request: next note in the diff
esc
close a dialog, leave a field

Branches 23

Tags 10

↑↓ moveenter openesc close