Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable verifier fuzzer in github CI/CD #1163

Merged
merged 7 commits into from
Jun 14, 2022
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
14 changes: 14 additions & 0 deletions .github/workflows/cicd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,20 @@ jobs:
code_coverage: false
gather_dumps: true

# Run the verifier fuzzer.
verifier_fuzzer:
needs: libfuzzer
# Always run this job.
if: github.event_name == 'schedule' || github.event_name == 'pull_request'
uses: ./.github/workflows/reusable-test.yml
with:
name: verifier_fuzzer
test_command: verifier_fuzzer.exe verifier_corpus -use_value_profile=1 -max_total_time=1800 -artifact_prefix=Artifacts\
build_artifact: Build-x64-fuzzer
environment: windows-2019
code_coverage: false
gather_dumps: true

core_helper_fuzzer:
needs: libfuzzer
# Always run this job.
Expand Down
13 changes: 13 additions & 0 deletions scripts/create_verifier_corpus.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
@echo off
rem Copyright (c) Microsoft Corporation
rem SPDX-License-Identifier: MIT
rem
rem Usage: create_verifier_corpus.bat <solution_path> <output_directory>

set SOLUTIONPATH=%1
set OUTPUTPATH=%2
xcopy /d /i /y "%SOLUTIONPATH%\external\ebpf-verifier\ebpf-samples\build" "%OUTPUTPATH%"
xcopy /d /i /y "%SOLUTIONPATH%\external\ebpf-verifier\ebpf-samples\invalid" "%OUTPUTPATH%"
xcopy /d /i /y "%SOLUTIONPATH%\external\ebpf-verifier\ebpf-samples\linux" "%OUTPUTPATH%"
xcopy /d /i /y "%SOLUTIONPATH%\external\ebpf-verifier\ebpf-samples\prototype-kernel" "%OUTPUTPATH%"
xcopy /d /i /y "%SOLUTIONPATH%\external\ebpf-verifier\ebpf-samples\suricata" "%OUTPUTPATH%"
9 changes: 9 additions & 0 deletions tests/libfuzzer/verifier/verifier_fuzzer.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,15 @@
<Project>{3617528a-cb85-418b-82c1-e9cfc16755f6}</Project>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<CustomBuild Include="..\..\..\scripts\create_verifier_corpus.bat">
<FileType>Document</FileType>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)scripts\create_verifier_corpus.bat $(SolutionDir) $(OutDir)verifier_corpus</Command>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)scripts\create_verifier_corpus.bat $(SolutionDir) $(OutDir)verifier_corpus</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)verifier_corpus\twomaps.o</Outputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(OutDir)verifier_corpus\twomaps.o</Outputs>
</CustomBuild>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
Expand Down
5 changes: 5 additions & 0 deletions tests/libfuzzer/verifier/verifier_fuzzer.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,9 @@
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<CustomBuild Include="..\..\..\scripts\create_verifier_corpus.bat">
<Filter>Source Files</Filter>
</CustomBuild>
</ItemGroup>
</Project>