diff options
author | Jamie Liu <jamieliu@google.com> | 2020-09-18 20:51:56 -0700 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2020-09-18 20:53:55 -0700 |
commit | 916751039cca927a0e64b4e6f776d2d4732cf8d8 (patch) | |
tree | 931f56f01816a74455455ff5a2e3a21ea69bf7f1 /test/syscalls | |
parent | 4ba86e62580756d3f37205bbb09da5125ff04835 (diff) |
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
Diffstat (limited to 'test/syscalls')
-rw-r--r-- | test/syscalls/linux/vdso_clock_gettime.cc | 5 |
1 files changed, 5 insertions, 0 deletions
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<clockid_t> info) { class MonotonicVDSOClockTest : public ::testing::TestWithParam<clockid_t> {}; 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. |