分类: CTS
CtsCameraTestCases
android.hardware.camera2.cts.ExtendedCameraCharacteristicsTest#testRecommendedStreamConfigurations fail
junit.framework.AssertionFailedError: No valid YUV_420_888 and PRIVATE preview formats found in recommended preview configuration for ID: 0
at junit.framework.Assert.fail(Assert.java:50)
at junit.framework.Assert.assertTrue(Assert.java:20)
at android.hardware.camera2.cts.ExtendedCameraCharacteristicsTest.verifyRecommendedPreviewConfiguration(ExtendedCameraCharacteristicsTest.java:504)
at android.hardware.camera2.cts.ExtendedCameraCharacteristicsTest.testRecommendedStreamConfigurations(ExtendedCameraCharacteristicsTest.java:834)
at java.lang.reflect.Method.invoke(Native Method)
at junit.framework.TestCase.runTest(TestCase.java:168)
at junit.framework.TestCase.runBare(TestCase.java:134)
at junit.framework.TestResult$1.protect(TestResult.java:115)
at androidx.test.internal.runner.junit3.AndroidTestResult.runProtected(AndroidTestResult.java:73)
at junit.framework.TestResult.run(TestResult.java:118)
at androidx.test.internal.runner.junit3.AndroidTestResult.run(AndroidTestResult.java:51)
at junit.framework.TestCase.run(TestCase.java:124)
at androidx.test.internal.runner.junit3.NonLeakyTestSuite$NonLeakyTest.run(NonLeakyTestSuite.java:62)
at androidx.test.internal.runner.junit3.AndroidTestSuite$2.run(AndroidTestSuite.java:101)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:462)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at java.lang.Thread.run(Thread.java:919)
How to fix SELinuxHostTest#testNoBugreportDenials fail
问题描述
收到CTS 测试fail报告,如:
Module | Passed | Failed | Assumption Failure | Ignored | Total Tests | Done |
---|---|---|---|---|---|---|
armeabi-v7a CtsSecurityHostTestCases | 0 | 1 | 0 | 0 | 1 | true |
这是因为从Android Q开始 Google 新增了对dumpstate denials 的检查(AOSP/667966, AOSP/742461), 如果在执行Bugreport命令后,有出现dumpstate 的avc denied log,该测项就会fail.
Add CTS test to ensure bugreports don't generate SELinux denials.
This test takes a bugreport on the device and ensures that it does not
generate any dumpstate-related denials.
/cts/hostsidetests/security/src/android/cts/security/SELinuxHostTest.java
953 public void testNoBugreportDenials() throws Exception {
954 // Take a bugreport and get its logcat output.
955 mDevice.executeAdbCommand("logcat", "-c");
956 mDevice.getBugreport();
957 String log = mDevice.executeAdbCommand("logcat", "-d");
958 // Find all the dumpstate-related types and make a regex that will match them.
959 Set types = sepolicyAnalyzeGetTypesAssociatedWithAttribute("hal_dumpstate_server");
960 types.add("dumpstate");
961 String typeRegex = types.stream().collect(Collectors.joining("|"));
962 Pattern p = Pattern.compile("avc: *denied.*scontext=u:(?:r|object_r):(?:" + typeRegex + "):s0.*");
963 // Fail if logcat contains such a denial.
964 Matcher m = p.matcher(log);
965 StringBuilder errorString = new StringBuilder();
966 while (m.find()) {
967 errorString.append(m.group());
968 errorString.append("\n");
969 }
970 assertTrue("Found illegal SELinux denial(s): " + errorString, errorString.length() == 0);
971 }
954 // Take a bugreport and get its logcat output.
955 mDevice.executeAdbCommand("logcat", "-c");
956 mDevice.getBugreport();
957 String log = mDevice.executeAdbCommand("logcat", "-d");
958 // Find all the dumpstate-related types and make a regex that will match them.
959 Set types = sepolicyAnalyzeGetTypesAssociatedWithAttribute("hal_dumpstate_server");
960 types.add("dumpstate");
961 String typeRegex = types.stream().collect(Collectors.joining("|"));
962 Pattern p = Pattern.compile("avc: *denied.*scontext=u:(?:r|object_r):(?:" + typeRegex + "):s0.*");
963 // Fail if logcat contains such a denial.
964 Matcher m = p.matcher(log);
965 StringBuilder errorString = new StringBuilder();
966 while (m.find()) {
967 errorString.append(m.group());
968 errorString.append("\n");
969 }
970 assertTrue("Found illegal SELinux denial(s): " + errorString, errorString.length() == 0);
971 }
dumpstate 作为AOSP自带的process,我们一般不会改到它的源码。此类问题的出现,一般是因为新增了一些目录/文件,而没有给dumpstate添加allow rules 或者dontaudit rules, 操作有被触发时就会出现avc denied log,引起测项fail。
解决方案
继续阅读“How to fix SELinuxHostTest#testNoBugreportDenials fail”
[CTSVR3][its test][scene3][camera1]scene3/test_3a_consistency FAIL
问题描述
[its test][scene3][camera1]scene3/test_3a_consistency FAIL
该题原因是AE init清空m_u4Hbinwidth、m_u4Hbinheight再赋值的过程中,上层下了setAEMeteringArea(),m_u4Hbinwidth、m_u4Hbinheight为0导致Area计算错误,最终AE收敛发生变化的问题。
Its LOG一般可以看到三次的曝光设定差异太大导致的fail:
继续阅读“[CTSVR3][its test][scene3][camera1]scene3/test_3a_consistency FAIL”
[CTSV10R1]USB Audio Peripheral Attributes Test fail
问题描述
Audio Peripheral Attributes Test
通过OTG连接audio box,提示属性不匹配
Fail:
03-23 11:51:37.274 516 1447 D modules.usbaudio.audio_hal: usb:audio_hal::device_get_parameters() keys:sup_formats
03-23 11:51:37.274 516 1447 D modules.usbaudio.audio_hal: [USB_AUD] USB Name: 1 [VSL ]: USB-Audio - AudioBox 22 VSL, open path proc/asound/cards , isCTSDevice : 0, CTSkeyword:
03-23 11:51:37.274 516 1447 D modules.usbaudio.audio_hal: [USB_AUD] USB Name: 1 [VSL ]: USB-Audio - AudioBox 22 VSL, open path proc/asound/cards , isCTSDevice : 0, CTSkeyword:
解决方案
[CTS10.0r1]CtsTelephonySdk28TestCases android.telephony.sdk28.cts.CellInfoTest#testCellInfoSdk28 fail
问题描述
android.telephony.sdk28.cts.CellInfoTest#testCellInfoSdk28 fail
java.lang.AssertionError: TelephonyManager.getAllCellInfo() returned an empty list
解决方案
[CTS10R3]android.media.cts.HeifWriterTest
问题描述
CtsMediaTestCases
android.media.cts.HeifWriterTest#testInputBitmap_Grid_Handler
android.media.cts.HeifWriterTest#testInputBitmap_Grid_NoHandler
android.media.cts.HeifWriterTest#testInputBitmap_NoGrid_Handler
android.media.cts.HeifWriterTest#testInputBitmap_NoGrid_NoHandler
android.media.cts.HeifWriterTest#testInputBuffer_Grid_Handler
android.media.cts.HeifWriterTest#testInputBuffer_Grid_NoHandler
android.media.cts.HeifWriterTest#testInputBuffer_NoGrid_Handler
android.media.cts.HeifWriterTest#testInputBuffer_NoGrid_NoHandler
android.media.cts.HeifWriterTest#testInputSurface_Grid_Handler
android.media.cts.HeifWriterTest#testInputSurface_Grid_NoHandler
android.media.cts.HeifWriterTest#testInputSurface_NoGrid_Handler
android.media.cts.HeifWriterTest#testInputSurface_NoGrid_NoHandler
android.media.cts.HeifWriterTest#testInputBitmap_Grid_Handler
android.media.cts.HeifWriterTest#testInputBitmap_Grid_NoHandler
android.media.cts.HeifWriterTest#testInputBitmap_NoGrid_Handler
android.media.cts.HeifWriterTest#testInputBitmap_NoGrid_NoHandler
android.media.cts.HeifWriterTest#testInputBuffer_Grid_Handler
android.media.cts.HeifWriterTest#testInputBuffer_Grid_NoHandler
android.media.cts.HeifWriterTest#testInputBuffer_NoGrid_Handler
android.media.cts.HeifWriterTest#testInputBuffer_NoGrid_NoHandler
android.media.cts.HeifWriterTest#testInputSurface_Grid_Handler
android.media.cts.HeifWriterTest#testInputSurface_Grid_NoHandler
android.media.cts.HeifWriterTest#testInputSurface_NoGrid_Handler
android.media.cts.HeifWriterTest#testInputSurface_NoGrid_NoHandler
Fail:
java.lang.NullPointerException
解决方案
[CTS10R3]CtsMediaTestCases
问题描述
CtsMediaTestCases
android.media.cts.HeifWriterTest#testInputBitmap_Grid_Handler
android.media.cts.HeifWriterTest#testInputBitmap_Grid_NoHandler
android.media.cts.HeifWriterTest#testInputBitmap_NoGrid_Handler
android.media.cts.HeifWriterTest#testInputBitmap_NoGrid_NoHandler
android.media.cts.HeifWriterTest#testInputBuffer_Grid_Handler
android.media.cts.HeifWriterTest#testInputBuffer_Grid_NoHandler
android.media.cts.HeifWriterTest#testInputBuffer_NoGrid_Handler
android.media.cts.HeifWriterTest#testInputBuffer_NoGrid_NoHandler
android.media.cts.HeifWriterTest#testInputSurface_Grid_Handler
android.media.cts.HeifWriterTest#testInputSurface_Grid_NoHandler
android.media.cts.HeifWriterTest#testInputSurface_NoGrid_Handler
android.media.cts.HeifWriterTest#testInputSurface_NoGrid_NoHandler
android.media.cts.HeifWriterTest#testInputBitmap_Grid_NoHandler
android.media.cts.HeifWriterTest#testInputBitmap_NoGrid_Handler
android.media.cts.HeifWriterTest#testInputBitmap_NoGrid_NoHandler
android.media.cts.HeifWriterTest#testInputBuffer_Grid_Handler
android.media.cts.HeifWriterTest#testInputBuffer_Grid_NoHandler
android.media.cts.HeifWriterTest#testInputBuffer_NoGrid_Handler
android.media.cts.HeifWriterTest#testInputBuffer_NoGrid_NoHandler
android.media.cts.HeifWriterTest#testInputSurface_Grid_Handler
android.media.cts.HeifWriterTest#testInputSurface_Grid_NoHandler
android.media.cts.HeifWriterTest#testInputSurface_NoGrid_Handler
android.media.cts.HeifWriterTest#testInputSurface_NoGrid_NoHandler
Fail1:
java.util.concurrent.TimeoutException: timed out waiting for result
at androidx.heifwriter.HeifWriter$ResultWaiter.waitForResult(HeifWriter.java:683)
at androidx.heifwriter.HeifWriter.stop(HeifWriter.java:510)
at android.media.cts.HeifWriterTest.doTest(HeifWriterTest.java:501)
at androidx.heifwriter.HeifWriter.stop(HeifWriter.java:510)
at android.media.cts.HeifWriterTest.doTest(HeifWriterTest.java:501)
at android.media.cts.HeifWriterTest.doTestForVariousNumberImages(HeifWriterTest.java:265)
at android.media.cts.HeifWriterTest.testInputBitmap_Grid_Handler(HeifWriterTest.java:210)
Fail2:
java.lang.NullPointerException
at android.media.MediaCodec.native_setup(Native Method)
at android.media.MediaCodec.<init>(MediaCodec.java:1864)
at android.media.MediaCodec.createByCodecName(MediaCodec.java:1842)
at androidx.heifwriter.HeifEncoder.<init>(HeifEncoder.java:218)
at androidx.heifwriter.HeifWriter.<init>(HeifWriter.java:355)
at androidx.heifwriter.HeifWriter$Builder.build(HeifWriter.java:296)
at android.media.cts.HeifWriterTest.doTest(HeifWriterTest.java:450)
at android.media.cts.HeifWriterTest.doTestForVariousNumberImages(HeifWriterTest.java:265)
at android.media.cts.HeifWriterTest.testInputBitmap_Grid_Handler(HeifWriterTest.java:210)
[CTS9_R11][CtsUsageStatsTestCases
问题描述
android.app.usage.cts.NetworkUsageStatsTest#testAppDetails
android.app.usage.cts.NetworkUsageStatsTest#testAppSummary
android.app.usage.cts.NetworkUsageStatsTest#testCallback
android.app.usage.cts.NetworkUsageStatsTest#testDeviceSummary
android.app.usage.cts.NetworkUsageStatsTest#testTagDetails
android.app.usage.cts.NetworkUsageStatsTest#testUidDetails
android.app.usage.cts.NetworkUsageStatsTest#testUidTagStateDetails
android.app.usage.cts.NetworkUsageStatsTest#testUserSummary
android.app.usage.cts.NetworkUsageStatsTest#testAppSummary
android.app.usage.cts.NetworkUsageStatsTest#testCallback
android.app.usage.cts.NetworkUsageStatsTest#testDeviceSummary
android.app.usage.cts.NetworkUsageStatsTest#testTagDetails
android.app.usage.cts.NetworkUsageStatsTest#testUidDetails
android.app.usage.cts.NetworkUsageStatsTest#testUidTagStateDetails
android.app.usage.cts.NetworkUsageStatsTest#testUserSummary
Fail:
junit.framework.AssertionFailedError: android.hardware.wifi is a reported system feature, however no corresponding connected network interface was found or the attempt to connect has timed out (timeout = 15000ms). Please make sure you are connected to a WiFi access point.
解决方案
[CTS10R3]android.hardware.cts.CameraTest#testImmediateZoom
问题描述
CtsCameraTestCases
android.hardware.cts.CameraTest#testImmediateZoom fail:
java.lang.RuntimeException: startPreview failed
CTS CameraTest#testImmediateZoom可能會打中ISP限制導致fail
解决方案
继续阅读“[CTS10R3]android.hardware.cts.CameraTest#testImmediateZoom”
[CTS10R3] CtsProviderUiTestCases fail
问题描述
CtsProviderUiTestCases
android.providerui.cts.MediaStoreUiTest#testImageCaptureWithInadequeteLocationPermissions[0]
android.providerui.cts.MediaStoreUiTest#testGetDocumentUri[0]
android.providerui.cts.MediaStoreUiTest#testGetDocumentUri_ThrowsWithoutPermission[0]
android.providerui.cts.MediaStoreUiTest#testGetDocumentUri_Symmetry[0]
android.providerui.cts.MediaStoreUiTest#testGetDocumentUri[0]
android.providerui.cts.MediaStoreUiTest#testGetDocumentUri_ThrowsWithoutPermission[0]
android.providerui.cts.MediaStoreUiTest#testGetDocumentUri_Symmetry[0]
Fail:
java.lang.AssertionError: Expected to get a IMAGE_CAPTURE result; your camera app should respond to the CAMERA and DPAD_CENTER keycodes
解决方案
在非GO的EEA项目跑CTS Express脚本发生Error!!! Assistant icon is not on screen +1 on EEA build问题
问题描述
在非GO的EEA项目跑CTS Express脚本发生Error!!! Assistant icon is not on screen +1 on EEA build问题
解决方案
继续阅读“在非GO的EEA项目跑CTS Express脚本发生Error!!! Assistant icon is not on screen +1 on EEA build问题”
[CTS10R2]android.appsecurity.cts.AdoptableHostTest#testEjected
问题描述
android.hardware.camera2.cts.StillCaptureTest#testAeCompensation
Fail:
java.lang.Exception: There were 8 errors:
java.lang.Throwable(Test failed for camera 0: Exposure compensation ratio exceeds error tolerence: expected(0.250000) observed(1.000000). Normal exposure time 30001 us, sensitivity 156. Compensated exposure time 30001 us, sensitivity 156, value 4.0 is out of range [0.8, 1.2])
java.lang.Throwable(Test failed for camera 0: Exposure compensation ratio exceeds error tolerence: expected(0.500000) observed(1.000000). Normal exposure time 30001 us, sensitivity 156. Compensated exposure time 30001 us, sensitivity 156, value 2.0 is out of range [0.8, 1.2])
继续阅读“[CTS10R2]android.appsecurity.cts.AdoptableHostTest#testEjected”
[CTS10R2]CtsMediaTestCases
问题描述
CtsMediaTestCases
android.media.cts.VideoDecoderPerfTest#testAvcOther1Perf0320x0240
android.media.cts.VideoDecoderPerfTest#testAvcOther1Perf0720x0480
android.media.cts.VideoDecoderPerfTest#testAvcOther1Perf1280x0720
android.media.cts.VideoDecoderPerfTest#testAvcOther1Perf1920x1080
Fail:
junit.framework.AssertionFailedError: Failed to get achievable frame rates for OMX.MTK.VIDEO.DECODER.AVC.l3 video/avc 320x240
junit.framework.AssertionFailedError: Failed to get achievable frame rates for OMX.MTK.VIDEO.DECODER.AVC.l3 video/avc 320x240
junit.framework.AssertionFailedError: Failed to get achievable frame rates for OMX.MTK.VIDEO.DECODER.AVC.l3 video/avc 720x480
junit.framework.AssertionFailedError: Failed to get achievable frame rates for OMX.MTK.VIDEO.DECODER.AVC.l3 video/avc 1280x720
junit.framework.AssertionFailedError: Failed to get achievable frame rates for OMX.MTK.VIDEO.DECODER.AVC.l3 video/avc 1920x1080
junit.framework.AssertionFailedError: Failed to get achievable frame rates for OMX.MTK.VIDEO.DECODER.AVC.l3 video/avc 720x480
junit.framework.AssertionFailedError: Failed to get achievable frame rates for OMX.MTK.VIDEO.DECODER.AVC.l3 video/avc 1280x720
junit.framework.AssertionFailedError: Failed to get achievable frame rates for OMX.MTK.VIDEO.DECODER.AVC.l3 video/avc 1920x1080
解决方案
[CTS10R2]android.view.cts.ASurfaceControlTest#testSurfaceTransaction_setColorAndBuffer_bufferAlpha_0_5
问题描述
CtsViewTestCases
android.view.cts.ASurfaceControlTest#testSurfaceTransaction_setColorAndBuffer_bufferAlpha_0_5
Fail:
java.lang.SecurityException: Permission Denial: startForeground from pid=20136, uid=10154 requires android.permission.INSTANT_APP_FOREGROUND_SERVICE
解决方案
[CTS/GTS/VTS]需要插白卡测试的cases
问题描述
CtsOmapiTestCases
CtsSimAppDialogTestCases
CtsCarrierApiTestCases
解决方案
[CTS-10.0_R2]CTS测试过程中,出现多次 permissionController 停止运行
问题描述
挂测CTS过程中,出现多次 permissionController 停止运行,导致CTS无法正常挂测
02-13 11:31:46.354 10052 1622 1622 E AndroidRuntime: FATAL EXCEPTION: main
02-13 11:31:46.354 10052 1622 1622 E AndroidRuntime: Process: com.android.permissioncontroller, PID: 1622
02-13 11:31:46.354 10052 1622 1622 E AndroidRuntime: java.lang.IllegalArgumentException: Unknown package: android.tradefed.contentprovider
解决方案
[CTS10.0_r2]CtsSecureElementAccessControlTestCases
问题描述
CtsSecureElementAccessControlTestCases1[instant]
android.omapi.accesscontrol1.cts.AccessControlTest#testAuthorizedAPDUAID40
android.omapi.accesscontrol1.cts.AccessControlTest#testAuthorizedAPDUAID41
android.omapi.accesscontrol1.cts.AccessControlTest#testUnauthorizedAID
android.omapi.accesscontrol1.cts.AccessControlTest#testUnauthorisedAPDUAID40
android.omapi.accesscontrol1.cts.AccessControlTest#testUnauthorisedAPDUAID41
android.omapi.accesscontrol1.cts.AccessControlTest#testAuthorizedAID
android.omapi.accesscontrol1.cts.AccessControlTest#testAuthorizedAPDUAID41
android.omapi.accesscontrol1.cts.AccessControlTest#testUnauthorizedAID
android.omapi.accesscontrol1.cts.AccessControlTest#testUnauthorisedAPDUAID40
android.omapi.accesscontrol1.cts.AccessControlTest#testUnauthorisedAPDUAID41
android.omapi.accesscontrol1.cts.AccessControlTest#testAuthorizedAID
fail
java.lang.AssertionError
java.lang.AssertionError
[CTS10.0r2] android.view.cts.PixelCopyTest#testVideoProducer fail
问题描述
CtsViewTestCases
android.view.cts.PixelCopyTest#testVideoProducer
Fail:
java.lang.AssertionError: Top right
解决方案
继续阅读“[CTS10.0r2] android.view.cts.PixelCopyTest#testVideoProducer fail”
[CTS verifier]Set permitted input methods
问题描述
BYOD Managed Provisiong->Policy transparency test->Set permitted input methods
解决方案
[CTS10.0_r2]android.media.cts.MediaCodecTest#testPrependHeadersToSyncFrames fail
问题描述
CtsMediaTestCases
android.media.cts.MediaCodecTest#testPrependHeadersToSyncFrames
android.media.cts.MediaCodecCapabilitiesTest#testAllNonTunneledVideoCodecsSupportFlexibleYUV
android.media.cts.MediaCodecCapabilitiesTest#testAllNonTunneledVideoCodecsSupportFlexibleYUV
Fail:
junit.framework.AssertionFailedError: OMX.MTK.VIDEO.DECODER.DIVX is not a video encoder, so it should not fail to configure.
java.lang.IllegalArgumentException