Android S CTS STS 常见的 fail 项

news/2025/1/16 2:38:20/

此文章只是一篇总结,针对 MTK 平台近期的 CTS STS 做个简单的整理回顾,后期不断扩展

  1. CTS 专区

CtsLocationPrivilegedTestCases android.location.cts.privileged.GnssMeasurementValuesTest#testListenForGnssMeasurements

junit.framework.AssertionFailedError: Failing tests are:
(Test: FAIL) SatellitPvt is supported. The test must find a measurement with SatellitePvt within 75 seconds.
at junit.framework.Assert.fail(Assert.java:50)
at android.location.cts.common.SoftAssert.assertAll(SoftAssert.java:162)
at android.location.cts.privileged.GnssMeasurementValuesTest.testListenForGnssMeasurements(GnssMeasurementValuesTest.java:156)

此项需要特殊的测试条件,需要在 GPS 信号很好的地方或者室内装有 GPS 放大器,复测可以正常 pass 。

==================================================================================

CtsPermissionTestCases
android.permission.cts.ProviderPermissionTest#testManageDocuments

junit.framework.AssertionFailedError: Exactly one package (must be com.google.android.documentsui) can request the MANAGE_DOCUMENTS permission; found package com.android.contacts which must be revoked for security reasons at junit.framework.Assert.fail(Assert.java:50) at android.permission.cts.ProviderPermissionTest.testManageDocuments(ProviderPermissionTest.java:219)

此项是由于 MTK 平台的联系人权限导致的,在清单文件中注释掉 android.permission.MANAGE_DOCUMENTS

=====================================================================================

CtsNetTestCases
android.net.cts.ConnectivityManagerTest#testOpenConnection

java.lang.AssertionError: Cell network not available. Please ensure the device has working mobile data.
at org.junit.Assert.fail(Assert.java:89)
at org.junit.Assert.assertTrue(Assert.java:42)
at org.junit.Assert.assertNotNull(Assert.java:713)
at android.net.cts.util.CtsNetUtils.connectToCell(CtsNetUtils.java:501)
复测log:
java.net.ConnectException: Failed to connect to google-ipv6test.appspot.com/xx.xxx.xxx.xx:xx

需要特殊的 ipv6 网络

=====================================================================================

CtsMediaTestCases
android.media.cts.MediaCodecListTest#testAllComponentInstantiation
android.media.cts.DecodeAccuracyTest#testSurfaceViewLargerHeightDecodeAccuracy[48]
android.media.cts.DecodeAccuracyTest#testSurfaceViewVideoDecodeAccuracy[48]

junit.framework.AssertionFailedError: With the best matched border crop (0.0, 0.0), greatest pixel difference is 188 at (81, 161) which is over the allowed difference 90
at junit.framework.Assert.fail(Assert.java:50)
at junit.framework.Assert.assertTrue(Assert.java:20)
at android.media.cts.DecodeAccuracyTest.validateResult(DecodeAccuracyTest.java:282)
at android.media.cts.DecodeAccuracyTest.runTest(DecodeAccuracyTest.java:251)
at android.media.cts.DecodeAccuracyTest.testSurfaceViewLargerWidthDecodeAccuracy(DecodeAccuracyTest.java:218)

MTK 规避方案: media_codecs_c2.xml
Alias name=“OMX.MTK.VIDEO.DECODER.AVC”
Limit name=“size” min=“64x64” max=“2048x1088” 修改为2048x1088

=====================================================================================

CtsVideoTestCases
android.video.cts.VideoEncoderDecoderTest#testHevcOther0Perf0320x0240

junit.framework.AssertionFailedError: Expected achievable frame rates for c2.mtk.hevc.encoder video/hevc 320x240: [310.0, 681.0]. Measured frame rate: [123.10797174571141, 130.61042655947836].

修改帧率范围根据 log 提示

=====================================================================================

CtsMediaTestCases
android.media.cts.VideoDecoderPerfTest#testMpeg4Goog0Perf0480x0360
android.media.cts.VideoDecoderPerfTest#testMpeg4Goog0Perf1280x0720

arm64-v8a:
junit.framework.AssertionFailedError: Expected achievable frame rates for c2.android.mpeg4.decoder video/mp4v-es 480x360:[43.186956521739134, 95.12608695652175]. Measured frame rate:[215.5960576145203, 215.68285190914435].
armeabi-v7a:
junit.framework.AssertionFailedError: Expected achievable frame rates for c2.android.mpeg4.decoder video/mp4v-es 480x360:[43.186956521739134, 95.12608695652175]. Measured frame rate:[261.5961776889531, 261.0502049746129].

