以前没有完整记录过cts框架造成的问题,以这个问题记录分析方法
问题初探
测试命令: run cts-on-gsi -m CtsMediaTestCases
在host log中报错如下;
源
以前没有完整记录过cts框架造成的问题,以这个问题记录分析方法
测试命令: run cts-on-gsi -m CtsMediaTestCases
在host log中报错如下;
遇到一个Android P相关的问题,和原来CTS/GTS 问题分析1的表现是一样的,但是将http://gerrit.pt.miui.com/#/c/387000/这个修复cp过来,发现不生效,仍然报错,因此记录一下
测试命令: run gts -m GtsGmscoreHostTestCases -t com.google.android.gts.devicepolicy.managedprovisioning.DeviceOwnerProvisioningHostsideTest#testRequiredAppsInManagedDevice
报错堆栈:
测试命令:
run cts -m CtsDevicePolicyManagerTestCases -t com.android.cts.devicepolicy.MixedManagedProfileOwnerTestApi25#testResetPasswordFbe
错误有两种情况,一种是直接进入系统桌面,一种是起一个测试case中的空白activity,经过分析,两者都是同一个原因造成的。因此以任一种情况举例。报错堆栈如下:
测试命令:
run cts -m CtsOsTestCases -t android.os.cts.SeccompTest#testIsolatedServicePolicy
报错堆栈:
07-24 00:50:08.627 2633 4112 I ActivityManager: Process android.os.cts (pid 13402) has died: vis SF
07-24 00:50:08.627 2022 2022 I Zygote : Process 13402 exited due to signal (31)
07-24 00:50:08.627 13379 13399 I TestRunner: failed: testIsolatedServicePolicy(android.os.cts.SeccompTest)
android.security.cts.ListeningPortsTest#testNoListeningLoopbackTcp6Ports
android.security.cts.ListeningPortsTest#testNoListeningLoopbackUdp6Ports
android.security.cts.ListeningPortsTest#testNoRemotelyAccessibleListeningUdp6Ports
本地测了一下,前两条没问题,那么下面重点先说下第三条的分析流程:
测试命令: run sts-userbuild -m CtsSecurityTestCases -t android.security.cts.ListeningPortsTest#testNoRemotelyAccessibleListeningUdp6Ports
测试结果:
测试命令: run gts-suite -s ID -o -m GtsGmscoreHostTestCases -t com.google.android.gts.devicepolicy.managedprovisioning.DeviceOwnerProvisioningHostsideTest#testRequiredAppsInManagedProfileForManagedDevice
报错堆栈:
07-27 06:59:30.611 32075 32125 I SilentProvisioningTest: managedProfileProvisionedReceiver.awaitForBroadcast(): failed
07-27 06:59:30.612 2091 2129 D ContactsDatabaseHelper: insertMimeType: vnd.android.cursor.item/website
测试命令: run gts -m GtsGmscoreHostTestCases -t com.google.android.gts.devicepolicy.managedprovisioning.DeviceOwnerProvisioningHostsideTest#testRequiredAppsInManagedDevice
报错堆栈
07-18 16:53:12 I/XtsHostTestBase: Test com.google.android.gts.playstore.ResetPreferredAppsTest#testPersistDefaultBrowser: PASSED
07-18 16:53:19 I/XtsHostTestBase: Test com.google.android.gts.managedprovisioning.AfwRequiredAppsTest#testRequiredApps_DeviceOwner_withGms: FAILURE
07-18 16:53:19 W/XtsHostTestBase: junit.framework.AssertionFailedError: com.google.android.gms is not installed
1.android.security.cts.PackageSignatureTest测试fail(MTK平台)
原因:由于用的是google default key而导致的fail,需要自己定义release key,不仅可以满足CTS request,还可以满足工信部CATR TAF spec。
方案:在编译器执行如下命令:
--com.google.android.placement.gts.CoreGmsAppsPrivappPermissionsTest
#testCoreGmsAppsPermissionsWhitelisted
gts 6.0 R2 com.google.android.pm.gts.PackageManagerHostTest#testMediaProjection
11-03 16:04:48 I/ModuleListener: [1/1] com.google.android.pm.gts.PackageManagerHostTest#testMediaProjection fail:
junit.framework.AssertionFailedError: Instant App should be able to access Media Projection APIs.
Please apply patch r.android.com/732269
at junit.framework.Assert.fail(Assert.java:57)
at junit.framework.Assert.assertTrue(Assert.java:22)
at junit.framework.TestCase.assertTrue(TestCase.java:192)
at com.google.android.pm.gts.PackageManagerHostTest.testMediaProjection(PackageManagerHostTest.java:286)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
继续阅读“【GTS 6.0 R2】 com.google.android.pm.gts.PackageManagerHostTest#testMediaProjection”
GTS 6.0_R2 failed com.google.android.nmgiarc.gts.CarrierServicesTests#testCarrierServicesIsTheDefaultImsPackage
junit.framework.AssertionFailedError: CS not the default IMS package.
Earlier this month, we released the GMS October updates and GTS 6.0 R2. While these versions are currently required for new smartphones and tablets models to be distributed in the European Economic Area (EEA), they will also be required for non-EEA GMS build approvals on the dates shown in the table below:
本月早些时候,我们发布了GMS十月更新和GTS 6.0 R2。 虽然这些版本目前需要在欧洲经济区(EEA)中分发新的智能手机和平板电脑型号,但在下表所示日期还需要非EEA GMS构建批准:
GTS 6.0R2 这一项 GtsOsTestCases com.google.android.os.gts.SysConfigTest#testValidSysConfigPresent 测试不过
java.lang.AssertionError: Modification of required config file:
6.0_R2测试GTS模块GtsNmgiarcTestCases测试项com.google.android.nmgiarc.gts.CarrierServicesTests#testMessagesInstalledCorrectly测试Fail
junit.framework.AssertionFailedError: CS is not present
armeabi-v7a CtsAppSecurityHostTestCases
Test Result Details
android.appsecurity.cts.ExternalStorageHostTest#testSecondaryUsersInaccessible
fail
java.lang.AssertionError: /sdcard/../24
GtsPlacementTestCases com.google.android.placement.gts.PreloadHeadedAppsTest#testNumberOfHeadedApplications
java.lang.AssertionError: Number of total preloaded apps exceeded: actual 13 > max 7