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

support for timeout #757

Open
pca006132 opened this issue Nov 16, 2023 · 5 comments
Open

support for timeout #757

pca006132 opened this issue Nov 16, 2023 · 5 comments

Comments

@pca006132
Copy link

There is no support for timeout in gtest, and the simplest way is to use async task timeout. However, the thread running the async task will block the fuzzer from knowing the task has failed, and not print the failing test case.

My current workaround is to use pthread kill to kill the async task thread, but this is only safe in some cases and platform specific. It would be better if this library can provide a way of handling timeout.

@lukevalenty
Copy link

Would be very useful to have this supported.

@Changochen
Copy link
Collaborator

Do you mean this (

FUZZTEST_DEFINE_FLAG(
)?

@pca006132
Copy link
Author

I think the flag is not failing the test when the time limit has reached, but just stop the fuzzer? Not tried yet.

@Changochen
Copy link
Collaborator

Changochen commented Dec 13, 2023

I see. So you mean the timeout for a single execution of the fuzztest?

@pca006132
Copy link
Author

Yes.

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

No branches or pull requests

3 participants