Only run Futex.clock_source test on Linux platforms
Summary: On Linux platforms the folly::futexWait() functions are implemented using the futex() syscall, which requires passing a timeout parameter that specifies a an expiry time either in CLOCK_REALTIME or CLOCK_MONOTONIC. The futexWait() implementation currently assumes that the std::chrono::system_clock and std::chrono::steady_clock implementations are thin wrappers over these clock types and that we can directly convert the .time_since_epoch() values to a timespec value that we can pass to the futex() syscall. The Futex.clock_source test is checking this assumption about the implementation of the std::chrono clocks. Unfortunately, this assumption does not hold on recent libc++ implementations for Apple platforms, which now uses the CLOCK_UPTIME_RAW clock for the std::chrono::steady_clock implementation and so this test was failing on the Mac platforms. However, since we aren't actually relying on this assumption on platforms other than Linux, we can just disable this test for non-Linux platforms. Reviewed By: yfeldblum Differential Revision: D22075639 fbshipit-source-id: 229995ba7c01b52d1949ef5942774920876d0994
Showing
Please register or sign in to comment