| 194 | } |
| 195 | |
| 196 | bool FuzzedSock::Wait(std::chrono::milliseconds timeout, Event requested, Event* occurred) const |
| 197 | { |
| 198 | constexpr std::array wait_errnos{ |
| 199 | EBADF, |
| 200 | EINTR, |
| 201 | EINVAL, |
| 202 | }; |
| 203 | if (m_fuzzed_data_provider.ConsumeBool()) { |
| 204 | SetFuzzedErrNo(m_fuzzed_data_provider, wait_errnos); |
| 205 | return false; |
| 206 | } |
| 207 | if (occurred != nullptr) { |
| 208 | *occurred = m_fuzzed_data_provider.ConsumeBool() ? requested : 0; |
| 209 | } |
| 210 | return true; |
| 211 | } |
| 212 | |
| 213 | bool FuzzedSock::IsConnected(std::string& errmsg) const |
| 214 | { |
no test coverage detected