arm64-v8a:
junit.framework.AssertionFailedError: Expected achievable frame rates for c2.android.mpeg4.decoder video/mp4v-es 480x360: [43.186956521739134, 95.12608695652175].Measured frame rate: [215.5960576145203, 215.68285190914435].
armeabi-v7a:
junit.framework.AssertionFailedError: Expected achievable frame rates for c2.android.mpeg4.decoder video/mp4v-es 480x360: [43.186956521739134, 95.12608695652175].Measured frame rate: [261.5961776889531, 261.0502049746129].

与上面的类似

=====================================================================================

CtsLocationFineTestCases
android.location.cts.fine.LocationManagerFineTest#testAddProviderRequestListener

expected not to be: null at android.location.cts.fine.LocationManagerFineTest.testAddProviderRequestListener(LocationManagerFineTest.java:859)

google 8月份的安全补丁导致的,使用最新的 daily build tool (12_r6) 可以 pass

=====================================================================================

CtsSecurityTestCases
android.security.cts.CertificateTest#testNoRemovedCertificates

junit.framework.AssertionFailedError: Missing CA certificates expected:<[]> but was:<[证书sha256]>

CTS 有测项禁止OEM沒有告知 Google 就自己增减预置证书,原因是删除了过期的根证书

=====================================================================================

CtsGraphicsTestCases
android.graphics.drawable.cts.AdaptiveIconMaskTest#testDeviceConfig_iconMask_useRoundIcon

java.lang.AssertionError: expected:<false> but was:<true>
at org.junit.Assert.fail(Assert.java:89)
at org.junit.Assert.failNotEquals(Assert.java:835)
at org.junit.Assert.assertEquals(Assert.java:120)
at org.junit.Assert.assertEquals(Assert.java:146)
at android.graphics.drawable.cts.AdaptiveIconMaskTest.testDeviceConfig_iconMask_useRoundIcon(AdaptiveIconMaskTest.java:141)

桌面图标修改圆角

=====================================================================================

CtsIntentSignatureTestCases
android.signature.cts.intent.IntentTest#shouldNotFindUnexpectedIntents

java.lang.AssertionError: [Package: com.google.android.tts Invalid Intent: [android.intent.action.ACTION_PACKAGE_CHANGED]]

gms 包更新到 22 年 1 月份导致的,回退 SpeechServicesByGoogle apk 到 12 月份

=====================================================================================

CtsMediaProviderTranscodeTests
android.mediaprovidertranscode.cts.TranscodeTest#testSameTranscodedFile_ContentResolver
android.mediaprovidertranscode.cts.TranscodeTest#testOriginalCallingUid_modernAppPassLegacyAppUid
android.mediaprovidertranscode.cts.TranscodeTest#testExtraMediaCapabilitiesHevcUnspecifiedFalse_ContentResolver
android.mediaprovidertranscode.cts.TranscodeTest#testGetOriginalMediaFormatFileDescriptor_onSuccess_returnsOriginalFileDescriptor
android.mediaprovidertranscode.cts.TranscodeTest#testTranscodingCacheClear
android.mediaprovidertranscode.cts.TranscodeTest#testTranscodedCacheReuse_FilePath

FAILURE: android.system.ErrnoException: read failed: EFAULT (Bad address)
关键log:
TranscodeHelper: Transcoding wait end: /storage/emulated/0/DCIM/Camera/TranscodeTestHEVC_585499525975.mp4. Uid: 10103. Timeout: true. Success: false session: {id: 1, status: STATUS_RUNNING, result: RESULT_NONE, progress: 38}
Timeout: true

【Ago平台】
请申请patch:ALPS06359285
【非ago平台】
You can get a waiver bug id:225819430
Google的回复:
Our MediaProvider owner has merged the change into the internal branch and the Google built MediaProvider module will be made available in the future.
The waiver could be granted only if you are shipping a device that’s preloading Google built MediaProvider.
CTS_12_R3 工具waiver的,R4 工具并不waiver,最后申请 waiver,google 也同意了

=====================================================================================

CtsWifiTestCases
android.net.wifi.cts.WifiManagerTest#testTetheredBridgedApWifiForcedChannel
android.net.wifi.cts.WifiManagerTest#testTetheredBridgedAp

junit.framework.AssertionFailedError: SoftAp state and info on bridged AP mode are mismatch!!! shouldFallbackSingleApMode = false, isEnabled = true

测试之前请关闭wifi 扫描
Please turn off Settings->Location->Location services->Wi-Fi scanning.

=====================================================================================

CtsPermissionTestCases
android.permission.cts.NearbyDevicesPermissionTest#testRequestBluetoothPermissionNeverForLocation31_GrantNearby
android.permission.cts.NearbyDevicesRenouncePermissionTest#scanRenouncingInMiddleOfChainNotesBluetoothButNotLocation
android.permission.cts.NearbyDevicesRenouncePermissionTest#scanRenouncingLocationNotesBluetoothButNotLocation

FAILURE: expected: FILTERED but was : FULL

方法:
1.将手机恢复出厂设置
2.不连wifi,打开蓝牙

