Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tests/fuzzers/les: add fuzzer for les server handler #22282

Merged
merged 4 commits into from
Feb 20, 2021

Conversation

zsfelfoldi
Copy link
Contributor

@zsfelfoldi zsfelfoldi commented Feb 8, 2021

This PR refactors the LES server handler in order to make fuzzer testing possible and implements the fuzzer.
Replaces #22173 and #22237

@zsfelfoldi zsfelfoldi changed the title tests/fuzzers/les: add fuzzer for les server handler tests/fuzzers/les: add fuzzer for les server handler (WIP) Feb 8, 2021
@zsfelfoldi zsfelfoldi changed the title tests/fuzzers/les: add fuzzer for les server handler (WIP) tests/fuzzers/les: add fuzzer for les server handler Feb 8, 2021
zsfelfoldi and others added 3 commits February 9, 2021 11:33
tests: update les fuzzer

tests/fuzzer/les: release resources

tests/fuzzer/les: pre-initialize all resources
// If so, deduct the max cost from the flow control buffer.
accept := func(reqID, reqCnt, maxCnt uint64) bool {
// Short circuit if the peer is already frozen or the request is invalid.
inSizeCost := h.server.costTracker.realCost(0, msg.Size, 0)
Copy link
Member

Choose a reason for hiding this comment

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

Would be super super nice if we can encapsulate these "before-serving" logic and "after-serving" logic into two separate functions: "prepare" and "finalize". The execution is in the middle.

Just throw out the thoughts here. We can open the following PR if you also think it's a good idea.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure, let's do it in a follow-up PR.

@rjl493456442
Copy link
Member

rjl493456442 commented Feb 19, 2021

Ran the fuzzer for a while, no crash detected.

2021/02/19 15:05:51 workers: 8, corpus: 20 (10m36s ago), crashers: 0, restarts: 1/8950, execs: 948729 (783/sec), cover: 3369, uptime: 20m12s

Copy link
Member

@rjl493456442 rjl493456442 left a comment

Choose a reason for hiding this comment

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

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants