[automerger skipped] RESTRICT AUTOMERGE Add crashutils and crashreporter to cts
am: 837c2ecd26 -s ours
am skip reason: subject contains skip directive
Change-Id: I5ba04c6413cb0a39c206d293c6efa32ff54a22e2
diff --git a/common/host-side/tradefed/src/com/android/compatibility/common/tradefed/result/ResultReporter.java b/common/host-side/tradefed/src/com/android/compatibility/common/tradefed/result/ResultReporter.java
index 9d670df..2347577 100644
--- a/common/host-side/tradefed/src/com/android/compatibility/common/tradefed/result/ResultReporter.java
+++ b/common/host-side/tradefed/src/com/android/compatibility/common/tradefed/result/ResultReporter.java
@@ -518,6 +518,15 @@
}
}
+ /**
+ * Returns whether a report creation should be skipped.
+ */
+ protected boolean shouldSkipReportCreation() {
+ // This value is always false here for backwards compatibility.
+ // Extended classes have the option to override this.
+ return false;
+ }
+
private void finalizeResults() {
// Add all device serials into the result to be serialized
for (String deviceSerial : mMasterDeviceSerials) {
@@ -547,6 +556,10 @@
mResult.getModuleCompleteCount(), mResult.getModules().size());
+ if (shouldSkipReportCreation()) {
+ return;
+ }
+
try {
// Zip the full test results directory.
copyDynamicConfigFiles();
@@ -772,7 +785,7 @@
protected File generateResultXmlFile()
throws IOException, XmlPullParserException {
return ResultHandler.writeResults(mBuildHelper.getSuiteName(),
- mBuildHelper.getSuiteVersion(), mBuildHelper.getSuitePlan(),
+ mBuildHelper.getSuiteVersion(), getSuitePlan(mBuildHelper),
mBuildHelper.getSuiteBuild(), mResult, mResultDir, mResult.getStartTime(),
mElapsedTime + mResult.getStartTime(), mReferenceUrl, getLogUrl(),
mBuildHelper.getCommandLineArgs());
@@ -844,6 +857,17 @@
}
/**
+ * Get the suite plan. This protected method was created for overrides.
+ * Extending classes can decide on the content of the output's suite_plan field.
+ *
+ * @param mBuildHelper Helper that contains build information.
+ * @return string Suite plan to use.
+ */
+ protected String getSuitePlan(CompatibilityBuildHelper mBuildHelper) {
+ return mBuildHelper.getSuitePlan();
+ }
+
+ /**
* Return true if this instance is a shard ResultReporter and should propagate
* certain events to the master.
*/
diff --git a/common/host-side/tradefed/src/com/android/compatibility/common/tradefed/targetprep/BusinessLogicPreparer.java b/common/host-side/tradefed/src/com/android/compatibility/common/tradefed/targetprep/BusinessLogicPreparer.java
index e038884..c24b439 100644
--- a/common/host-side/tradefed/src/com/android/compatibility/common/tradefed/targetprep/BusinessLogicPreparer.java
+++ b/common/host-side/tradefed/src/com/android/compatibility/common/tradefed/targetprep/BusinessLogicPreparer.java
@@ -92,8 +92,6 @@
"business_logic_extended_device_info";
private static final String DYNAMIC_CONFIG_CONDITIONAL_TESTS_ENABLED_KEY =
"conditional_business_logic_tests_enabled";
- /* Format used to append the enabled attribute to the serialized business logic string. */
- private static final String ENABLED_ATTRIBUTE_SNIPPET = ", \"%s\":%s }";
@Option(name = "business-logic-url", description = "The URL to use when accessing the " +
"business logic service, parameters not included", mandatory = true)
@@ -120,10 +118,6 @@
"suite invocation if retrieval of business logic fails.")
private boolean mIgnoreFailure = false;
- @Option(name="conditional-business-logic-tests-enabled",
- description="Setting to true will ensure the device specific tests are executed.")
- private boolean mConditionalTestsEnabled = false;
-
@Option(name = "business-logic-connection-time", description = "Amount of time to attempt " +
"connection to the business logic service, in seconds.")
private int mMaxConnectionTime = DEFAULT_CONNECTION_TIME;
@@ -151,7 +145,6 @@
&& System.currentTimeMillis() < (start + (mMaxConnectionTime * 1000))) {
try {
businessLogicString = doPost(baseUrl, requestParams);
- businessLogicString = addRuntimeConfig(businessLogicString, buildInfo);
} catch (IOException e) {
// ignore, re-attempt connection with remaining time
CLog.d("BusinessLogic connection failure message: %s\nRetrying...", e.getMessage());
@@ -331,37 +324,6 @@
}
/**
- * Append runtime configuration attributes to the end of the Json string.
- * Determine if conditional tests should execute and add the value to the serialized business
- * logic settings.
- */
- private String addRuntimeConfig(String businessLogicString, IBuildInfo buildInfo) {
- int indexOfClosingParen = businessLogicString.lastIndexOf("}");
- // Replace the closing paren with th enabled flag and closing paren. ex
- // { "a":4 } -> {"a":4, "enabled":true }
- return businessLogicString.substring(0, indexOfClosingParen) +
- String.format(ENABLED_ATTRIBUTE_SNIPPET,
- BusinessLogicFactory.CONDITIONAL_TESTS_ENABLED,
- shouldExecuteConditionalTests(buildInfo));
- }
-
- /**
- * Execute device specific test if enabled in config or through the command line.
- * Otherwise skip all conditional tests.
- */
- private boolean shouldExecuteConditionalTests(IBuildInfo buildInfo) {
- boolean enabledInConfig = false;
- try {
- String enabledInConfigValue = DynamicConfigFileReader.getValueFromConfig(
- buildInfo, getSuiteName(), DYNAMIC_CONFIG_CONDITIONAL_TESTS_ENABLED_KEY);
- enabledInConfig = Boolean.parseBoolean(enabledInConfigValue);
- } catch (XmlPullParserException | IOException e) {
- CLog.e("Failed to pull business logic features from dynamic config");
- }
- return enabledInConfig || mConditionalTestsEnabled;
- }
-
- /**
* Read the string from the business logic cache, handling the following cases with a null
* return value:
* - The cached file does not exist
diff --git a/common/host-side/tradefed/src/com/android/compatibility/common/tradefed/targetprep/CrashReporter.java b/common/host-side/tradefed/src/com/android/compatibility/common/tradefed/targetprep/CrashReporter.java
deleted file mode 100644
index 51e712b..0000000
--- a/common/host-side/tradefed/src/com/android/compatibility/common/tradefed/targetprep/CrashReporter.java
+++ /dev/null
@@ -1,151 +0,0 @@
-/*
- * Copyright (C) 2019 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.android.compatibility.common.tradefed.targetprep;
-
-import com.android.compatibility.common.util.CrashUtils;
-import com.android.ddmlib.Log.LogLevel;
-import com.android.ddmlib.MultiLineReceiver;
-import com.android.tradefed.build.IBuildInfo;
-import com.android.tradefed.device.BackgroundDeviceAction;
-import com.android.tradefed.device.DeviceNotAvailableException;
-import com.android.tradefed.device.ITestDevice;
-import com.android.tradefed.log.LogUtil.CLog;
-import com.android.tradefed.targetprep.BaseTargetPreparer;
-import com.android.tradefed.targetprep.ITargetCleaner;
-import java.io.BufferedWriter;
-import java.io.File;
-import java.io.FileWriter;
-import java.io.IOException;
-import java.nio.file.Files;
-import java.nio.file.Path;
-import java.nio.file.attribute.PosixFilePermissions;
-import java.util.regex.Matcher;
-import org.json.JSONArray;
-
-/**
- * Starts and kills the crash reporter thread. This thread uploads crash results to devices as they
- * occurring allowing for device side crash analysis.
- */
-public class CrashReporter extends BaseTargetPreparer implements ITargetCleaner {
-
- private BackgroundDeviceAction mBackgroundThread;
-
- /** Uploads the current buffer of Crashes to the phone under the current test name. */
- private static void upload(ITestDevice device, String testname, JSONArray crashes) {
- try {
- if (testname == null) {
- CLog.logAndDisplay(LogLevel.ERROR, "Attempted upload with no test name");
- return;
- }
- device.executeShellCommand(
- String.format("rm -f %s%s", CrashUtils.DEVICE_PATH, CrashUtils.LOCK_FILENAME));
- Path tmpPath = Files.createTempFile(testname, ".txt");
- try {
- Files.setPosixFilePermissions(
- tmpPath, PosixFilePermissions.fromString("rw-r--r--"));
- File reportFile = tmpPath.toFile();
- try (BufferedWriter writer = new BufferedWriter(new FileWriter(reportFile))) {
- writer.write(crashes.toString());
- }
- device.pushFile(reportFile, CrashUtils.DEVICE_PATH + testname);
- } finally {
- Files.deleteIfExists(tmpPath);
- }
- device.executeShellCommand(
- String.format("touch %s%s", CrashUtils.DEVICE_PATH, CrashUtils.LOCK_FILENAME));
- } catch (IOException | RuntimeException | DeviceNotAvailableException e) {
- CLog.logAndDisplay(LogLevel.ERROR, "Upload to device failed");
- CLog.logAndDisplay(LogLevel.ERROR, e.getMessage());
- }
- }
-
- /** {@inheritDoc} */
- @Override
- public void setUp(ITestDevice device, IBuildInfo buildInfo) {
- try {
- device.executeShellCommand("rm -rf " + CrashUtils.DEVICE_PATH);
- device.executeShellCommand("mkdir " + CrashUtils.DEVICE_PATH);
- } catch (DeviceNotAvailableException e) {
- CLog.logAndDisplay(
- LogLevel.ERROR,
- "CrashReporterThread failed to setup storage directory on device");
- CLog.logAndDisplay(LogLevel.ERROR, e.getMessage());
- return;
- }
- mBackgroundThread =
- new BackgroundDeviceAction(
- "logcat",
- "CrashReporter logcat thread",
- device,
- new CrashReporterReceiver(device),
- 0);
- mBackgroundThread.start();
- }
-
- /** {@inheritDoc} */
- @Override
- public void tearDown(ITestDevice device, IBuildInfo buildInfo, Throwable e) {
- if (mBackgroundThread != null) {
- mBackgroundThread.cancel();
- }
- }
-
- /**
- * Scans through lines received, parses out crashes, and stores them into a buffer. When a new
- * test started signal is received the buffered is cleared. When an upload signal is received
- * uploads the current buffer to the phone.
- */
- private class CrashReporterReceiver extends MultiLineReceiver {
-
- private String mTestName;
- private JSONArray mCrashes;
- private StringBuilder mLogcatChunk = new StringBuilder();
- private ITestDevice mDevice;
-
- public CrashReporterReceiver(ITestDevice device) {
- mDevice = device;
- }
-
- private void processLogLine(String line) {
- mLogcatChunk.append(line);
- Matcher m;
- if ((m = CrashUtils.sNewTestPattern.matcher(line)).matches()) {
- mTestName = m.group(1);
- mCrashes = new JSONArray();
- mLogcatChunk.setLength(0);
- } else if (CrashUtils.sEndofCrashPattern.matcher(line).matches()) {
- CrashUtils.addAllCrashes(mLogcatChunk.toString(), mCrashes);
- mLogcatChunk.setLength(0);
- } else if (CrashUtils.sUploadRequestPattern.matcher(line).matches()) {
- upload(mDevice, mTestName, mCrashes);
- }
- }
-
- @Override
- public void processNewLines(String[] lines) {
- if (!isCancelled()) {
- for (String line : lines) {
- processLogLine(line);
- }
- }
- }
-
- @Override
- public boolean isCancelled() {
- return mBackgroundThread == null || mBackgroundThread.isCancelled();
- }
- }
-}
diff --git a/common/host-side/tradefed/src/com/android/compatibility/common/tradefed/targetprep/MediaPreparer.java b/common/host-side/tradefed/src/com/android/compatibility/common/tradefed/targetprep/MediaPreparer.java
index 883c345..67dd528 100644
--- a/common/host-side/tradefed/src/com/android/compatibility/common/tradefed/targetprep/MediaPreparer.java
+++ b/common/host-side/tradefed/src/com/android/compatibility/common/tradefed/targetprep/MediaPreparer.java
@@ -70,6 +70,24 @@
description = "Only push images files to the device")
protected boolean mImagesOnly = false;
+ @Option(name = "push-all",
+ description = "Push everything downloaded to the device,"
+ + " use 'media-folder-name' to specify the destination dir name.")
+ protected boolean mPushAll = false;
+
+ @Option(name = "dynamic-config-module",
+ description = "For a target preparer, the 'module' of the configuration" +
+ " is the test suite.")
+ private String mDynamicConfigModule = "cts";
+
+ @Option(name = "media-folder-name",
+ description = "The name of local directory into which media" +
+ " files will be downloaded, if option 'local-media-path' is not" +
+ " provided. This directory will live inside the temp directory." +
+ " If option 'push-all' is set, this is also the subdirectory name on device" +
+ " where media files are pushed to")
+ private String mMediaFolderName = MEDIA_FOLDER_NAME;
+
/*
* The pathnames of the device's directories that hold media files for the tests.
* These depend on the device's mount point, which is retrieved in the MediaPreparer's run
@@ -77,6 +95,7 @@
*
* These fields are exposed for unit testing
*/
+ protected String mBaseDeviceModuleDir;
protected String mBaseDeviceShortDir;
protected String mBaseDeviceFullDir;
protected String mBaseDeviceImagesDir;
@@ -100,9 +119,6 @@
/* The key used to retrieve the media files URL from the dynamic configuration */
private static final String MEDIA_FILES_URL_KEY = "media_files_url";
- /* For a target preparer, the "module" of the configuration is the test suite */
- private static final String DYNAMIC_CONFIG_MODULE = "cts";
-
/*
* Info used to install and uninstall the MediaPreparerApp
*/
@@ -164,6 +180,10 @@
return new File(System.getProperty("java.io.tmpdir"), MEDIA_FOLDER_NAME);
}
+ protected File getMediaDir() {
+ return new File(System.getProperty("java.io.tmpdir"), mMediaFolderName);
+ }
+
/*
* Returns true if all necessary media files exist on the device, and false otherwise.
*
@@ -171,7 +191,9 @@
*/
protected boolean mediaFilesExistOnDevice(ITestDevice device)
throws DeviceNotAvailableException {
- if (!mImagesOnly) {
+ if (mPushAll) {
+ return device.doesFileExist(mBaseDeviceModuleDir);
+ } else if (!mImagesOnly) {
for (Resolution resolution : RESOLUTIONS) {
if (resolution.width > mMaxRes.width) {
break; // no need to check for resolutions greater than this
@@ -210,14 +232,14 @@
/*
* Copies the media files to the host from a predefined URL.
*
- * Synchronize this static method so that multiple shards won't download/extract
+ * Synchronize this method so that multiple shards won't download/extract
* this file to the same location on the host. Only an issue in Android O and above,
* where MediaPreparer is used for multiple, shardable modules.
*/
- private static synchronized File downloadMediaToHost(ITestDevice device, IBuildInfo buildInfo)
+ private synchronized File downloadMediaToHost(ITestDevice device, IBuildInfo buildInfo)
throws TargetSetupError {
// Retrieve default directory for storing media files
- File mediaFolder = getDefaultMediaDir();
+ File mediaFolder = getMediaDir();
if (mediaFolder.exists() && mediaFolder.list().length > 0) {
// Folder has already been created and populated by previous MediaPreparer runs,
// assume all necessary media files exist inside.
@@ -228,7 +250,7 @@
try {
// Get download URL from dynamic configuration service
String mediaUrlString = DynamicConfigFileReader.getValueFromConfig(
- buildInfo, DYNAMIC_CONFIG_MODULE, MEDIA_FILES_URL_KEY);
+ buildInfo, mDynamicConfigModule, MEDIA_FILES_URL_KEY);
url = new URL(mediaUrlString);
} catch (IOException | XmlPullParserException e) {
throw new TargetSetupError("Trouble finding media file download location with " +
@@ -247,7 +269,7 @@
} catch (IOException e) {
FileUtil.recursiveDelete(mediaFolder);
throw new TargetSetupError("Failed to download and open media files on host, the"
- + " device requires these media files for CTS media tests", e,
+ + " device requires these media files for compatibility tests", e,
device.getDeviceDescriptor());
} finally {
FileUtil.deleteFile(mediaFolderZip);
@@ -265,6 +287,10 @@
* This method is exposed for unit testing.
*/
protected void copyMediaFiles(ITestDevice device) throws DeviceNotAvailableException {
+ if (mPushAll) {
+ copyAll(device);
+ return;
+ }
if (!mImagesOnly) {
copyVideoFiles(device);
}
@@ -307,9 +333,18 @@
}
}
+ // copy everything from the host directory to the device
+ protected void copyAll(ITestDevice device) throws DeviceNotAvailableException {
+ if (!device.doesFileExist(mBaseDeviceModuleDir)) {
+ logInfo("Copying files to device");
+ device.pushDir(new File(mLocalMediaPath), mBaseDeviceModuleDir);
+ }
+ }
+
// Initialize directory strings where media files live on device
protected void setMountPoint(ITestDevice device) {
String mountPoint = device.getMountPoint(IDevice.MNT_EXTERNAL_STORAGE);
+ mBaseDeviceModuleDir = String.format("%s/test/%s/", mountPoint, mMediaFolderName);
mBaseDeviceShortDir = String.format("%s/test/bbb_short/", mountPoint);
mBaseDeviceFullDir = String.format("%s/test/bbb_full/", mountPoint);
mBaseDeviceImagesDir = String.format("%s/test/images/", mountPoint);
@@ -318,14 +353,17 @@
@Override
public void run(ITestDevice device, IBuildInfo buildInfo) throws TargetSetupError,
BuildError, DeviceNotAvailableException {
-
+ if (mImagesOnly && mPushAll) {
+ throw new TargetSetupError(
+ "'images-only' and 'push-all' cannot be set to true together.");
+ }
if (mSkipMediaDownload) {
logInfo("Skipping media preparation");
return; // skip this precondition
}
if (!mMediaDownloadOnly) {
setMountPoint(device);
- if (!mImagesOnly) {
+ if (!mImagesOnly && !mPushAll) {
setMaxRes(device, buildInfo); // max resolution only applies to video files
}
if (mediaFilesExistOnDevice(device)) {
diff --git a/common/host-side/tradefed/src/com/android/compatibility/common/tradefed/testtype/BusinessLogicConditionalHostTestBase.java b/common/host-side/tradefed/src/com/android/compatibility/common/tradefed/testtype/BusinessLogicConditionalHostTestBase.java
deleted file mode 100644
index 1bee3a3..0000000
--- a/common/host-side/tradefed/src/com/android/compatibility/common/tradefed/testtype/BusinessLogicConditionalHostTestBase.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * Copyright (C) 2017 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.android.compatibility.common.tradefed.testtype;
-
-import org.junit.Before;
-
-/**
- * Host-side base class for tests leveraging the Business Logic service.
- */
-public class BusinessLogicConditionalHostTestBase extends BusinessLogicHostTestBase {
-
- @Override
- @Before
- public void handleBusinessLogic() {
- super.loadBusinessLogic();
- ensureAuthenticated();
- super.executeBusinessLogic();
- }
-
- protected void ensureAuthenticated() {
- if (!mCanReadBusinessLogic) {
- // super class handles the condition that the service is unavailable.
- return;
- }
-
- if (!mBusinessLogic.mConditionalTestsEnabled) {
- skipTest("Execution of device specific tests is not enabled. "
- + "Enable with '--conditional-business-logic-tests-enabled'");
- }
-
- if (mBusinessLogic.isAuthorized()) {
- // Run test as normal.
- return;
- }
- String message = mBusinessLogic.getAuthenticationStatusMessage();
-
- // Fail test since request was not authorized.
- failTest(String.format("Unable to execute because %s.", message));
- }
-
-}
diff --git a/common/host-side/tradefed/src/com/android/compatibility/common/tradefed/util/OptionHelper.java b/common/host-side/tradefed/src/com/android/compatibility/common/tradefed/util/OptionHelper.java
index 8847f92..3c221dd 100644
--- a/common/host-side/tradefed/src/com/android/compatibility/common/tradefed/util/OptionHelper.java
+++ b/common/host-side/tradefed/src/com/android/compatibility/common/tradefed/util/OptionHelper.java
@@ -118,10 +118,15 @@
while (matcher.find()) {
String optionInput = cleanNameValueDelimiter(matcher.group());
// split between the option name and value
- String[] keyNameTokens = optionInput.split(" ", 2);
+ String[] keyNameTokens = optionInput.split("[ =]", 2);
// remove initial hyphens and any starting double quote from option args
String keyName = keyNameTokens[0].replaceFirst("^\"?--?", "");
+ // Convert "option=value a b" back into option="value a b"
+ if (optionInput.charAt(0) == '"') {
+ optionInput = keyNameTokens[0].substring(1) + " \"" + keyNameTokens[1];
+ }
+
// add substrings only when the options are recognized
if (optionShortNames.contains(keyName) || optionNames.contains(keyName)) {
// add values separated by spaces or in quotes separately to the return array
diff --git a/common/host-side/tradefed/tests/src/com/android/compatibility/common/tradefed/targetprep/MediaPreparerTest.java b/common/host-side/tradefed/tests/src/com/android/compatibility/common/tradefed/targetprep/MediaPreparerTest.java
index 015ec2a..005ca43 100644
--- a/common/host-side/tradefed/tests/src/com/android/compatibility/common/tradefed/targetprep/MediaPreparerTest.java
+++ b/common/host-side/tradefed/tests/src/com/android/compatibility/common/tradefed/targetprep/MediaPreparerTest.java
@@ -21,6 +21,7 @@
import com.android.tradefed.build.IBuildInfo;
import com.android.tradefed.config.OptionSetter;
import com.android.tradefed.device.ITestDevice;
+import com.android.tradefed.targetprep.TargetSetupError;
import junit.framework.TestCase;
@@ -51,11 +52,31 @@
assertEquals(mMediaPreparer.mBaseDeviceFullDir, "/sdcard/test/bbb_full/");
}
+ public void testDefaultModuleDirMountPoint() throws Exception {
+ EasyMock.expect(mMockDevice.getMountPoint(IDevice.MNT_EXTERNAL_STORAGE)).andReturn(
+ "/sdcard").once();
+ EasyMock.replay(mMockDevice);
+ mMediaPreparer.setMountPoint(mMockDevice);
+ assertEquals(mMediaPreparer.mBaseDeviceModuleDir, "/sdcard/test/android-cts-media/");
+ assertEquals(mMediaPreparer.getMediaDir().getName(), "android-cts-media");
+ }
+
+ public void testSetModuleDirMountPoint() throws Exception {
+ mOptionSetter.setOptionValue("media-folder-name", "unittest");
+ EasyMock.expect(mMockDevice.getMountPoint(IDevice.MNT_EXTERNAL_STORAGE)).andReturn(
+ "/sdcard").once();
+ EasyMock.replay(mMockDevice);
+ mMediaPreparer.setMountPoint(mMockDevice);
+ assertEquals(mMediaPreparer.mBaseDeviceModuleDir, "/sdcard/test/unittest/");
+ assertEquals(mMediaPreparer.getMediaDir().getName(), "unittest");
+ }
+
public void testCopyMediaFiles() throws Exception {
mMediaPreparer.mMaxRes = MediaPreparer.DEFAULT_MAX_RESOLUTION;
mMediaPreparer.mBaseDeviceShortDir = "/sdcard/test/bbb_short/";
mMediaPreparer.mBaseDeviceFullDir = "/sdcard/test/bbb_full/";
mMediaPreparer.mBaseDeviceImagesDir = "/sdcard/test/images";
+ mMediaPreparer.mBaseDeviceModuleDir = "/sdcard/test/android-cts-media/";
for (MediaPreparer.Resolution resolution : MediaPreparer.RESOLUTIONS) {
String shortFile = String.format("%s%s", mMediaPreparer.mBaseDeviceShortDir,
resolution.toString());
@@ -66,6 +87,8 @@
}
EasyMock.expect(mMockDevice.doesFileExist(mMediaPreparer.mBaseDeviceImagesDir))
.andReturn(true).anyTimes();
+ EasyMock.expect(mMockDevice.doesFileExist(mMediaPreparer.mBaseDeviceModuleDir))
+ .andReturn(false).anyTimes();
EasyMock.replay(mMockDevice);
mMediaPreparer.copyMediaFiles(mMockDevice);
}
@@ -89,6 +112,15 @@
assertTrue(mMediaPreparer.mediaFilesExistOnDevice(mMockDevice));
}
+ public void testMediaFilesExistOnDeviceTrueWithPushAll() throws Exception {
+ mOptionSetter.setOptionValue("push-all", "true");
+ mMediaPreparer.mBaseDeviceModuleDir = "/sdcard/test/android-cts-media/";
+ EasyMock.expect(mMockDevice.doesFileExist(mMediaPreparer.mBaseDeviceModuleDir))
+ .andReturn(true).anyTimes();
+ EasyMock.replay(mMockDevice);
+ assertTrue(mMediaPreparer.mediaFilesExistOnDevice(mMockDevice));
+ }
+
public void testMediaFilesExistOnDeviceFalse() throws Exception {
mMediaPreparer.mMaxRes = MediaPreparer.DEFAULT_MAX_RESOLUTION;
mMediaPreparer.mBaseDeviceShortDir = "/sdcard/test/bbb_short/";
@@ -104,4 +136,35 @@
mMediaPreparer.run(mMockDevice, mMockBuildInfo);
}
+ public void testPushAll() throws Exception {
+ mOptionSetter.setOptionValue("push-all", "true");
+ mOptionSetter.setOptionValue("media-folder-name", "unittest");
+ mMediaPreparer.mBaseDeviceModuleDir = "/sdcard/test/unittest/";
+ mMediaPreparer.mBaseDeviceShortDir = "/sdcard/test/bbb_short/";
+ mMediaPreparer.mBaseDeviceFullDir = "/sdcard/test/bbb_full/";
+ mMediaPreparer.mBaseDeviceImagesDir = "/sdcard/test/images";
+ EasyMock.expect(mMockDevice.doesFileExist(mMediaPreparer.mBaseDeviceModuleDir))
+ .andReturn(true).anyTimes();
+ EasyMock.expect(mMockDevice.doesFileExist(mMediaPreparer.mBaseDeviceImagesDir))
+ .andReturn(false).anyTimes();
+ EasyMock.expect(mMockDevice.doesFileExist(mMediaPreparer.mBaseDeviceShortDir))
+ .andReturn(false).anyTimes();
+ EasyMock.expect(mMockDevice.doesFileExist(mMediaPreparer.mBaseDeviceFullDir))
+ .andReturn(false).anyTimes();
+ EasyMock.replay(mMockDevice);
+ mMediaPreparer.copyMediaFiles(mMockDevice);
+ }
+
+ public void testWithBothPushAllAndImagesOnly() throws Exception {
+ mOptionSetter.setOptionValue("push-all", "true");
+ mOptionSetter.setOptionValue("images-only", "true");
+ EasyMock.replay(mMockDevice);
+ try {
+ mMediaPreparer.run(mMockDevice, mMockBuildInfo);
+ fail("TargetSetupError expected");
+ } catch (TargetSetupError e) {
+ // Expected
+ }
+ }
+
}
diff --git a/common/host-side/tradefed/tests/src/com/android/compatibility/common/tradefed/util/OptionHelperTest.java b/common/host-side/tradefed/tests/src/com/android/compatibility/common/tradefed/util/OptionHelperTest.java
index dde28de..a4344b0 100644
--- a/common/host-side/tradefed/tests/src/com/android/compatibility/common/tradefed/util/OptionHelperTest.java
+++ b/common/host-side/tradefed/tests/src/com/android/compatibility/common/tradefed/util/OptionHelperTest.java
@@ -87,7 +87,7 @@
"--" + TEST_LOGPATH, "path/to/log-directory/");
List<String> validQuoteSubset = Arrays.asList("-" + TEST_CLASS_SHORTNAME, fakeTestClass,
- "--" + TEST_NAME + " " + fakeTestMethod, "--" + TEST_FILTER, fakeTestClass + " "
+ "--" + TEST_NAME, fakeTestMethod, "--" + TEST_FILTER, fakeTestClass + " "
+ fakeTestMethod);
String[] inputArray = {"foocts ", "-", TEST_CLASS_SHORTNAME, " ", fakeTestClass, " \"--",
TEST_NAME, "=", fakeTestMethod, "\" -z \"FAKE1 FAKE2\" --", TEST_FILTER, " \"",
@@ -107,4 +107,14 @@
OptionHelper.getValidCliArgs(inputString, this));
}
+ public void testGetValidCliArgs_surroundingQuotes() throws Exception {
+ List<String> expectedTokens = Arrays.asList("--" + TEST_FILTER, "a b c");
+ String[] inputArray = {"\"--", TEST_FILTER, "=a b c\""};
+ String inputString = String.join("", inputArray);
+
+ assertEquals("Expected matching arrays", expectedTokens,
+ OptionHelper.getValidCliArgs(inputString, this));
+
+ }
+
}
diff --git a/common/host-side/util/src/com/android/compatibility/common/util/FeatureUtil.java b/common/host-side/util/src/com/android/compatibility/common/util/FeatureUtil.java
index 87d257a..df772a2 100644
--- a/common/host-side/util/src/com/android/compatibility/common/util/FeatureUtil.java
+++ b/common/host-side/util/src/com/android/compatibility/common/util/FeatureUtil.java
@@ -27,6 +27,7 @@
*/
public class FeatureUtil {
+ public static final String AUTOMOTIVE_FEATURE = "android.hardware.type.automotive";
public static final String LEANBACK_FEATURE = "android.software.leanback";
public static final String LOW_RAM_FEATURE = "android.hardware.ram.low";
public static final String TELEPHONY_FEATURE = "android.hardware.telephony";
@@ -83,6 +84,11 @@
return hasSystemFeature(device, WATCH_FEATURE);
}
+ /** Returns true if the device has feature AUTOMOTIVE_FEATURE */
+ public static boolean isAutomotive(ITestDevice device) throws DeviceNotAvailableException {
+ return hasSystemFeature(device, AUTOMOTIVE_FEATURE);
+ }
+
/** Returns true if the device is a low ram device:
* 1. API level >= O
* 2. device has feature LOW_RAM_FEATURE
diff --git a/common/host-side/util/src/com/android/compatibility/common/util/PropertyUtil.java b/common/host-side/util/src/com/android/compatibility/common/util/PropertyUtil.java
index 5c6cc71..ab6dac8 100644
--- a/common/host-side/util/src/com/android/compatibility/common/util/PropertyUtil.java
+++ b/common/host-side/util/src/com/android/compatibility/common/util/PropertyUtil.java
@@ -47,12 +47,6 @@
return propertyEquals(device, BUILD_TYPE_PROPERTY, "user");
}
- /** Returns whether the device build is the factory ROM */
- public static boolean isFactoryROM(ITestDevice device) throws DeviceNotAvailableException {
- // first API level property should be undefined if and only if the product is factory ROM.
- return device.getProperty(FIRST_API_LEVEL) == null;
- }
-
/** Returns whether this build is built with dev-keys */
public static boolean isDevKeysBuild(ITestDevice device) throws DeviceNotAvailableException {
String buildTags = device.getProperty(BUILD_TAGS_PROPERTY);
diff --git a/common/util/src/com/android/compatibility/common/util/CrashUtils.java b/common/util/src/com/android/compatibility/common/util/CrashUtils.java
deleted file mode 100644
index e058df4..0000000
--- a/common/util/src/com/android/compatibility/common/util/CrashUtils.java
+++ /dev/null
@@ -1,154 +0,0 @@
-/*
- * Copyright (C) 2019 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.android.compatibility.common.util;
-
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-import org.json.JSONArray;
-import org.json.JSONException;
-import org.json.JSONObject;
-
-/** Contains helper functions and shared constants for crash parsing. */
-public class CrashUtils {
-
- public static final long MIN_CRASH_ADDR = 32768;
- // Matches the end of a crash
- public static final Pattern sEndofCrashPattern =
- Pattern.compile(".*DEBUG\\s+:\\s+backtrace:.*");
- public static final String DEVICE_PATH = "/data/local/tmp/CrashParserResults/";
- public static final String LOCK_FILENAME = "lockFile.loc";
- public static final String UPLOAD_REQUEST = "Please upload a result file to stagefright";
- public static final Pattern sUploadRequestPattern =
- Pattern.compile(".*" + UPLOAD_REQUEST + ".*");
- public static final String NEW_TEST_ALERT = "New test starting with name: ";
- public static final Pattern sNewTestPattern =
- Pattern.compile(".*" + NEW_TEST_ALERT + "(\\w+)\\(.*\\).*");
- public static final String SIGNAL = "signal",
- NAME = "name",
- PID = "pid",
- TID = "tid",
- FAULT_ADDRESS = "faultaddress";
- // Matches the smallest blob that has the appropriate header and footer
- private static final Pattern sCrashBlobPattern =
- Pattern.compile("DEBUG\\s+:( [*]{3})+.*?DEBUG\\s+:\\s+backtrace:", Pattern.DOTALL);
- // Matches process id and name line and captures them
- private static final Pattern sPidtidNamePattern =
- Pattern.compile("pid: (\\d+), tid: (\\d+), name: ([^\\s]+\\s+)*>>> (.*) <<<");
- // Matches fault address and signal type line
- private static final Pattern sFaultLinePattern =
- Pattern.compile(
- "\\w+ \\d+ \\((.*)\\), code -*\\d+ \\(.*\\), fault addr "
- + "(?:0x(\\p{XDigit}+)|-+)");
- // Matches the abort message line if it contains CHECK_
- private static Pattern sAbortMessageCheckPattern =
- Pattern.compile("(?i)Abort message.*CHECK_.*");
-
- /**
- * Determines if the given input has a {@link com.android.compatibility.common.util.Crash} that
- * should fail an sts test
- *
- * @param processNames list of applicable process names
- * @param checkMinAddr if the minimum fault address should be respected
- * @param crashes list of crashes to check
- * @return if a crash is serious enough to fail an sts test
- */
- public static boolean detectCrash(
- String[] processNames, boolean checkMinAddr, JSONArray crashes) {
- for (int i = 0; i < crashes.length(); i++) {
- try {
- JSONObject crash = crashes.getJSONObject(i);
- if (!crash.getString(SIGNAL).toLowerCase().matches("sig(segv|bus)")) {
- continue;
- }
-
- if (checkMinAddr && !crash.isNull(FAULT_ADDRESS)) {
- if (crash.getLong(FAULT_ADDRESS) < MIN_CRASH_ADDR) {
- continue;
- }
- }
-
- boolean foundProcess = false;
- String name = crash.getString(NAME);
- for (String process : processNames) {
- if (name.equals(process)) {
- foundProcess = true;
- break;
- }
- }
-
- if (!foundProcess) {
- continue;
- }
-
- return true; // crash detected
- } catch (JSONException | NullPointerException e) {
- }
- }
-
- return false;
- }
-
- /** Adds all crashes found in the input as JSONObjects to the given JSONArray */
- public static JSONArray addAllCrashes(String input, JSONArray crashes) {
- Matcher crashBlobFinder = sCrashBlobPattern.matcher(input);
- while (crashBlobFinder.find()) {
- String crashStr = crashBlobFinder.group(0);
- int tid = 0, pid = 0;
- Long faultAddress = null;
- String name = null, signal = null;
-
- Matcher pidtidNameMatcher = sPidtidNamePattern.matcher(crashStr);
- if (pidtidNameMatcher.find()) {
- try {
- pid = Integer.parseInt(pidtidNameMatcher.group(1));
- } catch (NumberFormatException e) {
- }
- try {
- tid = Integer.parseInt(pidtidNameMatcher.group(2));
- } catch (NumberFormatException e) {
- }
- name = pidtidNameMatcher.group(3).trim();
- }
-
- Matcher faultLineMatcher = sFaultLinePattern.matcher(crashStr);
- if (faultLineMatcher.find()) {
- signal = faultLineMatcher.group(1);
- String faultAddrMatch = faultLineMatcher.group(2);
- if (faultAddrMatch != null) {
- try {
- faultAddress = Long.parseLong(faultAddrMatch, 16);
- } catch (NumberFormatException e) {
- }
- }
- }
- if (!sAbortMessageCheckPattern.matcher(crashStr).find()) {
- try {
- JSONObject crash = new JSONObject();
- crash.put(PID, pid);
- crash.put(TID, tid);
- crash.put(NAME, name);
- crash.put(FAULT_ADDRESS, faultAddress);
- crash.put(SIGNAL, signal);
- crashes.put(crash);
- } catch (JSONException e) {
-
- }
- }
- }
- return crashes;
- }
-}
diff --git a/common/util/tests/assets/logcat.txt b/common/util/tests/assets/logcat.txt
deleted file mode 100644
index ad778c7..0000000
--- a/common/util/tests/assets/logcat.txt
+++ /dev/null
@@ -1,274 +0,0 @@
---------- beginning of system
-09-03 17:47:59.490 7039 7054 D AtCkpdCmdHandler: De-queing command
---------- beginning of crash
-09-03 17:48:05.627 11071 11189 F libc : Fatal signal 11 (SIGSEGV), code 1, fault addr 0xe9380000 in tid 11189 (AudioOut_D)
-09-03 17:48:05.707 359 359 W : debuggerd: handling request: pid=11071 uid=1041 gid=1005 tid=11189
-09-03 17:48:05.796 7072 7072 F DEBUG : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
-09-03 17:48:05.796 7072 7072 F DEBUG : Build fingerprint: 'google/angler/angler:7.1.1/N4F26T/3687331:userdebug/dev-keys'
-09-03 17:48:05.796 7072 7072 F DEBUG : Revision: '0'
-09-03 17:48:05.796 7072 7072 F DEBUG : ABI: 'arm'
-09-03 17:48:05.796 7072 7072 F DEBUG : pid: 11071, tid: 11189, name: AudioOut_D >>> /system/bin/audioserver <<<
-09-03 17:48:05.797 7072 7072 F DEBUG : signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0xe9380000
-09-03 17:48:05.797 7072 7072 F DEBUG : r0 e9e7a240 r1 e9380000 r2 00000170 r3 00000000
-09-03 17:48:05.797 7072 7072 F DEBUG : r4 00000002 r5 00000000 r6 ec1e1f25 r7 eb6f8000
-09-03 17:48:05.797 7072 7072 F DEBUG : r8 00000000 r9 eb105204 sl 00000000 fp 000003c0
-09-03 17:48:05.797 7072 7072 F DEBUG : ip ebd3df18 sp eaf80688 lr ec1e1f41 pc ebd38dd6 cpsr 20000030
-09-03 17:48:05.805 7072 7072 F DEBUG :
-09-03 17:48:05.805 7072 7072 F DEBUG : backtrace:
-09-03 17:48:05.806 7072 7072 F DEBUG : #00 pc 00002dd6 /system/lib/libaudioutils.so (memcpy_to_float_from_i16+5)
-09-03 17:48:05.806 7072 7072 F DEBUG : #01 pc 00040f3d /system/lib/libaudioflinger.so
-09-03 17:48:05.806 7072 7072 F DEBUG : #02 pc 00040799 /system/lib/libaudioflinger.so
-09-03 17:48:05.806 7072 7072 F DEBUG : #03 pc 00011178 /system/lib/libaudioflinger.so
-09-03 17:48:05.806 7072 7072 F DEBUG : #04 pc 0003180b /system/lib/libaudioflinger.so
-09-03 17:48:05.806 7072 7072 F DEBUG : #05 pc 0002fe57 /system/lib/libaudioflinger.so
-09-03 17:48:05.806 7072 7072 F DEBUG : #06 pc 0000e345 /system/lib/libutils.so (_ZN7android6Thread11_threadLoopEPv+140)
-09-03 17:48:05.806 7072 7072 F DEBUG : #07 pc 000470b3 /system/lib/libc.so (_ZL15__pthread_startPv+22)
-09-03 17:48:05.806 7072 7072 F DEBUG : #08 pc 00019e3d /system/lib/libc.so (__start_thread+6)
-09-03 17:48:05.967 11272 11568 W NativeCrashListener: Couldn't find ProcessRecord for pid 11071
-09-03 17:48:05.969 359 359 W : debuggerd: resuming target 11071
-09-03 17:48:05.981 11272 11307 I BootReceiver: Copying /data/tombstones/tombstone_01 to DropBox (SYSTEM_TOMBSTONE)
-09-03 17:48:06.067 394 394 I ServiceManager: service 'media.sound_trigger_hw' died
-06-15 19:57:33.607 12736 12761 D PermissionCache: checking android.permission.MODIFY_AUDIO_SETTINGS for uid=10197 => granted (698 us)
---------- beginning of crash
-06-15 19:57:33.607 12736 12761 F libc : Fatal signal 11 (SIGSEGV), code 1, fault addr 0x0 in tid 12761 (Binder:12736_2)
-06-15 19:57:33.608 379 379 W : debuggerd: handling request: pid=12736 uid=1041 gid=1005 tid=12761
-06-15 19:57:33.670 26192 26192 F DEBUG : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
-06-15 19:57:33.670 26192 26192 F DEBUG : Build fingerprint: 'google/bullhead/bullhead:7.1.2/N2G48C/4104010:userdebug/dev-keys'
-06-15 19:57:33.670 26192 26192 F DEBUG : Revision: 'rev_1.0'
-06-15 19:57:33.670 26192 26192 F DEBUG : ABI: 'arm'
-06-15 19:57:33.670 26192 26192 F DEBUG : pid: 12736, tid: 12761, name: Binder:12736_2 >>> /system/bin/audioserver <<<
-06-15 19:57:33.670 26192 26192 F DEBUG : signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0
-06-15 19:57:33.670 26192 26192 F DEBUG : r0 00000000 r1 00000000 r2 0000005f r3 00000000
-06-15 19:57:33.670 26192 26192 F DEBUG : r4 ffffffff r5 00000000 r6 f14f9000 r7 00000001
-06-15 19:57:33.670 26192 26192 F DEBUG : r8 00000004 r9 f3353114 sl f3313900 fp 00000000
-06-15 19:57:33.670 26192 26192 F DEBUG : ip f3bd4d88 sp f127d9c8 lr f3b9cbc5 pc f3b65af4 cpsr 60000030
-06-15 19:57:33.676 26192 26192 F DEBUG :
-06-15 19:57:33.676 26192 26192 F DEBUG : backtrace:
-06-15 19:57:33.677 26192 26192 F DEBUG : #00 pc 00018af4 /system/lib/libc.so (strlen+71)
-06-15 19:57:33.677 26192 26192 F DEBUG : #01 pc 0004fbc1 /system/lib/libc.so (__strlen_chk+4)
-06-15 19:57:33.677 26192 26192 F DEBUG : #02 pc 0000c599 /system/lib/libutils.so (_ZN7android7String8C2EPKc+12)
-06-15 19:57:33.677 26192 26192 F DEBUG : #03 pc 0002fdbf /system/lib/libaudiopolicymanagerdefault.so (_ZNK7android18HwModuleCollection19getDeviceDescriptorEjPKcS2_b+458)
-06-15 19:57:33.677 26192 26192 F DEBUG : #04 pc 0001de47 /system/lib/libaudiopolicymanagerdefault.so (_ZN7android18AudioPolicyManager27setDeviceConnectionStateIntEj24audio_policy_dev_state_tPKcS3_+178)
-06-15 19:57:33.677 26192 26192 F DEBUG : #05 pc 0000a009 /system/lib/libaudiopolicyservice.so
-06-15 19:57:33.677 26192 26192 F DEBUG : #06 pc 000a01a5 /system/lib/libmedia.so (_ZN7android20BnAudioPolicyService10onTransactEjRKNS_6ParcelEPS1_j+1256)
-06-15 19:57:33.677 26192 26192 F DEBUG : #07 pc 000359c3 /system/lib/libbinder.so (_ZN7android7BBinder8transactEjRKNS_6ParcelEPS1_j+70)
-06-15 19:57:33.677 26192 26192 F DEBUG : #08 pc 0003d1bb /system/lib/libbinder.so (_ZN7android14IPCThreadState14executeCommandEi+702)
-06-15 19:57:33.677 26192 26192 F DEBUG : #09 pc 0003ce07 /system/lib/libbinder.so (_ZN7android14IPCThreadState20getAndExecuteCommandEv+114)
-06-15 19:57:33.677 26192 26192 F DEBUG : #10 pc 0003d31b /system/lib/libbinder.so (_ZN7android14IPCThreadState14joinThreadPoolEb+46)
-06-15 19:57:33.678 26192 26192 F DEBUG : #11 pc 0004f8c5 /system/lib/libbinder.so
-06-15 19:57:33.678 26192 26192 F DEBUG : #12 pc 0000e345 /system/lib/libutils.so (_ZN7android6Thread11_threadLoopEPv+140)
-06-15 19:57:33.678 26192 26192 F DEBUG : #13 pc 000470b3 /system/lib/libc.so (_ZL15__pthread_startPv+22)
-06-15 19:57:33.678 26192 26192 F DEBUG : #14 pc 00019e3d /system/lib/libc.so (__start_thread+6)
-06-15 19:57:33.839 934 2991 W NativeCrashListener: Couldn't find ProcessRecord for pid 12736
-06-15 19:57:33.846 934 952 I BootReceiver: Copying /data/tombstones/tombstone_01 to DropBox (SYSTEM_TOMBSTONE)
-06-15 19:57:35.130 26201 26227 F libc : Fatal signal 11 (SIGSEGV), code 1, fault addr 0x0 in tid 26227 (Binder:26201_3)
-06-15 19:57:35.130 26201 26228 D PermissionCache: checking android.permission.MODIFY_AUDIO_SETTINGS for uid=1000 => granted (318 us)
-06-15 19:57:35.130 379 379 W : debuggerd: handling request: pid=26201 uid=1041 gid=1005 tid=26227
-06-15 19:57:35.131 26201 26212 D audio_hw_primary: select_devices: changing use case low-latency-playback output device from(0: none, acdb -1) to (2: speaker, acdb 14)
-06-15 19:57:35.191 26230 26230 F DEBUG : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
-06-15 19:57:35.191 26230 26230 F DEBUG : Build fingerprint: 'google/bullhead/bullhead:7.1.2/N2G48C/4104010:userdebug/dev-keys'
-06-15 19:57:35.191 26230 26230 F DEBUG : Revision: 'rev_1.0'
-06-15 19:57:35.191 26230 26230 F DEBUG : ABI: 'arm'
-06-15 19:57:35.191 26230 26230 F DEBUG : pid: 26201, tid: 26227, name: Binder:26201_3 >>> /system/bin/audioserver <<<
-06-15 19:57:35.191 26230 26230 F DEBUG : signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0
-06-15 19:57:35.191 26230 26230 F DEBUG : r0 00000000 r1 00000000 r2 0000005f r3 00000000
-06-15 19:57:35.191 26230 26230 F DEBUG : r4 ffffffff r5 00000000 r6 e49bb000 r7 00000001
-06-15 19:57:35.191 26230 26230 F DEBUG : r8 00000004 r9 e6b53114 sl e6b13900 fp 00000000
-06-15 19:57:35.191 26230 26230 F DEBUG : ip e746bd88 sp e4c009c8 lr e7433bc5 pc e73fcaf4 cpsr 60000030
-06-15 19:57:35.195 26230 26230 F DEBUG :
-06-15 19:57:35.195 26230 26230 F DEBUG : backtrace:
-06-15 19:57:35.195 26230 26230 F DEBUG : #00 pc 00018af4 /system/lib/libc.so (strlen+71)
-06-15 19:57:35.195 26230 26230 F DEBUG : #01 pc 0004fbc1 /system/lib/libc.so (__strlen_chk+4)
-06-15 19:57:35.195 26230 26230 F DEBUG : #02 pc 0000c599 /system/lib/libutils.so (_ZN7android7String8C2EPKc+12)
-06-15 19:57:35.195 26230 26230 F DEBUG : #03 pc 0002fdbf /system/lib/libaudiopolicymanagerdefault.so (_ZNK7android18HwModuleCollection19getDeviceDescriptorEjPKcS2_b+458)
-06-15 19:57:35.196 26230 26230 F DEBUG : #04 pc 0001de47 /system/lib/libaudiopolicymanagerdefault.so (_ZN7android18AudioPolicyManager27setDeviceConnectionStateIntEj24audio_policy_dev_state_tPKcS3_+178)
-06-15 19:57:35.196 26230 26230 F DEBUG : #05 pc 0000a009 /system/lib/libaudiopolicyservice.so
-06-15 19:57:35.196 26230 26230 F DEBUG : #06 pc 000a01a5 /system/lib/libmedia.so (_ZN7android20BnAudioPolicyService10onTransactEjRKNS_6ParcelEPS1_j+1256)
-06-15 19:57:35.196 26230 26230 F DEBUG : #07 pc 000359c3 /system/lib/libbinder.so (_ZN7android7BBinder8transactEjRKNS_6ParcelEPS1_j+70)
-06-15 19:57:35.196 26230 26230 F DEBUG : #08 pc 0003d1bb /system/lib/libbinder.so (_ZN7android14IPCThreadState14executeCommandEi+702)
-06-15 19:57:35.196 26230 26230 F DEBUG : #09 pc 0003ce07 /system/lib/libbinder.so (_ZN7android14IPCThreadState20getAndExecuteCommandEv+114)
-06-15 19:57:35.196 26230 26230 F DEBUG : #10 pc 0003d31b /system/lib/libbinder.so (_ZN7android14IPCThreadState14joinThreadPoolEb+46)
-06-15 19:57:35.196 26230 26230 F DEBUG : #11 pc 0004f8c5 /system/lib/libbinder.so
-06-15 19:57:35.196 26230 26230 F DEBUG : #12 pc 0000e345 /system/lib/libutils.so (_ZN7android6Thread11_threadLoopEPv+140)
-06-15 19:57:35.196 26230 26230 F DEBUG : #13 pc 000470b3 /system/lib/libc.so (_ZL15__pthread_startPv+22)
-06-15 19:57:35.196 26230 26230 F DEBUG : #14 pc 00019e3d /system/lib/libc.so (__start_thread+6)
-06-15 19:57:35.346 934 2991 W NativeCrashListener: Couldn't find ProcessRecord for pid 26201
-06-15 19:57:35.346 26230 26230 E : AM data write failed: Broken pipe
-06-15 19:57:40.605 26246 26261 D audio_hw_primary: enable_snd_device: snd_device(78: vi-feedback)
-06-15 19:57:40.606 26246 26261 D audio_hw_primary: enable_audio_route: usecase(21) apply and update mixer path: spkr-vi-record
-06-15 19:57:40.673 26283 26283 F DEBUG : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
-06-15 19:57:40.674 26283 26283 F DEBUG : Build fingerprint: 'google/bullhead/bullhead:7.1.2/N2G48C/4104010:userdebug/dev-keys'
-06-15 19:57:40.674 26283 26283 F DEBUG : Revision: 'rev_1.0'
-06-15 19:57:40.674 26283 26283 F DEBUG : ABI: 'arm'
-06-15 19:57:40.674 26283 26283 F DEBUG : pid: 26246, tid: 26282, name: Binder:26246_5 >>> /system/bin/audioserver <<<
-06-15 19:57:40.674 26283 26283 F DEBUG : signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0
-06-15 19:57:40.674 26283 26283 F DEBUG : r0 00000000 r1 00000000 r2 0000005f r3 00000000
-06-15 19:57:40.674 26283 26283 F DEBUG : r4 ffffffff r5 00000000 r6 eb750000 r7 00000001
-06-15 19:57:40.674 26283 26283 F DEBUG : r8 00000004 r9 ed953114 sl ed913900 fp 00000000
-06-15 19:57:40.674 26283 26283 F DEBUG : ip eda8bd88 sp eb4fd9c8 lr eda53bc5 pc eda1caf4 cpsr 60000030
-06-15 19:57:40.679 26283 26283 F DEBUG :
-06-15 19:57:40.679 26283 26283 F DEBUG : backtrace:
-06-15 19:57:40.679 26283 26283 F DEBUG : #00 pc 00018af4 /system/lib/libc.so (strlen+71)
-06-15 19:57:40.679 26283 26283 F DEBUG : #01 pc 0004fbc1 /system/lib/libc.so (__strlen_chk+4)
-06-15 19:57:40.679 26283 26283 F DEBUG : #02 pc 0000c599 /system/lib/libutils.so (_ZN7android7String8C2EPKc+12)
-06-15 19:57:40.679 26283 26283 F DEBUG : #03 pc 0002fdbf /system/lib/libaudiopolicymanagerdefault.so (_ZNK7android18HwModuleCollection19getDeviceDescriptorEjPKcS2_b+458)
-06-15 19:57:40.679 26283 26283 F DEBUG : #04 pc 0001de47 /system/lib/libaudiopolicymanagerdefault.so (_ZN7android18AudioPolicyManager27setDeviceConnectionStateIntEj24audio_policy_dev_state_tPKcS3_+178)
-06-15 19:57:40.679 26283 26283 F DEBUG : #05 pc 0000a009 /system/lib/libaudiopolicyservice.so
-06-15 19:57:40.680 26283 26283 F DEBUG : #06 pc 000a01a5 /system/lib/libmedia.so (_ZN7android20BnAudioPolicyService10onTransactEjRKNS_6ParcelEPS1_j+1256)
-06-15 19:57:40.680 26283 26283 F DEBUG : #07 pc 000359c3 /system/lib/libbinder.so (_ZN7android7BBinder8transactEjRKNS_6ParcelEPS1_j+70)
-06-15 19:57:40.680 26283 26283 F DEBUG : #08 pc 0003d1bb /system/lib/libbinder.so (_ZN7android14IPCThreadState14executeCommandEi+702)
-06-15 19:57:40.680 26283 26283 F DEBUG : #09 pc 0003ce07 /system/lib/libbinder.so (_ZN7android14IPCThreadState20getAndExecuteCommandEv+114)
-06-15 19:57:40.680 26283 26283 F DEBUG : #10 pc 0003d31b /system/lib/libbinder.so (_ZN7android14IPCThreadState14joinThreadPoolEb+46)
-06-15 19:57:40.680 26283 26283 F DEBUG : #11 pc 0004f8c5 /system/lib/libbinder.so
-06-15 19:57:40.680 26283 26283 F DEBUG : #12 pc 0000e345 /system/lib/libutils.so (_ZN7android6Thread11_threadLoopEPv+140)
-06-15 19:57:40.680 26283 26283 F DEBUG : #13 pc 000470b3 /system/lib/libc.so (_ZL15__pthread_startPv+22)
-06-15 19:57:40.680 26283 26283 F DEBUG : #14 pc 00019e3d /system/lib/libc.so (__start_thread+6)
-06-15 19:57:40.882 934 2991 W NativeCrashListener: Couldn't find ProcessRecord for pid 26246
-06-15 19:57:40.889 934 952 I BootReceiver: Copying /data/tombstones/tombstone_03 to DropBox (SYSTEM_TOMBSTONE)
-09-23 01:55:43.022 245 245 F installd: utils.cpp:67] Check failed: is_valid_package_name(package_name) == 0
---------- beginning of crash
-09-23 01:55:43.022 245 245 F libc : Fatal signal 6 (SIGABRT), code -6 in tid 245 (installd)
-09-23 01:55:43.022 166 166 W : debuggerd: handling request: pid=245 uid=0 gid=0 tid=245
-09-23 01:55:43.026 546 546 E : debuggerd: Unable to connect to activity manager (connect failed: Connection refused)
-09-23 01:55:43.076 546 546 F DEBUG : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
-09-23 01:55:43.076 546 546 F DEBUG : Build fingerprint: 'google/ryu/dragon:7.1.2/N2G48C/4104010:userdebug/dev-keys'
-09-23 01:55:43.076 546 546 F DEBUG : Revision: '0'
-09-23 01:55:43.076 546 546 F DEBUG : ABI: 'arm64'
-09-23 01:55:43.077 546 546 F DEBUG : pid: 245, tid: 245, name: installd >>> /system/bin/installd <<<
-09-23 01:55:43.077 546 546 F DEBUG : signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
-09-23 01:55:43.077 546 546 F DEBUG : Abort message: 'utils.cpp:67] Check failed: is_valid_package_name(package_name) == 0 '
-09-23 01:55:43.077 546 546 F DEBUG : x0 0000000000000000 x1 00000000000000f5 x2 0000000000000006 x3 0000000000000008
-09-23 01:55:43.078 546 546 F DEBUG : x4 0000000000000000 x5 0000000000000000 x6 00000076a4172000 x7 0000000000000000
-09-23 01:55:43.078 546 546 F DEBUG : x8 0000000000000083 x9 ffffffffffffffdf x10 0000000000000000 x11 0000000000000001
-09-23 01:55:43.078 546 546 F DEBUG : x12 0000000000000018 x13 0000000000000000 x14 0000000000000000 x15 000157de95b365f0
-09-23 01:55:43.078 546 546 F DEBUG : x16 00000076a4099ee0 x17 00000076a4043b24 x18 0000000000000000 x19 00000076a4227b40
-09-23 01:55:43.078 546 546 F DEBUG : x20 0000000000000006 x21 00000076a4227a98 x22 0000000000000014 x23 0000000000000005
-09-23 01:55:43.078 546 546 F DEBUG : x24 00000076a3834040 x25 0000000000000000 x26 0000000000000005 x27 0000000000000006
-09-23 01:55:43.078 546 546 F DEBUG : x28 0000007ff8a77879 x29 0000007ff8a777f0 x30 00000076a4040f50
-09-23 01:55:43.078 546 546 F DEBUG : sp 0000007ff8a777d0 pc 00000076a4043b2c pstate 0000000060000000
-09-23 01:55:43.081 546 546 F DEBUG :
-09-23 01:55:43.081 546 546 F DEBUG : backtrace:
-09-23 01:55:43.081 546 546 F DEBUG : #00 pc 000000000006bb2c /system/lib64/libc.so (tgkill+8)
-09-23 01:55:43.081 546 546 F DEBUG : #01 pc 0000000000068f4c /system/lib64/libc.so (pthread_kill+64)
-09-23 01:55:43.081 546 546 F DEBUG : #02 pc 0000000000023f58 /system/lib64/libc.so (raise+24)
-09-23 01:55:43.081 546 546 F DEBUG : #03 pc 000000000001c810 /system/lib64/libc.so (abort+52)
-09-23 01:55:43.081 546 546 F DEBUG : #04 pc 000000000000609c /system/lib64/libbase.so (_ZN7android4base10LogMessageD1Ev+1084)
-09-23 01:55:43.082 546 546 F DEBUG : #05 pc 000000000001bbd4 /system/bin/installd
-09-23 01:55:43.082 546 546 F DEBUG : #06 pc 000000000001be38 /system/bin/installd
-09-23 01:55:43.082 546 546 F DEBUG : #07 pc 0000000000007f08 /system/bin/installd
-09-23 01:55:43.082 546 546 F DEBUG : #08 pc 0000000000005bd4 /system/bin/installd
-09-23 01:55:43.082 546 546 F DEBUG : #09 pc 000000000001a594 /system/lib64/libc.so (__libc_init+88)
-09-23 01:55:43.082 546 546 F DEBUG : #10 pc 0000000000004818 /system/bin/installd
-09-23 01:55:43.093 166 166 W : debuggerd: resuming target 245
-09-23 01:55:43.132 516 516 E InstallerConnection: read exception
-09-23 01:55:43.132 516 516 I InstallerConnection: disconnecting...
-09-23 01:55:48.494 516 537 W WindowManager: App freeze timeout expired.
-09-23 01:55:52.058 163 163 W auditd : type=1404 audit(0.0:4): enforcing=0 old_enforcing=1 auid=4294967295 ses=4294967295
---------- beginning of main
-11-03 02:59:48.505 8049 8049 I stagefright: type=1400 audit(0.0:130): avc: denied { read } for path="/data/data/test1.mp4" dev="sda35" ino=868967 scontext=u:r:drmserver:s0 tcontext=u:object_r:system_data_file:s0 tclass=file permissive=1
-11-03 02:59:48.505 3939 3939 I chatty : uid=10040(u0_a40) com.google.android.setupwizard expire 52528 lines
-11-03 02:59:48.559 8049 8054 I OMXClient: Treble IOmx obtained
---------- beginning of crash
-11-03 02:59:48.892 6371 8072 F DEBUG : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
-11-03 02:59:48.892 6371 8072 F DEBUG : Build fingerprint: 'google/marlin/marlin:8.0.0/OC/mspect11021711:userdebug/dev-keys'
-11-03 02:59:48.892 6371 8072 F DEBUG : Revision: '0'
-11-03 02:59:48.892 6371 8072 F DEBUG : ABI: 'arm'
-11-03 02:59:48.892 6371 8072 F DEBUG : pid: 6371, tid: 8072, name: media.codec >>> omx@1.0-service <<<
-11-03 02:59:48.892 6371 8072 F DEBUG : signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0xed000000
-11-03 02:59:48.900 6371 8072 F DEBUG : r0 ecffdba0 r1 ed000000 r2 d44854c0 r3 00000070
-11-03 02:59:48.900 6371 8072 F DEBUG : r4 00000070 r5 000021a0 r6 00000070 r7 00000070
-11-03 02:59:48.900 6371 8072 F DEBUG : r8 00000040 r9 ffc2b278 sl ffffde70 fp 00000060
-11-03 02:59:48.900 6371 8072 F DEBUG : ip ffffffa0 sp d2fff620 lr 00004308 pc ed1c0e7c cpsr a00f0010
-11-03 02:59:48.901 6371 8072 F DEBUG :
-11-03 02:59:48.901 6371 8072 F DEBUG : backtrace:
-11-03 02:59:48.901 6371 8072 F DEBUG : #00 pc 00034e7c /system/lib/libstagefright_soft_hevcdec.so
---------- beginning of system
-11-03 02:59:48.905 1135 1155 I BootReceiver: Copying /data/tombstones/tombstone_03 to DropBox (SYSTEM_TOMBSTONE)
-05-04 21:59:23.695 9363 9363 I crash_dump64: performing dump of process 8373 (target tid = 8414)
-05-04 21:59:23.695 9363 9363 F DEBUG : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
-05-04 21:59:23.696 9363 9363 F DEBUG : Build fingerprint: 'google/taimen/taimen:8.1.0/OPM2.171026.006.A1/4756228:userdebug/dev-keys'
-05-04 21:59:23.696 9363 9363 F DEBUG : Revision: 'rev_10'
-05-04 21:59:23.696 9363 9363 F DEBUG : ABI: 'arm64'
-05-04 21:59:23.696 9363 9363 F DEBUG : pid: 8373, tid: 8414, name: btu message loo >>> com.android.bluetooth <<<
-05-04 21:59:23.696 9363 9363 F DEBUG : signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
-05-04 21:59:23.700 9363 9363 F DEBUG : Abort message: '[FATAL:allocation_tracker.cc(143)] Check failed: map_entry != allocations.end().
-05-04 21:59:23.700 9363 9363 F DEBUG : '
-05-04 21:59:23.700 9363 9363 F DEBUG : x0 0000000000000000 x1 00000000000020de x2 0000000000000006 x3 0000000000000008
-05-04 21:59:23.701 9363 9363 F DEBUG : x4 613a4c415441465b x5 613a4c415441465b x6 613a4c415441465b x7 6f697461636f6c6c
-05-04 21:59:23.701 9363 9363 F DEBUG : x8 0000000000000083 x9 0000000010000000 x10 000000703a7a7c80 x11 0000000000000001
-05-04 21:59:23.701 9363 9363 F DEBUG : x12 746e655f70616d20 x13 6c61203d21207972 x14 ff00000000000000 x15 ffffffffffffffff
-05-04 21:59:23.701 9363 9363 F DEBUG : x16 0000006380f4afa8 x17 00000070d20af52c x18 0000000000000000 x19 00000000000020b5
-05-04 21:59:23.701 9363 9363 F DEBUG : x20 00000000000020de x21 0000000000000083 x22 000000703a7a9588 x23 000000703b8ee000
-05-04 21:59:23.701 9363 9363 F DEBUG : x24 000000703a7a7d01 x25 000000703a7a9588 x26 000000703bc7d948 x27 00000070484c92d8
-05-04 21:59:23.701 9363 9363 F DEBUG : x28 0000000000000006 x29 000000703a7a7cc0 x30 00000070d2064760
-05-04 21:59:23.701 9363 9363 F DEBUG : sp 000000703a7a7c80 pc 00000070d2064788 pstate 0000000060000000
-05-04 21:59:23.742 9363 9363 F DEBUG :
-05-04 21:59:23.742 9363 9363 F DEBUG : backtrace:
-05-04 21:59:23.743 9363 9363 F DEBUG : #00 pc 000000000001d788 /system/lib64/libc.so (abort+120)
-05-04 21:59:23.743 9363 9363 F DEBUG : #01 pc 0000000000083470 /system/lib64/libchrome.so (base::debug::BreakDebugger()+20)
-05-04 21:59:23.743 9363 9363 F DEBUG : #02 pc 000000000009affc /system/lib64/libchrome.so (logging::LogMessage::~LogMessage()+1068)
-05-04 21:59:23.743 9363 9363 F DEBUG : #03 pc 0000000000199130 /system/lib64/hw/bluetooth.default.so (allocation_tracker_notify_free(unsigned char, void*)+720)
-05-04 21:59:23.743 9363 9363 F DEBUG : #04 pc 000000000019984c /system/lib64/hw/bluetooth.default.so (osi_free(void*)+20)
-05-04 21:59:23.743 9363 9363 F DEBUG : #05 pc 0000000000163f1c /system/lib64/hw/bluetooth.default.so (l2c_fcr_cleanup(t_l2c_ccb*)+92)
-05-04 21:59:23.743 9363 9363 F DEBUG : #06 pc 000000000016adc8 /system/lib64/hw/bluetooth.default.so (l2cu_release_ccb(t_l2c_ccb*)+176)
-05-04 21:59:23.743 9363 9363 F DEBUG : #07 pc 0000000000162ea0 /system/lib64/hw/bluetooth.default.so (l2c_csm_execute(t_l2c_ccb*, unsigned short, void*)+1852)
-05-04 21:59:23.743 9363 9363 F DEBUG : #08 pc 000000000015e4f4 /system/lib64/hw/bluetooth.default.so (L2CA_DisconnectRsp(unsigned short)+92)
-05-04 21:59:23.743 9363 9363 F DEBUG : #09 pc 00000000001838b0 /system/lib64/hw/bluetooth.default.so (sdp_disconnect_ind(unsigned short, bool)+52)
-05-04 21:59:23.743 9363 9363 F DEBUG : #10 pc 0000000000163574 /system/lib64/hw/bluetooth.default.so (l2c_csm_execute(t_l2c_ccb*, unsigned short, void*)+3600)
-05-04 21:59:23.743 9363 9363 F DEBUG : #11 pc 0000000000169f94 /system/lib64/hw/bluetooth.default.so (l2c_rcv_acl_data(BT_HDR*)+3980)
-05-04 21:59:23.743 9363 9363 F DEBUG : #12 pc 00000000000849cc /system/lib64/libchrome.so (base::debug::TaskAnnotator::RunTask(char const*, base::PendingTask const&)+188)
-05-04 21:59:23.743 9363 9363 F DEBUG : #13 pc 000000000009efa4 /system/lib64/libchrome.so (base::MessageLoop::RunTask(base::PendingTask const&)+444)
-05-04 21:59:23.743 9363 9363 F DEBUG : #14 pc 000000000009f26c /system/lib64/libchrome.so (base::MessageLoop::DeferOrRunPendingTask(base::PendingTask)+52)
-05-04 21:59:23.743 9363 9363 F DEBUG : #15 pc 000000000009f698 /system/lib64/libchrome.so (base::MessageLoop::DoWork()+356)
-05-04 21:59:23.743 9363 9363 F DEBUG : #16 pc 00000000000a08a8 /system/lib64/libchrome.so (base::MessagePumpDefault::Run(base::MessagePump::Delegate*)+220)
-05-04 21:59:23.743 9363 9363 F DEBUG : #17 pc 00000000000ba124 /system/lib64/libchrome.so (base::RunLoop::Run()+136)
-05-04 21:59:23.743 9363 9363 F DEBUG : #18 pc 0000000000138660 /system/lib64/hw/bluetooth.default.so (btu_message_loop_run(void*)+248)
-05-04 21:59:23.743 9363 9363 F DEBUG : #19 pc 00000000001a24fc /system/lib64/hw/bluetooth.default.so (work_queue_read_cb(void*)+92)
-05-04 21:59:23.743 9363 9363 F DEBUG : #20 pc 00000000001a0758 /system/lib64/hw/bluetooth.default.so (run_reactor(reactor_t*, int)+320)
-05-04 21:59:23.743 9363 9363 F DEBUG : #21 pc 00000000001a05ec /system/lib64/hw/bluetooth.default.so (reactor_start(reactor_t*)+84)
-05-04 21:59:23.743 9363 9363 F DEBUG : #22 pc 00000000001a1f94 /system/lib64/hw/bluetooth.default.so (run_thread(void*)+184)
-05-04 21:59:23.743 9363 9363 F DEBUG : #23 pc 0000000000067d80 /system/lib64/libc.so (__pthread_start(void*)+36)
-05-04 21:59:23.743 9363 9363 F DEBUG : #24 pc 000000000001ec18 /system/lib64/libc.so (__start_thread+68)
-1-25 19:47:35.417 8080 11665 F MPEG4Extractor: frameworks/av/media/libstagefright/MPEG4Extractor.cpp:6853 CHECK_EQ( (unsigned)ptr[0],1u) failed: 129 vs. 1
-11-25 19:47:35.417 8080 11665 F libc : Fatal signal 6 (SIGABRT), code -6 in tid 11665 (generic)
-11-25 19:47:35.487 940 940 F DEBUG : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
-11-25 19:47:35.487 940 940 F DEBUG : Build fingerprint: 'samsung/hero2qltezc/hero2qltechn:6.0.1/MMB29M/G9350ZCU2APJ6:user/release-keys'
-11-25 19:47:35.487 940 940 F DEBUG : Revision: '15'
-11-25 19:47:35.487 940 940 F DEBUG : ABI: 'arm'
-11-25 19:47:35.487 940 940 F DEBUG : pid: 8080, tid: 11665, name: generic >>> /system/bin/mediaserver <<<
-11-25 19:47:35.487 940 940 F DEBUG : signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
-11-25 19:47:35.577 940 940 F DEBUG : Abort message: 'frameworks/av/media/libstagefright/MPEG4Extractor.cpp:6853 CHECK_EQ( (unsigned)ptr[0],1u) failed: 129 vs. 1'
-11-25 19:47:35.577 940 940 F DEBUG : r0 00000000 r1 00002d91 r2 00000006 r3 eb23f978
-11-25 19:47:35.577 940 940 F DEBUG : r4 eb23f980 r5 eb23f930 r6 00000009 r7 0000010c
-11-25 19:47:35.577 940 940 F DEBUG : r8 e9e91140 r9 00000000 sl 00000000 fp 000003d3
-11-25 19:47:35.577 940 940 F DEBUG : ip 00000006 sp eb23db70 lr f701313d pc f7015538 cpsr 40010010
-11-25 19:47:35.597 940 940 F DEBUG :
-11-25 19:47:35.597 940 940 F DEBUG : backtrace:
-11-25 19:47:35.597 940 940 F DEBUG : #00 pc 00042538 /system/lib/libc.so (tgkill+12)
-11-25 19:47:35.597 940 940 F DEBUG : #01 pc 00040139 /system/lib/libc.so (pthread_kill+32)
-11-25 19:47:35.597 940 940 F DEBUG : #02 pc 0001c783 /system/lib/libc.so (raise+10)
-11-25 19:47:35.597 940 940 F DEBUG : #03 pc 000199f1 /system/lib/libc.so (__libc_android_abort+34)
-11-25 19:47:35.597 940 940 F DEBUG : #04 pc 000175ac /system/lib/libc.so (abort+4)
-11-25 19:47:35.597 940 940 F DEBUG : #05 pc 000085e7 /system/lib/libcutils.so (__android_log_assert+86)
-11-25 19:47:35.597 940 940 F DEBUG : #06 pc 000c1f49 /system/lib/libstagefright.so (_ZN7android14MPEG4Extractor25avcc_getCodecSpecificInfoERNS_2spINS_7ABufferEEEPKcj+392)
-11-25 19:47:35.597 940 940 F DEBUG : #07 pc 000c213f /system/lib/libstagefright.so (_ZN7android14MPEG4Extractor15checkConfigDataEjRKNS_2spINS_8MetaDataEEE+218)
-11-25 19:47:35.597 940 940 F DEBUG : #08 pc 000bbd25 /system/lib/libstagefright.so (_ZN7android14MPEG4Extractor12checkSupportEjRKNS_2spINS_8MetaDataEEE+136)
-11-25 19:47:35.597 940 940 F DEBUG : #09 pc 000ba555 /system/lib/libstagefright.so (_ZN7android14MPEG4Extractor10parseChunkEPxi+13060)
-11-25 19:47:35.597 940 940 F DEBUG : #10 pc 000ba32d /system/lib/libstagefright.so (_ZN7android14MPEG4Extractor10parseChunkEPxi+12508)
-11-25 19:47:35.597 940 940 F DEBUG : #11 pc 000b8a6f /system/lib/libstagefright.so (_ZN7android14MPEG4Extractor10parseChunkEPxi+6174)
-11-25 19:47:35.597 940 940 F DEBUG : #12 pc 000b8a6f /system/lib/libstagefright.so (_ZN7android14MPEG4Extractor10parseChunkEPxi+6174)
-11-25 19:47:35.597 940 940 F DEBUG : #13 pc 000b8a6f /system/lib/libstagefright.so (_ZN7android14MPEG4Extractor10parseChunkEPxi+6174)
-11-25 19:47:35.597 940 940 F DEBUG : #14 pc 000b8a6f /system/lib/libstagefright.so (_ZN7android14MPEG4Extractor10parseChunkEPxi+6174)
-11-25 19:47:35.597 940 940 F DEBUG : #15 pc 000b8a6f /system/lib/libstagefright.so (_ZN7android14MPEG4Extractor10parseChunkEPxi+6174)
-11-25 19:47:35.597 940 940 F DEBUG : #16 pc 000b6e3b /system/lib/libstagefright.so (_ZN7android14MPEG4Extractor12readMetaDataEv+94)
-11-25 19:47:35.597 940 940 F DEBUG : #17 pc 000b6daf /system/lib/libstagefright.so (_ZN7android14MPEG4Extractor11getMetaDataEv+10)
-11-25 19:47:35.597 940 940 F DEBUG : #18 pc 00088c53 /system/lib/libmediaplayerservice.so (_ZN7android8NuPlayer13GenericSource18initFromDataSourceEv+386)
-11-25 19:47:35.597 940 940 F DEBUG : #19 pc 00089b43 /system/lib/libmediaplayerservice.so (_ZN7android8NuPlayer13GenericSource14onPrepareAsyncEv+238)
-11-25 19:47:35.597 940 940 F DEBUG : #20 pc 0000b405 /system/lib/libstagefright_foundation.so (_ZN7android8AHandler14deliverMessageERKNS_2spINS_8AMessageEEE+16)
-11-25 19:47:35.597 940 940 F DEBUG : #21 pc 0000d423 /system/lib/libstagefright_foundation.so (_ZN7android8AMessage7deliverEv+54)
-11-25 19:47:35.597 940 940 F DEBUG : #22 pc 0000be29 /system/lib/libstagefright_foundation.so (_ZN7android7ALooper4loopEv+224)
-11-25 19:47:35.597 940 940 F DEBUG : #23 pc 0001011d /system/lib/libutils.so (_ZN7android6Thread11_threadLoopEPv+112)
-11-25 19:47:35.597 940 940 F DEBUG : #24 pc 0003fa3b /system/lib/libc.so (_ZL15__pthread_startPv+30)
-11-25 19:47:35.597 940 940 F DEBUG : #25 pc 0001a085 /system/lib/libc.so (__start_thread+6)
-11-25 19:47:35.837 940 940 F DEBUG :
-11-25 19:47:35.837 940 940 F DEBUG : Tombstone written to: /data/tombstones/tombstone_01
\ No newline at end of file
diff --git a/common/util/tests/src/com/android/compatibility/common/util/CrashUtilsTest.java b/common/util/tests/src/com/android/compatibility/common/util/CrashUtilsTest.java
deleted file mode 100644
index 94f472e..0000000
--- a/common/util/tests/src/com/android/compatibility/common/util/CrashUtilsTest.java
+++ /dev/null
@@ -1,118 +0,0 @@
-/*
- * Copyright (C) 2019 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.android.compatibility.common.util;
-
-import java.io.BufferedReader;
-import java.io.IOException;
-import java.io.InputStreamReader;
-import org.json.JSONArray;
-import org.json.JSONException;
-import org.json.JSONObject;
-import org.junit.Assert;
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.junit.runners.JUnit4;
-
-/** Unit tests for {@link CrashUtils}. */
-@RunWith(JUnit4.class)
-public class CrashUtilsTest {
-
- private JSONArray mCrashes;
-
- @Before
- public void setUp() throws IOException {
- try (BufferedReader txtReader =
- new BufferedReader(
- new InputStreamReader(
- getClass().getClassLoader().getResourceAsStream("logcat.txt")))) {
- StringBuffer input = new StringBuffer();
- String tmp;
- while ((tmp = txtReader.readLine()) != null) {
- input.append(tmp + "\n");
- }
- mCrashes = CrashUtils.addAllCrashes(input.toString(), new JSONArray());
- }
- }
-
- @Test
- public void testGetAllCrashes() throws Exception {
- JSONArray expectedResults = new JSONArray();
- expectedResults.put(createCrashJson(11071, 11189, "AudioOut_D", 3912761344L, "SIGSEGV"));
- expectedResults.put(createCrashJson(12736, 12761, "Binder:12736_2", 0L, "SIGSEGV"));
- expectedResults.put(createCrashJson(26201, 26227, "Binder:26201_3", 0L, "SIGSEGV"));
- expectedResults.put(createCrashJson(26246, 26282, "Binder:26246_5", 0L, "SIGSEGV"));
- expectedResults.put(createCrashJson(245, 245, "installd", null, "SIGABRT"));
- expectedResults.put(createCrashJson(6371, 8072, "media.codec", 3976200192L, "SIGSEGV"));
- expectedResults.put(createCrashJson(8373, 8414, "loo", null, "SIGABRT"));
-
- Assert.assertEquals(mCrashes.toString(), expectedResults.toString());
- }
-
- public JSONObject createCrashJson(
- int pid, int tid, String name, Long faultaddress, String signal) {
- JSONObject json = new JSONObject();
- try {
- json.put(CrashUtils.PID, pid);
- json.put(CrashUtils.TID, tid);
- json.put(CrashUtils.NAME, name);
- json.put(CrashUtils.FAULT_ADDRESS, faultaddress);
- json.put(CrashUtils.SIGNAL, signal);
- } catch (JSONException e) {
-
- }
- return json;
- }
-
- @Test
- public void testValidCrash() throws Exception {
- Assert.assertTrue(CrashUtils.detectCrash(new String[] {"AudioOut_D"}, true, mCrashes));
- }
-
- @Test
- public void testMissingName() throws Exception {
- Assert.assertFalse(CrashUtils.detectCrash(new String[] {""}, true, mCrashes));
- }
-
- @Test
- public void testSIGABRT() throws Exception {
- Assert.assertFalse(CrashUtils.detectCrash(new String[] {"installd"}, true, mCrashes));
- }
-
- @Test
- public void testFaultAddressBelowMin() throws Exception {
- Assert.assertFalse(CrashUtils.detectCrash(new String[] {"Binder:12736_2"}, true, mCrashes));
- }
-
- @Test
- public void testIgnoreMinAddressCheck() throws Exception {
- Assert.assertTrue(CrashUtils.detectCrash(new String[] {"Binder:12736_2"}, false, mCrashes));
- }
-
- @Test
- public void testGoodAndBadCrashes() throws Exception {
- Assert.assertTrue(
- CrashUtils.detectCrash(new String[] {"AudioOut_D", "generic"}, true, mCrashes));
- }
-
- @Test
- public void testNullFaultAddress() throws Exception {
- JSONArray crashes = new JSONArray();
- crashes.put(createCrashJson(8373, 8414, "loo", null, "SIGSEGV"));
- Assert.assertTrue(CrashUtils.detectCrash(new String[] {"loo"}, true, crashes));
- }
-}
diff --git a/common/util/tests/src/com/android/compatibility/common/util/UnitTests.java b/common/util/tests/src/com/android/compatibility/common/util/UnitTests.java
index 948c26e..14ca1cd 100644
--- a/common/util/tests/src/com/android/compatibility/common/util/UnitTests.java
+++ b/common/util/tests/src/com/android/compatibility/common/util/UnitTests.java
@@ -28,7 +28,6 @@
@SuiteClasses({
BusinessLogicTest.class,
CaseResultTest.class,
- CrashUtilsTest.class,
DynamicConfigTest.class,
LightInvocationResultTest.class,
MetricsXmlSerializerTest.class,
diff --git a/tools/cts-instant-tradefed/Android.mk b/tools/cts-instant-tradefed/Android.mk
index 63e1e54..c6c89a0 100644
--- a/tools/cts-instant-tradefed/Android.mk
+++ b/tools/cts-instant-tradefed/Android.mk
@@ -22,7 +22,7 @@
LOCAL_SUITE_TARGET_ARCH := $(TARGET_ARCH)
LOCAL_SUITE_NAME := CTS_INSTANT
LOCAL_SUITE_FULLNAME := "Compatibility Test Suite for Instant Apps"
-LOCAL_SUITE_VERSION := 9.0_r8
+LOCAL_SUITE_VERSION := 9.0_r2
LOCAL_STATIC_JAVA_LIBRARIES += cts-tradefed-harness
LOCAL_MODULE := cts-instant-tradefed
diff --git a/tools/cts-tradefed/Android.mk b/tools/cts-tradefed/Android.mk
index 2520d39..62fc414 100644
--- a/tools/cts-tradefed/Android.mk
+++ b/tools/cts-tradefed/Android.mk
@@ -30,7 +30,7 @@
LOCAL_SUITE_TARGET_ARCH := $(TARGET_ARCH)
LOCAL_SUITE_NAME := CTS
LOCAL_SUITE_FULLNAME := "Compatibility Test Suite"
-LOCAL_SUITE_VERSION := 9.0_r8
+LOCAL_SUITE_VERSION := 9.0_r1
LOCAL_STATIC_JAVA_LIBRARIES += cts-tradefed-harness
LOCAL_MODULE := cts-tradefed
diff --git a/tools/cts-tradefed/res/config/cts-known-failures.xml b/tools/cts-tradefed/res/config/cts-known-failures.xml
index 3f74b07..1502bd4 100755
--- a/tools/cts-tradefed/res/config/cts-known-failures.xml
+++ b/tools/cts-tradefed/res/config/cts-known-failures.xml
@@ -209,22 +209,10 @@
<!-- b/110354076 -->
<option name="compatibility:exclude-filter" value="CtsDevicePolicyManagerTestCases com.android.cts.devicepolicy.DeviceOwnerTest#testCreateAndManageUser_DontSkipSetupWizard" />
- <!-- b/112450846 -->
- <option name="compatibility:exclude-filter" value="CtsAppSecurityHostTestCases android.appsecurity.cts.StorageHostTest#testCache" />
- <option name="compatibility:exclude-filter" value="CtsAppSecurityHostTestCases android.appsecurity.cts.StorageHostTest#testVerifyAppStats" />
- <option name="compatibility:exclude-filter" value="CtsAppSecurityHostTestCases android.appsecurity.cts.StorageHostTest#testVerifyStats" />
-
<!-- b/112125308 -->
<option name="compatibility:exclude-filter" value="CtsActivityManagerDeviceTestCases android.server.am.ActivityManagerActivityVisibilityTests#testTurnScreenOnAttrNoLockScreen" />
<!-- b/112688380 -->
<option name="compatibility:exclude-filter" value="CtsActivityManagerDeviceTestCases android.server.am.ActivityManagerAppConfigurationTests#testAppOrientationRequestConfigClears" />
<option name="compatibility:exclude-filter" value="CtsActivityManagerDeviceTestCases android.server.am.ActivityManagerAppConfigurationTests#testTaskCloseRestoreFreeOrientation" />
-
- <!-- b/120874937 -->
- <option name="compatibility:exclude-filter" value="CtsViewTestCases android.view.cts.TextureViewTest#testGetBitmap_8888_P3" />
- <option name="compatibility:exclude-filter" value="CtsViewTestCases android.view.cts.TextureViewTest#testGetBitmap_FP16_P3" />
- <option name="compatibility:exclude-filter" value="CtsViewTestCases android.view.cts.TextureViewTest#testGetBitmap_FP16_LinearExtendedSRGB" />
- <option name="compatibility:exclude-filter" value="CtsViewTestCases android.view.cts.TextureViewTest#testGet565Bitmap_SRGB" />
- <option name="compatibility:exclude-filter" value="CtsViewTestCases android.view.cts.TextureViewTest#testGetBitmap_SRGB" />
</configuration>