Zero fd_set in select_benchmark

This is fixing a bug that caused the test to fail on ARM64 when running
under Starnix on Fuchsia. https://ci.chromium.org/b/8767565962564011473
is an example failing run.

PiperOrigin-RevId: 573021699
This commit is contained in:
Ghanan Gowripalan
2023-10-12 15:05:54 -07:00
committed by gVisor bot
parent 23c97a4b93
commit da90797f0c
+2
View File
@@ -36,6 +36,8 @@ namespace {
void Setup(int count, std::vector<FileDescriptor>& event_fds, fd_set& read_fds,
int& max_fd) {
max_fd = -1;
FD_ZERO(&read_fds);
for (int i = 0; i < count; ++i) {
FileDescriptor fd = ASSERT_NO_ERRNO_AND_VALUE(NewEventFD());
if (fd.get() > max_fd) {