It's a not good enough for your board's performance,
mabye your board need more time scaled to pass CTS.
Following solution is a reference to fix this issue,
Package : android.core.vm-tests-tf
Class : dot.junit.format.f1.JUnit_Test_f1
Method : testVFE1
OS Version : 5.0
Fail issue :
junit.framework.ComparisonFailure: ANDROID_DATA=/data/local/tmp/vm-tests dalvikvm32 -Xmx512M -Xss32K -Djava.io.tmpdir=/data/local/tmp/vm-tests -classpath /data/local/tmp/vm-tests/dot/junit/dexcore.jar:/data/local/tmp/vm-tests/dot/junit/format/f1/Main_testVFE1.jar:/data/local/tmp/vm-tests/dot/junit/format/f1/d/T_f1_1.jar dot.junit.format.f1.Main_testVFE1 expected:<[]> but was:<[dex2oat W 19547 19548 dex2oat did not finish after 60 seconds]>
Src Location : ~/android_src/art/dex2oat.cc
Trace Code :
void Wait() {
bool warning = true;
CHECK_GT(kWatchDogTimeoutSeconds, kWatchDogWarningSeconds);
// TODO: tune the multiplier for GC verification, the following is just to make the timeout large.
int64_t multiplier = kVerifyObjectSupport > kVerifyObjectModeFast ? 100 : 1;
timespec warning_ts;
InitTimeSpec(true, CLOCK_REALTIME, multiplier * kWatchDogWarningSeconds * 1000, 0, &warning_ts);
timespec timeout_ts;
InitTimeSpec(true, CLOCK_REALTIME, multiplier * kWatchDogTimeoutSeconds * 1000, 0, &timeout_ts);
const char* reason = "dex2oat watch dog thread waiting";
CHECK_WATCH_DOG_PTHREAD_CALL(pthread_mutex_lock, (&mutex_), reason);
while (!shutting_down_) {
int rc = TEMP_FAILURE_RETRY(pthread_cond_timedwait(&cond_, &mutex_,
warning ? &warning_ts
: &timeout_ts));
if (rc == ETIMEDOUT) {
std::string message(StringPrintf("dex2oat did not finish after %d seconds",
warning ? kWatchDogWarningSeconds
: kWatchDogTimeoutSeconds));
if (warning) {
Warn(message.c_str());
warning = false;
} else {
Fatal(message.c_str());
}
} else if (rc != 0) {
std::string message(StringPrintf("pthread_cond_timedwait failed: %s",
strerror(errno)));
Fatal(message.c_str());
}
}
CHECK_WATCH_DOG_PTHREAD_CALL(pthread_mutex_unlock, (&mutex_), reason);
}
// When setting timeouts, keep in mind that the build server may not be as fast as your desktop.
// Debug builds are slower so they have larger timeouts.
static const unsigned int kSlowdownFactor = kIsDebugBuild ? 5U : 1U;
#if ART_USE_PORTABLE_COMPILER
// 2 minutes scaled by kSlowdownFactor.
static const unsigned int kWatchDogWarningSeconds = kSlowdownFactor * 2 * 60;
// 30 minutes scaled by kSlowdownFactor.
static const unsigned int kWatchDogTimeoutSeconds = kSlowdownFactor * 30 * 60;
#else
// 1 minutes scaled by kSlowdownFactor. <-- Original bsp value
// static const unsigned int kWatchDogWarningSeconds = kSlowdownFactor * 1 * 60;
// Maybe your board need 3 minutes scaled to pass CTS test, please check your condition with HW
static const unsigned int kWatchDogWarningSeconds = kSlowdownFactor * 3 * 60;
// 6 minutes scaled by kSlowdownFactor.
static const unsigned int kWatchDogTimeoutSeconds = kSlowdownFactor * 6 * 60;
#endif