diff options
author | Avichal Rakesh <arakesh@google.com> | 2022-03-22 13:52:36 -0700 |
---|---|---|
committer | Avichal Rakesh <arakesh@google.com> | 2022-03-22 16:07:25 -0700 |
commit | e1685a735ed23a66305beb779d16cebb258177fc (patch) | |
tree | b890d8672b597e86e085daf853adc62ed76ea0ae /camera/provider/aidl/vts/VtsAidlHalCameraProvider_TargetTest.cpp | |
parent | 5c74cb3ddf98cce54d7c9d8fed6e418027555ab0 (diff) |
Camera: Fix test to use 64 bit pointer in stream use cases
I23a4324602 updated stream use cases to use 64 bit integers. The
`configureStreamUseCases` test was still using a pointer to 32 bit
integer to determine supported use cases. This CL updates how supported
use cases are populated to use a pointer to 64 bit integers instead.
Bug: 226171215
Test: `configureStreamUseCases` which was failing on cuttlefish is now
passing
Change-Id: I5b1ef4e8e344e43b10ea5c992afaace03608660d
Diffstat (limited to 'camera/provider/aidl/vts/VtsAidlHalCameraProvider_TargetTest.cpp')
-rw-r--r-- | camera/provider/aidl/vts/VtsAidlHalCameraProvider_TargetTest.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/camera/provider/aidl/vts/VtsAidlHalCameraProvider_TargetTest.cpp b/camera/provider/aidl/vts/VtsAidlHalCameraProvider_TargetTest.cpp index af83578ef4..bde56b315c 100644 --- a/camera/provider/aidl/vts/VtsAidlHalCameraProvider_TargetTest.cpp +++ b/camera/provider/aidl/vts/VtsAidlHalCameraProvider_TargetTest.cpp @@ -2989,8 +2989,8 @@ TEST_P(CameraAidlTest, configureStreamsUseCases) { auto retcode = find_camera_metadata_ro_entry( staticMeta, ANDROID_SCALER_AVAILABLE_STREAM_USE_CASES, &entry); if ((0 == retcode) && (entry.count > 0)) { - supportedUseCases.insert(supportedUseCases.end(), entry.data.i32, - entry.data.i32 + entry.count); + supportedUseCases.insert(supportedUseCases.end(), entry.data.i64, + entry.data.i64 + entry.count); } else { supportedUseCases.push_back(ANDROID_SCALER_AVAILABLE_STREAM_USE_CASES_DEFAULT); } @@ -3034,12 +3034,13 @@ TEST_P(CameraAidlTest, configureStreamsUseCases) { bool combSupported; ret = cameraDevice->isStreamCombinationSupported(config, &combSupported); - ASSERT_TRUE((ret.isOk()) || (static_cast<int32_t>(Status::OPERATION_NOT_SUPPORTED) == - ret.getServiceSpecificError())); - if (ret.isOk()) { - ASSERT_EQ(combSupported, useCaseSupported); + if (static_cast<int32_t>(Status::OPERATION_NOT_SUPPORTED) == + ret.getServiceSpecificError()) { + continue; } + ASSERT_TRUE(ret.isOk()); + ASSERT_EQ(combSupported, useCaseSupported); std::vector<HalStream> halStreams; ret = mSession->configureStreams(config, &halStreams); |