Skip to content

Commit 9668e43

Browse files
committed
fuzz: make FuzzedSock::Wait() sometimes simulate an occurred event
1 parent 0c90ff1 commit 9668e43

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/test/fuzz/util.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,9 @@ bool FuzzedSock::Wait(std::chrono::milliseconds timeout, Event requested, Event*
1818
SetFuzzedErrNo(m_fuzzed_data_provider, wait_errnos);
1919
return false;
2020
}
21-
if (occurred) *occurred = 0;
21+
if (occurred != nullptr) {
22+
*occurred = m_fuzzed_data_provider.ConsumeBool() ? requested : 0;
23+
}
2224
return true;
2325
}
2426

0 commit comments

Comments
 (0)