From 2b60770c4b210e769d2fcbeaf25588af9494a822 Mon Sep 17 00:00:00 2001 From: Kazuyoshi Kato Date: Tue, 21 Jun 2022 16:47:12 +0000 Subject: [PATCH] Move container_fuzzer.go under integration/client/ Signed-off-by: Kazuyoshi Kato --- contrib/fuzz/oss_fuzz_build.sh | 4 ---- {contrib/fuzz => integration/client}/container_fuzzer.go | 9 +++------ integration/client/go.mod | 3 ++- 3 files changed, 5 insertions(+), 11 deletions(-) rename {contrib/fuzz => integration/client}/container_fuzzer.go (98%) diff --git a/contrib/fuzz/oss_fuzz_build.sh b/contrib/fuzz/oss_fuzz_build.sh index 0f78445b4..2a0339beb 100755 --- a/contrib/fuzz/oss_fuzz_build.sh +++ b/contrib/fuzz/oss_fuzz_build.sh @@ -53,12 +53,8 @@ rm /root/go/pkg/mod/github.com/cilium/ebpf@v0.7.0/internal/btf/fuzz.go cd "$(dirname "${BASH_SOURCE[0]}")" cd ../../ -# Move all fuzzers that don't have the "fuzz" package out of this dir -mv contrib/fuzz/container_fuzzer.go integration/client/ - rm -r vendor - # Change path of socket since OSS-fuzz does not grant access to /run sed -i 's/\/run\/containerd/\/tmp\/containerd/g' $SRC/containerd/defaults/defaults_unix.go diff --git a/contrib/fuzz/container_fuzzer.go b/integration/client/container_fuzzer.go similarity index 98% rename from contrib/fuzz/container_fuzzer.go rename to integration/client/container_fuzzer.go index 1738dbed8..fa7d053de 100644 --- a/contrib/fuzz/container_fuzzer.go +++ b/integration/client/container_fuzzer.go @@ -3,10 +3,13 @@ /* Copyright The containerd Authors. + Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at + http://www.apache.org/licenses/LICENSE-2.0 + Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -14,12 +17,6 @@ limitations under the License. */ -/* - To run this fuzzer, it must first be moved to - integration/client. OSS-fuzz does this automatically - everytime it builds the fuzzers. -*/ - package client import ( diff --git a/integration/client/go.mod b/integration/client/go.mod index d8b13b321..2593b1d79 100644 --- a/integration/client/go.mod +++ b/integration/client/go.mod @@ -19,8 +19,9 @@ require ( golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a ) +require github.com/AdaLogics/go-fuzz-headers v0.0.0-20210715213245-6c3934b029d8 + require ( - github.com/AdaLogics/go-fuzz-headers v0.0.0-20210715213245-6c3934b029d8 // indirect github.com/Microsoft/go-winio v0.5.2 // indirect github.com/blang/semver v3.5.1+incompatible // indirect github.com/cilium/ebpf v0.7.0 // indirect