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

feature request: add support for fuzz/invariant timeouts #9393

Closed
smartcontracts opened this issue Nov 24, 2024 · 3 comments
Closed

feature request: add support for fuzz/invariant timeouts #9393

smartcontracts opened this issue Nov 24, 2024 · 3 comments
Labels
T-feature Type: feature T-needs-triage Type: this issue needs to be labelled

Comments

@smartcontracts
Copy link
Contributor

Component

Forge

Describe the feature you would like

Would be great to have support for configurable timeouts in fuzz/invariant testing. General goal here is to be able to run these types of tests for a specific amount of time rather than a specific number of runs.

Example interface that might work would be to have some option --fuzz-timeout-seconds and --invariant-timeout-seconds that causes individual tests to time out after some number of seconds. Timeouts would ideally apply to individual tests (i.e., test A runs for X seconds and times out but test B that started after test A will continue running).

It probably makes sense for timeouts to be considered failures by default. However, it would be ideal to have options like --allow-fuzz-timeout and --allow-invariant-timeout that causes Forge to not report timeouts as failures. This opens up a lot of possibilities with long-running fuzzing jobs.

Additional context

We've been messing with custom tooling to achieve this but doing it in forge is just way simpler.

@smartcontracts smartcontracts added T-feature Type: feature T-needs-triage Type: this issue needs to be labelled labels Nov 24, 2024
@github-project-automation github-project-automation bot moved this to Todo in Foundry Nov 24, 2024
@grandizzy
Copy link
Collaborator

thanks @smartcontracts would you be ok to adding your input to #990 and tracking impl there?

@smartcontracts
Copy link
Contributor Author

smartcontracts commented Nov 24, 2024

Yeah sure thing, will do

@grandizzy
Copy link
Collaborator

Thank you, closing this one as dupe then, will add thoughts on pr

@grandizzy grandizzy closed this as not planned Won't fix, can't repro, duplicate, stale Nov 24, 2024
@github-project-automation github-project-automation bot moved this from Todo to Done in Foundry Nov 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T-feature Type: feature T-needs-triage Type: this issue needs to be labelled
Projects
Archived in project
Development

No branches or pull requests

2 participants