cts 测试:testFlashTurnOff fail

问题描述

cts测试中遇到testFlashTurnOff fail .
err log:
java.lang.Exception: There were 4 errors: java.lang.Throwable(Test failed for camera 0: Invalid state 3 not in expected list[4, 2] (expected = -1, actual = -1) ) java.lang.Throwable(Test failed for camera 0: state 3 index -1 is expected to be >= 0: (expected = 0 was not greater than actual = -1) )
该项测试要求:
flash从on->off的状态是[4,2],
从off->on(flash_mode_torch下发之前),flash的状态要求是[2,4]
从off->on的状态是[4,3]
而在测试过程中因为开关灯延迟的原因,导致AP 拿到的flash state 不符合预期。

解决方案

[CTS9.0R13]CtsCameraTestCases fail

问题描述

CtsCameraTestCases
android.hardware.camera2.cts.RecordingTest#testBasicRecording
android.hardware.camera2.cts.RecordingTest#testRecordingFramerateLowToHigh
android.hardware.camera2.cts.RecordingTest#testBurstVideoSnapshot
android.hardware.camera2.cts.BurstCaptureTest#testYuvBurst
合入7月安全补丁导致 fail
Fail:
junit.framework.AssertionFailedError: Camera 0: Video duration doesn't match: recorded 3613.000000ms, expected [3003.000000,3003.000000]ms.
junit.framework.AssertionFailedError: Camera 0: Video frame drop rate too high: 9.859155%, tolerance 5.000000%. Video size: 3840x2160, expectedDuration [2666.666504,2666.666504], expectedFrameDuration 33.333332, frameDropCnt 7, frameCount 71
 junit.framework.AssertionFailedError: Camera 0: Video frame drop rate too high: 6.024096%, tolerance 5.000000%. Video size: 3840x2160, expectedDuration [2733.333252,2733.333252], expectedFrameDuration 33.333332, frameDropCnt 5, frameCount 83
junit.framework.AssertionFailedError: Cam 3: Burst frame duration mean 62401588.0 ns is larger than acceptable, expecting below 50000000 ns, allowing below 55000000
Line 77985: 01-01 02:17:56.552341   738 20835 W MDP     : DpIsp: 0xfb26a6c0, src 220 ms, 0, 0, 0, 0

解决方案

[CTS10R4]android.security.cts.StagefrightTest#testBug_67737022 fail

问题描述

CtsSecurityTestCases
android.security.cts.StagefrightTest#testBug_67737022
Fail:
Test failed to run to completion. Reason: 'Instrumentation run failed due to 'Process crashed.''. Check device logcat for details

[CTS10R4]android.security.cts.StagefrightTest#testStagefright_cve_2016_2454 fail

问题描述

CtsSecurityTestCases
android.security.cts.StagefrightTest#testStagefright_cve_2016_2454
Fail:
org.junit.runners.model.TestTimedOutException: test timed out after 900000 milliseconds

CTS10R3/VTS 10R3][Q GO]android.media.cts.MediaCodecCapabilitiesTest#testGetMaxSupportedInstances fail

问题描述

[CTS/VTS 10R3][QGO/512M]
[CTS][cts-on-gsi]
CtsMediaTestCases
android.media.cts.MediaCodecCapabilitiesTest#testGetMaxSupportedInstance
junit.framework.AssertionFailedError: In order to pass the test, please publish following codecs' concurrent instances limit in /etc/media_codecs.xml:
<MediaCodec name="OMX.MTK.AUDIO.DECODER.MP3" type="audio/mpeg" >
    <Limit name="concurrent-instances" max="16" />
</MediaCodec>

[CTS10R3][MT6771]android.video.cts.VideoEncoderDecoderTest#testAvcOther0Qual0320x0240 fail

问题描述

[CTS10R3][MT6771]
CtsVideoTestCases
android.video.cts.VideoEncoderDecoderTest#testAvcOther0Qual0320x0240
fail:
junit.framework.AssertionFailedError: rms error is bigger than the limit [1.705549439004595, 1.7481510867834686, 45.12865402872597, 45.55498948157783, 22.659392092463555, 12.045954830472251, 36.54067065917403, 21.267713558349428, 9.689990540071062, 6.778597281968527, 32.54079661662333, 9.445533041837525, 18.634087700889584, 6.7517520359944765, 20.300935747453178, 17.36366100029983, 46.599351736072705, 15.336949935803185, 17.07504797455437, 4.151855140911242] vs 20.0