=====================================================================================

CtsTelephonyTestCases
android.telephony.cts.SmsUsageMonitorShortCodeTest#testSmsShortCodeDestination

fail: java.lang.AssertionError: country: cz number: 90902 expected:<4> but was:<0>

google更新服务器脚本,谷歌有一笔更新SMS codes的代码,请合入以下 googlepatch:
https://android-review.googlesource.com/c/platform/frameworks/base/+/1772567/3/core/res/res/xml/sms_short_codes.xml#96

=====================================================================================

需要插白卡测试的cases
CtsOmapiTestCases
CtsSimAppDialogTestCases
CtsCarrierApiTestCases
必须插入Google 定义的UICC SIM卡才可以pass.(插入卡后,重启手机,设为默认SIM卡)

=====================================================================================

  1. STS 专区

StsHostTestCases [12_sts-r13]
android.security.sts.CVE_2021_0518#testPocCVE_2021_0518

由于合入2023年4月份的安全补丁导致,You Can get a waiver,bug id :274541381
Google 也会在 sts-14 工具进行修复,sts 工具的更新计划为每月的第一个周一,例如 sts-14 将在4月3日发布。


http://www.ppmy.cn/news/118423.html

相关文章

Lenovo X240/250锁定 Fn 键时 End 键工作不正常

Lenovo ThinkPadX240和X250&#xff0c;这两个机型的End键有点与众不同&#xff1a;在默认Fn键锁定的情况下&#xff0c;在普遍的编辑文档时&#xff0c;按Home键能正常返回行首&#xff0c;而End却并不会跑到行尾&#xff0c;只有取消Fn锁定才会有正常的效果。 Fn键锁定时&…

ThinkPad X240 Ubuntu 14.10 LTS 系统找不到wifi网络的解决方案 / 手动安装无线网卡驱动

笔记本型号&#xff1a;ThinkPad X240 系统&#xff1a;Ubuntu 14.10 LTS 问题&#xff1a;搜索不到无线wifi网络 原因&#xff1a;系统缺少无线网卡的驱动 解决问题的心路历程&#xff1a; 百度“ubuntu安装无线网卡驱动”&#xff0c;会有很多帖子告诉我这么做&#xff1…

wemos d1 r1点亮st7735s屏幕(Z180SN019)

使用wemos d1 r1点亮st7735s屏幕 wemos d1 r1是一个价格美丽但是资料很乱的板子&#xff0c;买来后闲置了很久&#xff0c;因为从淘宝入手了一块屏幕所以想用它点亮一下。 屏幕型号是Z180SN019。 板子&#xff1a; 屏幕引脚定义 库安装 打开arduino IDE&#xff0c;转到 文…

Linux下禁用T440s,X240的一体化触摸板(touchpad)

自打1月买了Thinkpad T440s就一直很火大&#xff0c;其中最让人恼火的莫过于触摸板。 Thinkpad的经典就包括用了小红点(TrackPoint)。但是小红点只能定位&#xff0c;还是需要鼠标的左右键的。但是自打T440s等开始启用了一体化触摸板&#xff0c;不再有实体的按键了。问题是要是…

联想thinkpad bios密码破解,t440,450,460,x240,250,260,x1c,yoga,y70,y50。。。。软件解密

联想thinkpad bios密码破解&#xff0c;t440&#xff0c;450&#xff0c;460&#xff0c;x240&#xff0c;250&#xff0c;260&#xff0c;x1c&#xff0c;yoga&#xff0c;y70&#xff0c;y50。。。。&#xff0c;软件解密&#xff0c;不需动主板。

thinkpad x240 (二)

开始量产出售了。官网有售&#xff0c;现在只有1366*768分辨率的屏。 12.5" HD (1366 x 768) 12.5" HD IPS (1366 x 768) 可能要到年底才有高分屏。 内存最大可上到8G&#xff0c; 硬盘类型可选。 HDD: 500GB / 1TB (5400 rpm) HDD: 500GB (7200 rpm) SSD: 128GB /…

thinkpad X240 安装Ubuntu14.04 系统并搭建android开发环境

x240 是比较新的笔记本。 开始不想用14.04的ubuntu&#xff0c; 因为12.04版本比较成熟了。 不料12.04非常不顺利&#xff0c; 不光x240驱动的问题&#xff0c; 在后来下载安装android工具库的时候也出问题&#xff0c; 甚至导致OS崩溃。 不得已尝试了ubuntu的14.04&#xff…

v3s kernel-3.4 sys_config.fex 以及调试ov5640 mipi camera

一. v3s 系统配置 1. 目录 app:用来存放demo ; buildroot:编译根文件系统以及产生交叉编译工具; prebuilt:存放一些开机启动的配置,wifi网络,camera,service,协议之类的; 例如: prebuilt\rootfs-override\etc\init.d\S90camera 配置了开机挂载camera 相关的驱…