Skip to content

Commit

Permalink
.github: upload failing inputs from fuzzer runs
Browse files Browse the repository at this point in the history
  • Loading branch information
Gottox committed Jun 2, 2024
1 parent 9d630a7 commit 0370751
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 2 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,8 @@ jobs:
runs-on: ubuntu-latest
container:
image: gottox/sqsh-build:x86_64
volumes:
- /tmp/build:/tmp/build
steps:
- uses: actions/checkout@v4
- name: configure
Expand All @@ -103,6 +105,12 @@ jobs:
- name: fuzzer
run: |
ninja -C /tmp/build test
- name: Upload Failing Inputs
uses: actions/upload-artifact@v4
if: failure()
with:
name: failing-inputs
path: /tmp/build/fuzzer/inputs

build:
needs:
Expand Down
13 changes: 11 additions & 2 deletions fuzzer/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -31,17 +31,26 @@ fuzzer = executable(
link_with: libsqsh.get_static_lib(),
)

rundir_tgt = custom_target(
'fuzzer_inputs',
output: 'inputs',
command: [mkdir, '-p', '@OUTPUT@'],
)

test(
'simple_fuzzer',
fuzzer,
depends: corpus_tgt,
workdir: rundir_tgt.full_path(),
is_parallel: false,
depends: [corpus_tgt, rundir_tgt],
args: [
corpus_tgt.full_path(),
source_corpus,
'-error_exitcode=1',
'-timeout_exitcode=1',
'-timeout=3',
'-timeout=10',
'-rss_limit_mb=0',
'-malloc_limit_mb=10',
'-max_total_time=@0@'.format(get_option('fuzzer_timeout')),
],
timeout: 10 + get_option('fuzzer_timeout'),
Expand Down

0 comments on commit 0370751

Please sign in to comment.