From 6b9ab65163528239c9fbf10053427513513e6ab0 Mon Sep 17 00:00:00 2001 From: Fabricio Voznika Date: Fri, 3 May 2019 09:41:08 -0700 Subject: Skip flaky ClockGettime.CputimeId take 2 The test also times out when GCE machine has 2 CPUs. I cannot repro it locally with a 2 CPU cgroup though. Let's skip the test when there are 2 CPUs to stop the flakiness and retest it once the fix is available. PiperOrigin-RevId: 246523363 Change-Id: I9d9d922a5be3aa7bc91dff5a1807ca99f3f4a4f9 --- test/syscalls/linux/clock_gettime.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/test/syscalls/linux/clock_gettime.cc b/test/syscalls/linux/clock_gettime.cc index 4c8ca1088..335a38d41 100644 --- a/test/syscalls/linux/clock_gettime.cc +++ b/test/syscalls/linux/clock_gettime.cc @@ -56,8 +56,9 @@ void spin_ns(int64_t ns) { // Test that CLOCK_PROCESS_CPUTIME_ID is a superset of CLOCK_THREAD_CPUTIME_ID. TEST(ClockGettime, CputimeId) { // TODO(b/128871825,golang.org/issue/10958): Test times out when there is a - // single core because one goroutine starves the others. - SKIP_IF(std::thread::hardware_concurrency() == 1); + // small number of core because one goroutine starves the others. + printf("CPUS: %d\n", std::thread::hardware_concurrency()); + SKIP_IF(std::thread::hardware_concurrency() <= 2); constexpr int kNumThreads = 13; // arbitrary -- cgit v1.2.3