Skip to content

silkworm: seg compressor fuzz test#9453

Merged
battlmonstr merged 1 commit intodevelfrom
pr/sw_seg_fuzz
Feb 16, 2024
Merged

silkworm: seg compressor fuzz test#9453
battlmonstr merged 1 commit intodevelfrom
pr/sw_seg_fuzz

Conversation

@battlmonstr
Copy link
Copy Markdown
Contributor

A test that generates an input file,
compresses it using both erigon and silkworm,
and compares that the result matches.

A test that generates an input file,
compresses it using both erigon and silkworm,
and compares that the result matches.
investigationDir, _ := os.LookupEnv("INVESTIGATION_DIR")

f.Add(int64(0))
f.Fuzz(func(t *testing.T, seed int64) {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

i think it's a bit anti-pattern: to use input of fuzz test as random seed. because fuzzing framework trying to mutate input to increase code coverage - but "any meaningful seed mutation" will change code coverage randomly(or likely will not change at all - because 1 random data-set will look very similar to another random data-set).

Better give more control for fuzzer: more input params, more tide input params to data-set.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

yes, I've used Fuzz, because the other files here have used it. I should probably rewrite it from Fuzz to quick.Check, because Fuzz doesn't support custom generators, and generation here is complicated.

@battlmonstr battlmonstr merged commit c5c70d2 into devel Feb 16, 2024
@battlmonstr battlmonstr deleted the pr/sw_seg_fuzz branch February 16, 2024 08:28
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.

3 participants