main 602baa7

README.md RawHistoryFolder

Wire goldens

make xserver captures from a fresh Xvfb and compares every packet with the committed golden. Comparison is independent of the server build:

  • Server-chosen values (root window, visual, colormap, interned atom, resource IDs from the client's resource base, extension opcodes and event/error bases) are listed per golden by field offset in serverFields. -update records their capture-time values in testdata/golden/xvfb-roles.json. Compare mode checks that the golden holds the recorded value and the live packet holds the live server's value, masks both, then compares the remaining bytes exactly. Server timestamps are masked without a value check.
  • ListExtensions and Render QueryPictFormats replies depend on how the server was built (extension list, visuals, formats), so live compare checks invariants: framing, counts matching list lengths, the bound extensions present, the root visual mapped to the format CreatePicture uses.

Unit tests still decode the committed goldens byte-exactly. The test is skipped when Xvfb is not installed. XTURBO_XVFB_ARGS adds Xvfb options to simulate another server layout, e.g. XTURBO_XVFB_ARGS="-extension GLX". Screen size and depth (800x600x24) and the bound extensions are capture inputs and must stay as captured. Rewrite the goldens from the repository root with:

PATH="$PATH:/usr/sbin" go test -tags xserver ./internal/xtest -update

The local /usr/sbin/xtrace is glibc's program execution tracer, not the X11 protocol proxy. The permitted fallback uses a raw Unix socketpair tee connected to a fresh Xvfb server. A small independent reference encoder (not the generated bindings) sends the requests; the tee records their actual bytes. GetGeometry's successful response also establishes that the preceding MapWindow was accepted. The captured target is the root window; XFIXES's major opcode is negotiated. Tests read target/opcode from the fixture, not a hard-coded server assignment. No runtime Conn is needed at this phase.

The same run also writes reply goldens (<Name>.reply.hex): the server's response to each reference request, read back through the tee. Events and runtime integration belong to their subsequent tasks.

T2.4 adds InternAtom, ChangeProperty and XRes QueryClientIds. A GetProperty read-back validates the property contents. XRes's major opcode is negotiated; QueryVersion 1.2 precedes the ClientIdSpec-list query. The capture is independent of generated code, including counts, framing, and padding.

T2.5 adds ConfigureWindow with empty, sparse and all-seven-bit masks, CreateWindow, ChangeWindowAttributes and Render CreatePicture. The reference encoder creates sibling windows, exercises signed coordinates and both BOOL32 values, and fences void requests with a successful reply (any preceding error fails capture). RENDER's opcode and the root visual's picture format are queried from Xvfb. Tests reuse only server-assigned resource/format IDs from fixtures; mask bits, values and ordering remain independent expected inputs.

T2.6 keeps the replies to QueryExtension, xfixes QueryVersion, GetGeometry, InternAtom, GetProperty, res QueryClientIds and render QueryPictFormats, and adds GetWindowAttributes (child window), QueryTree (root), an unset WM_NAME GetProperty (zero-length value) and ListExtensions (variable STR list). These reply-only requests use opcodes outside the request-golden classifier. Generated FuzzParse*Reply targets seed from every matching reply golden.

T2.7 adds event and error goldens (<Name>.event.hex, <Name>.error.hex). The tee client selects SubstructureRedirect/Notify and PropertyChange on the root plus XFIXES selection input; a second raw client (not teed) creates, maps, configures, unmaps and destroys a window, writes a root property, sends a format-32 ClientMessage and takes PRIMARY. ConvertSelection of an unowned SECONDARY yields a core SelectionNotify. GetAtomName, GetWindowAttributes and XFIXES DestroyRegion on bad IDs yield BadAtom, BadWindow and BadRegion. Each batch is fenced by a GetInputFocus reply; unexpected packets fail capture. KeymapNotify and GeGeneric (XGE framing with a tail) are hand-written (# hand:): Xvfb produces neither for these clients.

source
1# Wire goldens
2
3`make xserver` captures from a fresh Xvfb and compares every packet with the
4committed golden. Comparison is independent of the server build:
5
6- Server-chosen values (root window, visual, colormap, interned atom,
7  resource IDs from the client's resource base, extension opcodes and
8  event/error bases) are listed per golden by field offset in
9  `serverFields`. `-update` records their capture-time values in
10  `testdata/golden/xvfb-roles.json`. Compare mode checks that the golden holds
11  the recorded value and the live packet holds the live server's value, masks
12  both, then compares the remaining bytes exactly. Server timestamps are
13  masked without a value check.
14- `ListExtensions` and Render `QueryPictFormats` replies depend on how the
15  server was built (extension list, visuals, formats), so live compare
16  checks invariants: framing, counts matching list lengths, the bound
17  extensions present, the root visual mapped to the format CreatePicture uses.
18
19Unit tests still decode the committed goldens byte-exactly. The test is
20skipped when Xvfb is not installed. `XTURBO_XVFB_ARGS` adds Xvfb options to
21simulate another server layout, e.g. `XTURBO_XVFB_ARGS="-extension GLX"`.
22Screen size and depth (800x600x24) and the bound extensions are capture
23inputs and must stay as captured. Rewrite the goldens from the repository
24root with:
25
26```
27PATH="$PATH:/usr/sbin" go test -tags xserver ./internal/xtest -update
28```
29
30The local `/usr/sbin/xtrace` is glibc's program execution tracer, not the X11
31protocol proxy. The permitted fallback uses a raw Unix socketpair tee connected
32to a fresh Xvfb server. A small independent reference encoder (not the generated
33bindings) sends the requests; the tee records their actual bytes. GetGeometry's
34successful response also establishes that the preceding MapWindow was accepted.
35The captured target is the root window; XFIXES's major opcode is negotiated.
36Tests read target/opcode from the fixture, not a hard-coded server assignment.
37No runtime Conn is needed at this phase.
38
39The same run also writes reply goldens (`<Name>.reply.hex`): the server's
40response to each reference request, read back through the tee. Events and
41runtime integration belong to their subsequent tasks.
42
43T2.4 adds InternAtom, ChangeProperty and XRes QueryClientIds. A GetProperty
44read-back validates the property contents. XRes's major opcode is negotiated;
45QueryVersion 1.2 precedes the ClientIdSpec-list query. The capture is independent
46of generated code, including counts, framing, and padding.
47
48T2.5 adds ConfigureWindow with empty, sparse and all-seven-bit masks,
49CreateWindow, ChangeWindowAttributes and Render CreatePicture. The reference
50encoder creates sibling windows, exercises signed coordinates and both BOOL32
51values, and fences void requests with a successful reply (any preceding error
52fails capture). RENDER's opcode and the root visual's picture format are queried
53from Xvfb. Tests reuse only server-assigned resource/format IDs from fixtures;
54mask bits, values and ordering remain independent expected inputs.
55
56T2.6 keeps the replies to QueryExtension, xfixes QueryVersion, GetGeometry,
57InternAtom, GetProperty, res QueryClientIds and render QueryPictFormats, and
58adds GetWindowAttributes (child window), QueryTree (root), an unset WM_NAME
59GetProperty (zero-length value) and ListExtensions (variable STR list). These
60reply-only requests use opcodes outside the request-golden classifier.
61Generated `FuzzParse*Reply` targets seed from every matching reply golden.
62
63T2.7 adds event and error goldens (`<Name>.event.hex`, `<Name>.error.hex`).
64The tee client selects SubstructureRedirect/Notify and PropertyChange on the
65root plus XFIXES selection input; a second raw client (not teed) creates, maps,
66configures, unmaps and destroys a window, writes a root property, sends a
67format-32 ClientMessage and takes PRIMARY. ConvertSelection of an unowned
68SECONDARY yields a core SelectionNotify. GetAtomName, GetWindowAttributes and
69XFIXES DestroyRegion on bad IDs yield BadAtom, BadWindow and BadRegion. Each
70batch is fenced by a GetInputFocus reply; unexpected packets fail capture.
71`KeymapNotify` and `GeGeneric` (XGE framing with a tail) are hand-written
72(`# hand:`): Xvfb produces neither for these clients.

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 1

Tags 1

↑↓ moveenter openesc close