Skip to content

Commit

Permalink
Kubevirt: add fuzzer
Browse files Browse the repository at this point in the history
Signed-off-by: Adam Korczynski <[email protected]>
  • Loading branch information
AdamKorcz committed Feb 11, 2025
1 parent 68fd265 commit 0e44903
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions projects/kubevirt/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,6 @@ RUN git clone --depth=1 https://github.com/AdamKorcz/kubevirt --branch=fuzz2 $SR
RUN git clone --depth=1 https://github.com/AdamKorcz/kubevirt --branch=fuzz3 $SRC/kubevirt-fuzz3
RUN git clone --depth=1 https://github.com/AdamKorcz/kubevirt --branch=fuzz4 $SRC/kubevirt-fuzz4
RUN git clone --depth=1 https://github.com/AdamKorcz/kubevirt --branch=fuzz5 $SRC/kubevirt-fuzz5
RUN git clone --depth=1 https://github.com/AdamKorcz/kubevirt --branch=fuzz6 $SRC/kubevirt-fuzz6
COPY build.sh fuzz*test.go $SRC/
WORKDIR $SRC/kubevirt
2 changes: 2 additions & 0 deletions projects/kubevirt/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ cp $SRC/kubevirt-fuzz4/pkg/virt-controller/watch/node/fuzz_test.go $SRC/kubevirt
cp $SRC/kubevirt-fuzz5/pkg/virt-controller/watch/drain/disruptionbudget/fuzz_test.go $SRC/kubevirt/pkg/virt-controller/watch/drain/disruptionbudget/
cp $SRC/kubevirt-fuzz5/pkg/virt-controller/watch/migration/fuzz_test.go $SRC/kubevirt/pkg/virt-controller/watch/migration/
cp $SRC/kubevirt-fuzz5/pkg/virt-controller/watch/pool/fuzz_test.go $SRC/kubevirt/pkg/virt-controller/watch/pool/
cp $SRC/kubevirt-fuzz6/pkg/virt-operator/resource/generate/install/fuzz_test.go $SRC/kubevirt/pkg/virt-operator/resource/generate/install/

printf "package webhooks\nimport _ \"github.com/AdamKorcz/go-118-fuzz-build/testing\"\n" > pkg/util/webhooks/register_fuzz_dep.go
go mod tidy
Expand All @@ -36,6 +37,7 @@ go mod edit -replace github.com/AdamKorcz/go-118-fuzz-build="$SRC"/go-118-fuzz-b
go mod tidy
go mod vendor

compile_native_go_fuzzer kubevirt.io/kubevirt/pkg/virt-operator/resource/generate/install FuzzLoadInstallStrategyFromCache FuzzLoadInstallStrategyFromCache
compile_native_go_fuzzer kubevirt.io/kubevirt/pkg/virt-controller/watch/node FuzzExecute FuzzNodeWatchExecute
compile_native_go_fuzzer kubevirt.io/kubevirt/pkg/virt-controller/watch/vm FuzzExecute FuzzVMWatchExecute
compile_native_go_fuzzer kubevirt.io/kubevirt/pkg/virt-controller/watch/vmi FuzzExecute FuzzVMIWatchExecute
Expand Down

0 comments on commit 0e44903

Please sign in to comment.