[libc-commits] [libc] [libc][NFC] Attempt to deflake gettimeofday_test. (PR #69719)

Guillaume Chatelet via libc-commits libc-commits at lists.llvm.org
Fri Oct 20 07:06:13 PDT 2023


================
@@ -15,24 +15,31 @@
 
 namespace cpp = LIBC_NAMESPACE::cpp;
 
+using LIBC_NAMESPACE::testing::tlog;
+
 TEST(LlvmLibcGettimeofday, SmokeTest) {
   using LIBC_NAMESPACE::testing::ErrnoSetterMatcher::Succeeds;
   void *tz = nullptr;
-  timeval tv;
 
   suseconds_t sleep_times[2] = {200, 1000};
----------------
gchatelet wrote:

SGTM it's unlikely that it would step back in time twice in a row for the reasons I invoked. If so, something's fishy for sure. `gettimeofday` is probably based on `RTC` so it's probably `NTP`.

https://github.com/llvm/llvm-project/pull/69719


More information about the libc-commits mailing list