Logging improvements
Suppress the authfs atime message even with --debug; it is very noisy. Make sure we capture the VM logs from compilation when the ComposTestCases succeed - sometimes they are useful. Bug: 264496291 Test: atest ComposTestCase#testOdrefreshSpeed Change-Id: Ib65c22b38910bde351858bcdae8506a74e91cd60
This commit is contained in:
parent
77b7dce790
commit
bd6d08aaa4
|
@ -23,7 +23,7 @@ use fuse::filesystem::{
|
||||||
SetattrValid, ZeroCopyReader, ZeroCopyWriter,
|
SetattrValid, ZeroCopyReader, ZeroCopyWriter,
|
||||||
};
|
};
|
||||||
use fuse::sys::OpenOptions as FuseOpenOptions;
|
use fuse::sys::OpenOptions as FuseOpenOptions;
|
||||||
use log::{debug, error, warn};
|
use log::{error, trace, warn};
|
||||||
use std::collections::{btree_map, BTreeMap};
|
use std::collections::{btree_map, BTreeMap};
|
||||||
use std::convert::{TryFrom, TryInto};
|
use std::convert::{TryFrom, TryInto};
|
||||||
use std::ffi::{CStr, CString, OsStr};
|
use std::ffi::{CStr, CString, OsStr};
|
||||||
|
@ -1062,7 +1062,7 @@ fn check_unsupported_setattr_request(valid: SetattrValid) -> io::Result<()> {
|
||||||
| SetattrValid::MTIME
|
| SetattrValid::MTIME
|
||||||
| SetattrValid::MTIME_NOW,
|
| SetattrValid::MTIME_NOW,
|
||||||
) {
|
) {
|
||||||
debug!("Ignoring ctime/atime/mtime change as authfs does not maintain timestamp currently");
|
trace!("Ignoring ctime/atime/mtime change as authfs does not maintain timestamp currently");
|
||||||
}
|
}
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,6 +27,7 @@ import android.platform.test.annotations.RootPermissionTest;
|
||||||
|
|
||||||
import com.android.microdroid.test.host.CommandRunner;
|
import com.android.microdroid.test.host.CommandRunner;
|
||||||
import com.android.microdroid.test.host.MicrodroidHostTestCaseBase;
|
import com.android.microdroid.test.host.MicrodroidHostTestCaseBase;
|
||||||
|
import com.android.tradefed.device.DeviceNotAvailableException;
|
||||||
import com.android.tradefed.log.LogUtil.CLog;
|
import com.android.tradefed.log.LogUtil.CLog;
|
||||||
import com.android.tradefed.result.FileInputStreamSource;
|
import com.android.tradefed.result.FileInputStreamSource;
|
||||||
import com.android.tradefed.result.LogDataType;
|
import com.android.tradefed.result.LogDataType;
|
||||||
|
@ -94,10 +95,7 @@ public final class ComposTestCase extends MicrodroidHostTestCaseBase {
|
||||||
public void tearDown() throws Exception {
|
public void tearDown() throws Exception {
|
||||||
killVmAndReconnectAdb();
|
killVmAndReconnectAdb();
|
||||||
|
|
||||||
archiveLogThenDelete(mTestLogs, getDevice(), COMPOS_APEXDATA_DIR + "/vm_console.log",
|
archiveVmLogsThenDelete("teardown");
|
||||||
"vm_console.log-" + mTestName.getMethodName());
|
|
||||||
archiveLogThenDelete(mTestLogs, getDevice(), COMPOS_APEXDATA_DIR + "/vm.log",
|
|
||||||
"vm.log-" + mTestName.getMethodName());
|
|
||||||
|
|
||||||
CommandRunner android = new CommandRunner(getDevice());
|
CommandRunner android = new CommandRunner(getDevice());
|
||||||
|
|
||||||
|
@ -115,6 +113,19 @@ public final class ComposTestCase extends MicrodroidHostTestCaseBase {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void archiveVmLogsThenDelete(String suffix) throws DeviceNotAvailableException {
|
||||||
|
archiveLogThenDelete(
|
||||||
|
mTestLogs,
|
||||||
|
getDevice(),
|
||||||
|
COMPOS_APEXDATA_DIR + "/vm_console.log",
|
||||||
|
"vm_console.log-" + suffix + "-" + mTestName.getMethodName());
|
||||||
|
archiveLogThenDelete(
|
||||||
|
mTestLogs,
|
||||||
|
getDevice(),
|
||||||
|
COMPOS_APEXDATA_DIR + "/vm.log",
|
||||||
|
"vm.log-" + suffix + "-" + mTestName.getMethodName());
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testOdrefreshSpeed() throws Exception {
|
public void testOdrefreshSpeed() throws Exception {
|
||||||
getDevice().setProperty(SYSTEM_SERVER_COMPILER_FILTER_PROP_NAME, "speed");
|
getDevice().setProperty(SYSTEM_SERVER_COMPILER_FILTER_PROP_NAME, "speed");
|
||||||
|
@ -159,6 +170,10 @@ public final class ComposTestCase extends MicrodroidHostTestCaseBase {
|
||||||
}
|
}
|
||||||
killVmAndReconnectAdb();
|
killVmAndReconnectAdb();
|
||||||
|
|
||||||
|
// These logs are potentially useful, capture them before they are overwritten by
|
||||||
|
// compos_verify.
|
||||||
|
archiveVmLogsThenDelete("compile");
|
||||||
|
|
||||||
// Expect the BCC extracted from the BCC to be well-formed.
|
// Expect the BCC extracted from the BCC to be well-formed.
|
||||||
assertVmBccIsValid();
|
assertVmBccIsValid();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue