From 916751039cca927a0e64b4e6f776d2d4732cf8d8 Mon Sep 17 00:00:00 2001 From: Jamie Liu Date: Fri, 18 Sep 2020 20:51:56 -0700 Subject: Disable vdso_clock_gettime on KVM. Unfortunately, I think TSC misalignment means that we can't really expect any consistent correspondence between a TSC-based VDSO and the sentry's view of time on the KVM platform. PiperOrigin-RevId: 332576147 --- test/syscalls/linux/vdso_clock_gettime.cc | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'test/syscalls') diff --git a/test/syscalls/linux/vdso_clock_gettime.cc b/test/syscalls/linux/vdso_clock_gettime.cc index 52b67249d..2a8699a7b 100644 --- a/test/syscalls/linux/vdso_clock_gettime.cc +++ b/test/syscalls/linux/vdso_clock_gettime.cc @@ -48,6 +48,11 @@ std::string PrintClockId(::testing::TestParamInfo info) { class MonotonicVDSOClockTest : public ::testing::TestWithParam {}; TEST_P(MonotonicVDSOClockTest, IsCorrect) { + // The VDSO implementation of clock_gettime() uses the TSC. On KVM, sentry and + // application TSCs can be very desynchronized; see + // sentry/platform/kvm/kvm.vCPU.setSystemTime(). + SKIP_IF(GvisorPlatform() == Platform::kKVM); + // Check that when we alternate readings from the clock_gettime syscall and // the VDSO's implementation, we observe the combined sequence as being // monotonic. -- cgit v1.2.3