google / fuzztest

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

support for timeout

pca006132 opened this issue · comments

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.

Would be very useful to have this supported.

commented

Do you mean this (

FUZZTEST_DEFINE_FLAG(
)?

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

commented

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

Yes.