knative: move fuzzers to cncf-fuzzing (#9282)

Signed-off-by: AdamKorcz <adam@adalogics.com>

Signed-off-by: AdamKorcz <adam@adalogics.com>
This commit is contained in:
AdamKorcz 2022-12-27 13:38:57 +00:00 committed by GitHub
parent 526edb8a0d
commit 9cc1232c07
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 20 deletions

View File

@ -15,6 +15,7 @@
################################################################################
FROM gcr.io/oss-fuzz-base/base-builder-go
RUN git clone --depth 1 https://github.com/cncf/cncf-fuzzing
RUN git clone --depth 1 https://github.com/knative/pkg
RUN git clone --depth 1 https://github.com/knative/serving
WORKDIR $SRC/pkg

View File

@ -15,23 +15,4 @@
#
################################################################################
printf "package metrics\nimport _ \"github.com/AdamKorcz/go-118-fuzz-build/testing\"\n" > $SRC/pkg/metrics/registerfuzzdep.go
go mod tidy && go mod vendor
cp $SRC/json_fuzzer.go $SRC/pkg/webhook/json/
mv $SRC/pkg/webhook/json/decode_test.go $SRC/pkg/webhook/json/decode_test_fuzz.go
compile_go_fuzzer knative.dev/pkg/webhook/json FuzzJsonDecode fuzz_json_decode
cp $SRC/fuzz_pkg_metrics.go $SRC/pkg/metrics/
compile_native_go_fuzzer knative.dev/pkg/metrics FuzzNewObservabilityConfigFromConfigMap FuzzNewObservabilityConfigFromConfigMap
cp $SRC/fuzz_pkg_websocket.go $SRC/pkg/websocket/
mv $SRC/pkg/websocket/connection_test.go $SRC/pkg/websocket/connection_fuzz.go
compile_native_go_fuzzer knative.dev/pkg/websocket FuzzSendRawMessage FuzzSendRawMessage
cp $SRC/fuzz_activatornet.go $SRC/serving/pkg/activator/net/
cd $SRC/serving
mv pkg/activator/net/throttler_test.go pkg/activator/net/throttler_test_fuzz.go
mv pkg/activator/net/revision_backends_test.go pkg/activator/net/revision_backends_test_fuzz.go
printf "package net\nimport _ \"github.com/AdamKorcz/go-118-fuzz-build/testing\"\n" > $SRC/serving/pkg/activator/net/registerfuzzdep.go
go mod tidy && go mod vendor
compile_native_go_fuzzer knative.dev/serving/pkg/activator/net FuzzNewRevisionThrottler FuzzNewRevisionThrottler
$SRC/cncf-fuzzing/projects/knative/build.sh