Skip to content

Nightly Fuzz Tests

Nightly Fuzz Tests #40

name: Nightly Fuzz Tests
on:
schedule:
- cron: "17 5 * * *"
workflow_dispatch:
jobs:
build:
name: "Build broker for fuzzing"
uses: ./.github/workflows/build-ubuntu.yaml
with:
ref: ${{ github.sha }}
target: "bmqbrkr"
save_build_as_artifacts: true
run_unit_tests: false
name: "fuzz-build"
cxx_standard: cpp23
fuzz_tests:
name: "Fuzz [${{ matrix.fuzztest }}]"
runs-on: ubuntu-latest
needs: build
timeout-minutes: 90
strategy:
fail-fast: false
matrix:
fuzztest:
- "test_fuzz_request[authentication]"
- "test_fuzz_request[negotiation]"
- "test_fuzz_request[open_queue]"
- "test_fuzz_request[configure_stream]"
- "test_fuzz_request[configure_queue_stream]"
- "test_fuzz_request[put]"
- "test_fuzz_request[confirm]"
- "test_fuzz_request[close_queue]"
- "test_fuzz_request[disconnect]"
- "test_fuzz_request[negotiation_bypass_authentication]"
- "test_fuzz_properties"
steps:
- uses: actions/checkout@v6
- name: Download broker build
uses: actions/download-artifact@v5
with:
name: ${{ needs.build.outputs.artifact_key }}
- name: Prepare broker runtime files
run: |
BROKER_DIR=build/blazingmq/src/applications/bmqbrkr
find ./build -type f -name "*.tsk" -exec chmod +x {} +
cp src/applications/bmqbrkr/run "$BROKER_DIR/run"
chmod +x "$BROKER_DIR/run"
rm -rf "$BROKER_DIR/etc"
cp -r src/applications/bmqbrkr/etc "$BROKER_DIR/etc"
- name: Install Python dependencies
run: pip install -r src/python/requirements-test.txt
- name: Run fuzz test
env:
PYTHONPATH: ${{ github.workspace }}/src/python
BLAZINGMQ_BUILD_DIR: ${{ github.workspace }}/build/blazingmq
run: |
pytest "src/fuzz-tests/test_fuzz.py::${{ matrix.fuzztest }}" \
-m fuzztest \
-v \
--timeout=3600
- name: Upload fuzz logs
if: failure()
uses: actions/upload-artifact@v5
with:
name: fuzz-logs-${{ matrix.fuzztest }}
path: |
src/fuzz-tests/boofuzz-results/
build/blazingmq/src/applications/bmqbrkr/localBMQ/logs/