這個是cache 機制差異的問題
6771 少了 HW access 後的invalidate ,這個測項後面接的是google SW codec 才會機率性fail

继续阅读“[CTS10R3][MT6771]android.video.cts.VideoEncoderDecoderTest#testAvcOther0Qual0320x0240 fail”

[CTS/VTS10R4]android.location.cts.GnssMeasurementValuesTest#testListenForGnssMeasurements

问题描述

CtsLocationTestCases
android.location.cts.GnssMeasurementValuesTest#testListenForGnssMeasurements
Fail:
junit.framework.AssertionFailedError: Failing tests are:
(Test: FAIL) Used Svs with no Meas: [GNSS_L1.5.19, GNSS_L1.1.3, GNSS_L1.3.2, GNSS_L1.5.1]

继续阅读“[CTS/VTS10R4]android.location.cts.GnssMeasurementValuesTest#testListenForGnssMeasurements”

[CTS10R3]android.hardware.camera2.cts.StillCaptureTest#testAeCompensation fail

问题描述

CtsCameraTestCases
android.hardware.camera2.cts.StillCaptureTest#testAeCompensation
Fail:
java.lang.Exception: There were 4 errors:
java.lang.Throwable(Test failed for camera 0: Exposure compensation ratio exceeds error tolerence: expected(0.015625) observed(0.061857). Normal exposure time 30000 us, sensitivity 431. Compensated exposure time 7271 us, sensitivity 110, value 3.958843000773395 is out of range [0.8, 1.2])
java.lang.Throwable(Test failed for camera 0: Exposure compensation ratio exceeds error tolerence: expected(0.031250) observed(0.062430). Normal exposure time 30000 us, sensitivity 493. Compensated exposure time 8394 us, sensitivity 110, value 1.997760649087221 is out of range [0.8, 1.2])
java.lang.Throwable(Test failed for camera 0: Exposure compensation ratio exceeds error tolerence: expected(32.000000) observed(15.938196). Normal exposure time 30000 us, sensitivity 455. Compensated exposure time 59999 us, sensitivity 3626, value 0.49806862179487177 is out of range [0.8, 1.2])
java.lang.Throwable(Test failed for camera 0: Exposure compensation ratio exceeds error tolerence: expected(64.000000) observed(16.076068). Normal exposure time 30000 us, sensitivity 524. Compensated exposure time 59999 us, sensitivity 4212, value 0.25118856154580155 is out of range [0.8, 1.2])

继续阅读“[CTS10R3]android.hardware.camera2.cts.StillCaptureTest#testAeCompensation fail”

cts 测试:testFlashTurnOff fail

问题描述

cts测试中遇到testFlashTurnOff fail .
err log:
java.lang.Exception: There were 4 errors: java.lang.Throwable(Test failed for camera 0: Invalid state 3 not in expected list[4, 2] (expected = -1, actual = -1) ) java.lang.Throwable(Test failed for camera 0: state 3 index -1 is expected to be &gt;= 0: (expected = 0 was not greater than actual = -1) )
该项测试要求:
flash从on->off的状态是[4,2],
从off->on(flash_mode_torch下发之前),flash的状态要求是[2,4]
从off->on的状态是[4,3]
而在测试过程中因为开关灯延迟的原因,导致AP 拿到的flash state 不符合预期。

解决方案

继续阅读“cts 测试:testFlashTurnOff fail”

[CTS10R3]CtsWindowManagerDeviceTestCases

问题描述

CtsWindowManagerDeviceTestCases

android.server.wm.ActivityManagerGetConfigTests#testDeviceConfig
android.server.wm.ActivityManagerGetConfigTests#testDeviceConfigWithSecondaryDisplay
Fail:

java.lang.AssertionError: Expected number of locales does not match expected:<1> but was:<0>
java.lang.AssertionError: Expected number of locales does not match expected:<1> but was:<0>

解决方案

继续阅读“[CTS10R3]CtsWindowManagerDeviceTestCases”

[CTS10R3]CtsVideoTestCases fail

问题描述

CtsVideoTestCases
android.video.cts.VideoEncoderDecoderTest#testAvcOther0Perf0320x0240
fail
junit.framework.AssertionFailedError: Expected achievable frame rates forOMX.MTK.VIDEO.ENCODER.AVC video/avc 320x240: [161.0, 561.0].
android.video.cts.VideoEncoderDecoderTest#testAvcOther0Perf0720x0480
fail
junit.framework.AssertionFailedError: Expected achievable frame rates for OMX.MTK.VIDEO.ENCODER.AVC video/avc 720x480: [67.0, 234.0].
android.video.cts.VideoEncoderDecoderTest#testAvcOther0Perf1280x0720
fail
junit.framework.AssertionFailedError: Expected achievable frame rates for OMX.MTK.VIDEO.ENCODER.AVC video/avc 1280x720: [29.0, 102.0].
android.video.cts.VideoEncoderDecoderTest#testAvcOther0Perf1920x1080
fail
junit.framework.AssertionFailedError: Expected achievable frame rates for OMX.MTK.VIDEO.ENCODER.AVC video/avc 1920x1080: [29.0, 102.0].android.media.cts.VideoDecoderPerfTest#testVp8Goog0Perf1920x1080

android.video.cts.VideoEncoderDecoderTest#testAvcGoog0Perf0720x0480
Fail:
junit.framework.AssertionFailedError: Expected achievable frame rates for c2.android.avc.encoder video/avc 720x480: [45.0, 156.0].
Measured frame rate: [31.523520894659264, 29.52814031772279].
at junit.framework.Assert.fail(Assert.java:50)
at junit.framework.Assert.assertTrue(Assert.java:20)
at junit.framework.Assert.assertNull(Assert.java:237)
at android.video.cts.VideoEncoderDecoderTest.doTest(VideoEncoderDecoderTest.java:844)
at android.video.cts.VideoEncoderDecoderTest.perf(VideoEncoderDecoderTest.java:206)
at android.video.cts.VideoEncoderDecoderTest.testAvcGoog0Perf0720x0480(VideoEncoderDecoderTest.java:243)
XML 提供的 google avc codec framerate range 不符合 CTS 預期

解决方案

继续阅读“[CTS10R3]CtsVideoTestCases fail”

[CTS10R3]android.media.cts.ImageReaderDecoderTest#testGoogH264Image

问题描述

CtsMediaTestCases
android.media.cts.ImageReaderDecoderTest#testGoogH264Image
android.media.cts.ImageReaderDecoderTest#testGoogH264ImageReader
android.media.cts.ImageReaderDecoderTest#testGoogH265Image
android.media.cts.ImageReaderDecoderTest#testGoogH265ImageReader
Fail:

 java.lang.RuntimeException: while c2.android.avc.decoder decoding swirl_132x130_h264: {color-format=2135033992, track-id=1, level=256, mime=video/avc, frame-count=31, profile=65536, language=und, display-width=132, csd-1=java.nio.HeapByteBuffer[pos=0 lim=9 cap=9], durationUs=2583333, display-height=130, width=132, max-input-size=1597, frame-rate=12, height=130, csd-0=java.nio.HeapByteBuffer[pos=0 lim=28 cap=28]}

解决方案

继续阅读“[CTS10R3]android.media.cts.ImageReaderDecoderTest#testGoogH264Image”

[CTS10R3]android.hardware.camera2.cts.ExtendedCameraCharacteristicsTest#testRecommendedStreamConfigurations fail

问题描述

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)

解决方案

继续阅读“[CTS10R3]android.hardware.camera2.cts.ExtendedCameraCharacteristicsTest#testRecommendedStreamConfigurations fail”

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


armeabi-v7a CtsSecurityHostTestCases
Test Result Details
android.security.cts.SELinuxHostTest#testNoBugreportDenials
fail
junit.framework.AssertionFailedError: Found illegal SELinux denial(s): avc: denied { getattr } for path="/mnt/expand" dev="tmpfs" ino=1586 scontext=u:r:dumpstate:s0 tcontext=u:object_r:mnt_expand_file:s0 tclass=dir permissive=0
这是因为从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   }
 
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:

解决方案

继续阅读“[CTSV10R1]USB Audio Peripheral Attributes Test fail”

[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

解决方案

继续阅读“[CTS10.0r1]CtsTelephonySdk28TestCases android.telephony.sdk28.cts.CellInfoTest#testCellInfoSdk28 fail”

[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
Fail:
java.lang.NullPointerException

解决方案

继续阅读“[CTS10R3]android.media.cts.HeifWriterTest”

[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
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 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)