From 998fca5795c6f656337c6bccca7ae705e0902df8 Mon Sep 17 00:00:00 2001 From: Xu YiPing Date: Wed, 19 Jun 2019 16:38:33 +0800 Subject: [PATCH] Avoid get same timestamps in log testcase for arm64, userspace get time by vDSO, no syscall overhead. multiple_test_2 sometimes get 2 same timestamps now, then testcase fails. Bug: b/135555666 Test: ./CtsLogdTestCases64 --gtest_filter=*multiple_test* --- logd/tests/logd_test.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/logd/tests/logd_test.cpp b/logd/tests/logd_test.cpp index 447b06731..b6c33d7da 100644 --- a/logd/tests/logd_test.cpp +++ b/logd/tests/logd_test.cpp @@ -952,7 +952,7 @@ static inline uint32_t get4LE(const char* src) { void __android_log_btwrite_multiple__helper(int count) { #ifdef __ANDROID__ log_time ts(CLOCK_MONOTONIC); - + usleep(100); log_time ts1(CLOCK_MONOTONIC); // We fork to create a unique pid for the submitted log messages