mirror of
https://github.com/Evolution-X/hardware_interfaces
synced 2026-02-01 11:36:00 +00:00
Update CameraStreamBuffering test case
CameraStreamBuffering test case intentionally calls
setMaxFramesInFight() with very large integer value to verify that API
handles unreasonaly large value properly. A type of its parameter is
changed from unsigned 32-bit integer to signed 32-bit integer in the
latest EVS interface definition written in the stable AIDL. To adapt a
test case, this CL updates it to use std::numeric_limits<int32_t>::max()
instead of 0xFFFFFFFF, which is translated as -1 in signed 32-bit integer
format.
Bug: 226628778
Test: atest VtsHalEvsV1_1TargetTest
atest VtsHalEvsTargetTest
Change-Id: Ic35c6c962617825bc271cec8544770340db7728a
This commit is contained in:
@@ -563,7 +563,8 @@ TEST_P(EvsHidlTest, CameraStreamBuffering) {
|
||||
activeCameras.push_back(pCam);
|
||||
|
||||
// Ask for a very large number of buffers in flight to ensure it errors correctly
|
||||
Return<EvsResult> badResult = pCam->setMaxFramesInFlight(0xFFFFFFFF);
|
||||
Return<EvsResult> badResult =
|
||||
pCam->setMaxFramesInFlight(std::numeric_limits<int32_t>::max());
|
||||
EXPECT_EQ(EvsResult::BUFFER_NOT_AVAILABLE, badResult);
|
||||
|
||||
// Now ask for exactly two buffers in flight as we'll test behavior in that case
|
||||
|
||||
@@ -526,7 +526,7 @@ TEST_P(EvsAidlTest, CameraStreamBuffering) {
|
||||
mActiveCameras.push_back(pCam);
|
||||
|
||||
// Ask for a very large number of buffers in flight to ensure it errors correctly
|
||||
auto badResult = pCam->setMaxFramesInFlight(0xFFFFFFFF);
|
||||
auto badResult = pCam->setMaxFramesInFlight(std::numeric_limits<int32_t>::max());
|
||||
EXPECT_TRUE(!badResult.isOk() && badResult.getServiceSpecificError() ==
|
||||
static_cast<int>(EvsResult::INVALID_ARG));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user