detached bb30cc0

ci(fuzz): add make fuzz target and a fuzz workflow on main

commit
bb30cc003c4689fcc917ccb590b7b297184bf1e5
author
brice · · 2026-10-22 10:36 UTC
parent
ad1316e
signature
GPG VerifiedCD88F9E564E0102646FB6077A1A07C7C7C3E349D · arch-gpg Verified for the committer email
2 files · +26 -1
A .github/workflows/fuzz.yml +17 -0
@@ -0,0 +1,17 @@
1+name: fuzz
2+on:
3+ push:
4+ branches: [main]
5+ workflow_dispatch:
6+permissions:
7+ contents: read
8+jobs:
9+ fuzz:
10+ runs-on: ubuntu-latest
11+ timeout-minutes: 60
12+ steps:
13+ - uses: actions/checkout@v4
14+ - uses: actions/setup-go@v5
15+ with:
16+ go-version-file: go.mod
17+ - run: make fuzz FUZZTIME=60s
@@ -0,0 +1,17 @@
1+name: fuzz
2+on:
3+ push:
4+ branches: [main]
5+ workflow_dispatch:
6+permissions:
7+ contents: read
8+jobs:
9+ fuzz:
10+ runs-on: ubuntu-latest
11+ timeout-minutes: 60
12+ steps:
13+ - uses: actions/checkout@v4
14+ - uses: actions/setup-go@v5
15+ with:
16+ go-version-file: go.mod
17+ - run: make fuzz FUZZTIME=60s
M Makefile +9 -1
@@ -1,7 +1,8 @@
11 export CGO_ENABLED := 0
22 STATICCHECK ?= staticcheck
3+FUZZTIME ?= 60s
34
4-.PHONY: gen gen-check test race alloc poison bench xserver staticcheck vet check
5+.PHONY: gen gen-check test race alloc poison bench fuzz xserver staticcheck vet check
56
67 gen:
78 go generate ./...
@@ -18,6 +19,13 @@ poison:
1819 go test -tags xturbo_poison ./...
1920 bench:
2021 go test -bench . -benchmem ./...
22+fuzz:
23+ @set -e; for pkg in $$(go list ./...); do \
24+ 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; \
27+ done; \
28+ done
2129 xserver:
2230 PATH="$$PATH:/usr/sbin" go test -tags xserver ./...
2331 staticcheck:
@@ -1,7 +1,8 @@
1 export CGO_ENABLED := 01 export CGO_ENABLED := 0
2 STATICCHECK ?= staticcheck2 STATICCHECK ?= staticcheck
3+FUZZTIME ?= 60s
3 4
4-.PHONY: gen gen-check test race alloc poison bench xserver staticcheck vet check5+.PHONY: gen gen-check test race alloc poison bench fuzz xserver staticcheck vet check
5 6
6 gen:7 gen:
7 go generate ./...8 go generate ./...
@@ -18,6 +19,13 @@ poison:
18 go test -tags xturbo_poison ./...19 go test -tags xturbo_poison ./...
19 bench:20 bench:
20 go test -bench . -benchmem ./...21 go test -bench . -benchmem ./...
22+fuzz:
23+ @set -e; for pkg in $$(go list ./...); do \
24+ 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; \
27+ done; \
28+ done
21 xserver:29 xserver:
22 PATH="$$PATH:/usr/sbin" go test -tags xserver ./...30 PATH="$$PATH:/usr/sbin" go test -tags xserver ./...
23 staticcheck:31 staticcheck:

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