From 1aefc1ccf3555d707de39ee31238046aab8c4b47 Mon Sep 17 00:00:00 2001 From: Riccardo Casatta Date: Fri, 24 Sep 2021 10:47:16 +0200 Subject: [PATCH] In fuzzing add a final job verifying all the fuzz targets have been executed --- .github/workflows/fuzz.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/.github/workflows/fuzz.yml b/.github/workflows/fuzz.yml index 11b852cc..0b6683aa 100644 --- a/.github/workflows/fuzz.yml +++ b/.github/workflows/fuzz.yml @@ -34,3 +34,20 @@ jobs: - run: echo "HFUZZ_RUN_ARGS=\"--run_time 30 --exit_upon_crash -v -f hfuzz_input/${{ matrix.fuzz_target }}/input\"" >> $GITHUB_ENV - name: fuzz run: cd fuzz && cargo +nightly hfuzz run ${{ matrix.fuzz_target }} + - run: echo "${{ matrix.fuzz_target }}.rs" >executed_${{ matrix.fuzz_target }} + - uses: actions/upload-artifact@v2 + with: + name: executed_${{ matrix.fuzz_target }} + path: executed_${{ matrix.fuzz_target }} + + verify-execution: + needs: fuzz + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/download-artifact@v2 + - name: Display structure of downloaded files + run: ls -R + - run: find executed_* -type f -exec cat {} + | sort > executed + - run: ls fuzz/fuzz_targets | sort > expected + - run: diff expected executed