detached 1bfe747

ci(fuzz): give generated targets a shorter fuzz time so the workflow fits its timeout

commit
1bfe7474d8a7712e43daf371a73140f9a66e116a
author
brice · · 2026-10-22 10:40 UTC
parent
32dc121
signature
GPG VerifiedCD88F9E564E0102646FB6077A1A07C7C7C3E349D · arch-gpg Verified for the committer email
3 files · +10 -6
M .github/workflows/fuzz.yml +2 -2
@@ -8,10 +8,10 @@ permissions:
88 jobs:
99 fuzz:
1010 runs-on: ubuntu-latest
11- timeout-minutes: 60
11+ timeout-minutes: 45
1212 steps:
1313 - uses: actions/checkout@v4
1414 - uses: actions/setup-go@v5
1515 with:
1616 go-version-file: go.mod
17- - run: make fuzz FUZZTIME=60s
17+ - run: make fuzz FUZZTIME=60s GENFUZZTIME=20s
@@ -8,10 +8,10 @@ permissions:
8 jobs:8 jobs:
9 fuzz:9 fuzz:
10 runs-on: ubuntu-latest10 runs-on: ubuntu-latest
11- timeout-minutes: 6011+ timeout-minutes: 45
12 steps:12 steps:
13 - uses: actions/checkout@v413 - uses: actions/checkout@v4
14 - uses: actions/setup-go@v514 - uses: actions/setup-go@v5
15 with:15 with:
16 go-version-file: go.mod16 go-version-file: go.mod
17- - run: make fuzz FUZZTIME=60s17+ - run: make fuzz FUZZTIME=60s GENFUZZTIME=20s
M Makefile +7 -3
@@ -1,6 +1,7 @@
11 export CGO_ENABLED := 0
22 STATICCHECK ?= staticcheck
33 FUZZTIME ?= 60s
4+GENFUZZTIME ?= 10s
45
56 .PHONY: gen gen-check test race alloc poison bench fuzz xserver staticcheck vet check
67
@@ -19,11 +20,14 @@ poison:
1920 go test -tags xturbo_poison ./...
2021 bench:
2122 go test -bench . -benchmem ./...
23+# Root targets (dispatch, event decode, reply ring) get FUZZTIME; generated
24+# packages and the generator get GENFUZZTIME.
2225 fuzz:
23- @set -e; for pkg in $$(go list ./...); do \
26+ @set -e; root=$$(go list .); for pkg in $$(go list ./...); do \
27+ time=$(GENFUZZTIME); [ "$$pkg" = "$$root" ] && time=$(FUZZTIME); \
2428 for t in $$(go test -list 'Fuzz.*' $$pkg | grep '^Fuzz'); do \
25- echo "== $$pkg $$t ($(FUZZTIME))"; \
26- go test -run '^$$' -fuzz "^$$t$$" -fuzztime $(FUZZTIME) $$pkg; \
29+ echo "== $$pkg $$t ($$time)"; \
30+ go test -run '^$$' -fuzz "^$$t$$" -fuzztime $$time $$pkg; \
2731 done; \
2832 done
2933 xserver:
@@ -1,6 +1,7 @@
1 export CGO_ENABLED := 01 export CGO_ENABLED := 0
2 STATICCHECK ?= staticcheck2 STATICCHECK ?= staticcheck
3 FUZZTIME ?= 60s3 FUZZTIME ?= 60s
4+GENFUZZTIME ?= 10s
4 5
5 .PHONY: gen gen-check test race alloc poison bench fuzz xserver staticcheck vet check6 .PHONY: gen gen-check test race alloc poison bench fuzz xserver staticcheck vet check
6 7
@@ -19,11 +20,14 @@ poison:
19 go test -tags xturbo_poison ./...20 go test -tags xturbo_poison ./...
20 bench:21 bench:
21 go test -bench . -benchmem ./...22 go test -bench . -benchmem ./...
23+# Root targets (dispatch, event decode, reply ring) get FUZZTIME; generated
24+# packages and the generator get GENFUZZTIME.
22 fuzz:25 fuzz:
23- @set -e; for pkg in $$(go list ./...); do \26+ @set -e; root=$$(go list .); for pkg in $$(go list ./...); do \
27+ time=$(GENFUZZTIME); [ "$$pkg" = "$$root" ] && time=$(FUZZTIME); \
24 for t in $$(go test -list 'Fuzz.*' $$pkg | grep '^Fuzz'); do \28 for t in $$(go test -list 'Fuzz.*' $$pkg | grep '^Fuzz'); do \
25- echo "== $$pkg $$t ($(FUZZTIME))"; \29+ echo "== $$pkg $$t ($$time)"; \
26- go test -run '^$$' -fuzz "^$$t$$" -fuzztime $(FUZZTIME) $$pkg; \30+ go test -run '^$$' -fuzz "^$$t$$" -fuzztime $$time $$pkg; \
27 done; \31 done; \
28 done32 done
29 xserver:33 xserver:
M README.md +1 -1
@@ -166,7 +166,7 @@ go run ./cmd/xtsync # refresh spec/ from upstream and update the manifest
166166 ```sh
167167 make check # vet, staticcheck, tests, race, allocation, poison, gen-check
168168 make xserver # tests against a real Xvfb (needs xvfb and xtrace)
169-make fuzz # every Fuzz target for FUZZTIME each (default 60s)
169+make fuzz # root targets for FUZZTIME (60s), generated ones for GENFUZZTIME (10s)
170170 make bench # benchmarks
171171 ```
172172
@@ -166,7 +166,7 @@ go run ./cmd/xtsync # refresh spec/ from upstream and update the manifest
166 ```sh166 ```sh
167 make check # vet, staticcheck, tests, race, allocation, poison, gen-check167 make check # vet, staticcheck, tests, race, allocation, poison, gen-check
168 make xserver # tests against a real Xvfb (needs xvfb and xtrace)168 make xserver # tests against a real Xvfb (needs xvfb and xtrace)
169-make fuzz # every Fuzz target for FUZZTIME each (default 60s)169+make fuzz # root targets for FUZZTIME (60s), generated ones for GENFUZZTIME (10s)
170 make bench # benchmarks170 make bench # benchmarks
171 ```171 ```
172 172

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