Skip to content

Commit

Permalink
kubevirt: add more upstream fuzzers (#13024)
Browse files Browse the repository at this point in the history
Adds more fuzzers

Signed-off-by: Adam Korczynski <[email protected]>
  • Loading branch information
AdamKorcz authored Feb 10, 2025
1 parent 2ca4da3 commit 023ab8b
Show file tree
Hide file tree
Showing 2 changed files with 7 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 @@ -22,5 +22,6 @@ RUN git clone --depth=1 https://github.com/AdamKorcz/kubevirt --branch=fuzz1 $SR
RUN git clone --depth=1 https://github.com/AdamKorcz/kubevirt --branch=fuzz2 $SRC/kubevirt-fuzz2
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
COPY build.sh fuzz*test.go $SRC/
WORKDIR $SRC/kubevirt
6 changes: 6 additions & 0 deletions projects/kubevirt/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ cp $SRC/kubevirt-fuzz2/pkg/virt-controller/watch/clone/fuzz_test.go $SRC/kubevir
cp $SRC/kubevirt-fuzz3/pkg/virt-controller/watch/vm/fuzz_test.go $SRC/kubevirt/pkg/virt-controller/watch/vm/
cp $SRC/kubevirt-fuzz3/pkg/virt-controller/watch/vmi/fuzz_test.go $SRC/kubevirt/pkg/virt-controller/watch/vmi/
cp $SRC/kubevirt-fuzz4/pkg/virt-controller/watch/node/fuzz_test.go $SRC/kubevirt/pkg/virt-controller/watch/node/
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/

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 @@ -38,6 +41,9 @@ compile_native_go_fuzzer kubevirt.io/kubevirt/pkg/virt-controller/watch/vm FuzzE
compile_native_go_fuzzer kubevirt.io/kubevirt/pkg/virt-controller/watch/vmi FuzzExecute FuzzVMIWatchExecute
compile_native_go_fuzzer kubevirt.io/kubevirt/pkg/virt-controller/watch/clone FuzzVMCloneController FuzzVMCloneController
compile_native_go_fuzzer kubevirt.io/kubevirt/pkg/virt-operator/resource/apply FuzzReconciler FuzzVirtOperatorResApplyReconciler
compile_native_go_fuzzer kubevirt.io/kubevirt/pkg/virt-controller/watch/drain/disruptionbudget FuzzExecute FuzzWatchDrainDisruptionBudgetExecute
compile_native_go_fuzzer kubevirt.io/kubevirt/pkg/virt-controller/watch/migration FuzzExecute FuzzWatchMigrationExecute
compile_native_go_fuzzer kubevirt.io/kubevirt/pkg/virt-controller/watch/pool FuzzExecute FuzzWatchPoolExecute

mv $SRC/fuzz_test.go ./pkg/certificates/triple/cert/
compile_native_go_fuzzer kubevirt.io/kubevirt/pkg/certificates/triple/cert FuzzKeyParsers FuzzKeyParsers
Expand Down

0 comments on commit 023ab8b

Please sign in to comment.