From da90797f0cb3446f731236dfcc891c30192b48ca Mon Sep 17 00:00:00 2001 From: Ghanan Gowripalan Date: Thu, 12 Oct 2023 15:01:28 -0700 Subject: [PATCH] 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 --- test/perf/linux/select_benchmark.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/perf/linux/select_benchmark.cc b/test/perf/linux/select_benchmark.cc index 1b2a92ae6..803310d50 100644 --- a/test/perf/linux/select_benchmark.cc +++ b/test/perf/linux/select_benchmark.cc @@ -36,6 +36,8 @@ namespace { void Setup(int count, std::vector& 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) {