Repository navigation
54 lines (48 loc) · 1.45 KB
/
Copy pathfuzz.yml
File metadata and controls
54 lines (48 loc) · 1.45 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
name: Parser fuzz
# Exploratory only: started by hand from the Actions tab, never a merge gate.
# A crasher fails the run and is uploaded as an artifact; commit it under the
# target's testdata/fuzz/FuzzParse directory so it replays as a plain test.
on:
workflow_dispatch:
inputs:
head:
description: Query head to fuzz
type: choice
options:
- promql
- logql
- traceql
- prof
duration:
description: How long to fuzz, as a Go duration (e.g. 60s, 10m)
type: string
default: 60s
permissions:
contents: read
jobs:
fuzz:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- name: Set up Go
uses: actions/setup-go@v7
with:
go-version-file: go.mod
- name: Fuzz
env:
FUZZ_HEAD: ${{ inputs.head }}
FUZZ_DURATION: ${{ inputs.duration }}
run: |
# -fuzztime takes a duration such as 60s or 10m, or an iteration count such as 1000x.
if ! [[ "$FUZZ_DURATION" =~ ^[0-9]+(ns|us|ms|s|m|h|x)$ ]]; then
echo "invalid duration: $FUZZ_DURATION" >&2
exit 1
fi
make fuzz HEAD="$FUZZ_HEAD" DURATION="$FUZZ_DURATION"
- name: Upload crashers
if: failure()
uses: actions/upload-artifact@v7
with:
name: fuzz-crashers-${{ inputs.head }}
path: reader/${{ inputs.head }}/${{ inputs.head }}_parser/testdata/fuzz/
if-no-files-found: ignore