[libc-commits] [libc] [libc][NFC] Attempt to deflake gettimeofday_test. (PR #69719)
Jeff Bailey via libc-commits
libc-commits at lists.llvm.org
Fri Oct 20 07:07:55 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};
----------------
kaladron wrote:
I think maybe we're going about this wrong. It's not our job to test the kernel for accuracy. Probably a single call to make sure that it returns a number is fine (that way we know that our call to the sysall at least works). If syscalls are implemented like https://xkcd.com/221/ then that's not our problem (and we wouldn't want to check that on every environment in which this might be implemented anyway).
WDYT?
https://github.com/llvm/llvm-project/pull/69719
More information about the libc-commits
mailing list