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

via libc-commits libc-commits at lists.llvm.org
Fri Oct 20 06:59:18 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};
----------------
lntue wrote:

So maybe the solution is if the time diff is negative, we can simply try again?

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


More information about the libc-commits mailing list