Skip to content

Conversation

@kzys
Copy link
Member

@kzys kzys commented Jul 1, 2022

This commit copies the fuzzers from the repository except for
containerd_import_structured_fuzzer.go.

Signed-off-by: Kazuyoshi Kato [email protected]

@k8s-ci-robot
Copy link

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@kzys kzys force-pushed the fuzz branch 7 times, most recently from 7628922 to fe4ba1c Compare July 1, 2022 18:05
@kzys kzys marked this pull request as ready for review July 1, 2022 18:20
@kzys
Copy link
Member Author

kzys commented Jul 1, 2022

@AdamKorcz Please take a look.

@kzys
Copy link
Member Author

kzys commented Jul 6, 2022

@AdamKorcz Is it possible to measure the efficiency (e.g. # of lines covered / iterations?) of a fuzzer? I'm wondering about https://github.com/cncf/cncf-fuzzing/blob/c402ef33d7a399d1c00c009d51df910e30dfe00a/projects/containerd/containerd_import_structured_fuzzer.go#L73-L79. Does it make sense to have both

func FuzzContainerdImport(data []byte) int {
and containerd_import_structured_fuzzer.go?

@AdamKorcz
Copy link
Contributor

AdamKorcz commented Jul 6, 2022

@AdamKorcz Is it possible to measure the efficiency (e.g. # of lines covered / iterations?) of a fuzzer? I'm wondering about https://github.com/cncf/cncf-fuzzing/blob/c402ef33d7a399d1c00c009d51df910e30dfe00a/projects/containerd/containerd_import_structured_fuzzer.go#L73-L79. Does it make sense to have both

func FuzzContainerdImport(data []byte) int {

and containerd_import_structured_fuzzer.go?

The simplest test is to run these fuzzers over a defined time (for example 2 hours) and observe its coverage. As far as I remember, the structured fuzzer outperforms the non-structured one significantly. However, there might be value in having a fuzzer that generates more random input than the structured one, for example if the structured one does not reach all code.

Kazuyoshi Kato added 2 commits July 6, 2022 15:21
This commit copies the fuzzers from the repository except for
containerd_import_structured_fuzzer.go.

Signed-off-by: Kazuyoshi Kato <[email protected]>
@kzys
Copy link
Member Author

kzys commented Jul 6, 2022

This one is ready for review. I will work on containerd_import_structured_fuzzer.go in a different PR since this PR is already big.

Copy link
Member

@estesp estesp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@dmcgowan dmcgowan merged commit 681aaf6 into containerd:main Jul 6, 2022
kzys pushed a commit to kzys/cncf-fuzzing that referenced this pull request Aug 18, 2022
They are copied to containerd's repos in
containerd/containerd#7123.

Signed-off-by: Kazuyoshi Kato <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants