From f0e67d568b74ba6f7b8a3981e2c909496e87d724 Mon Sep 17 00:00:00 2001 From: bhanucbp <141142298+bhanucbp@users.noreply.github.com> Date: Wed, 21 Aug 2024 17:59:57 +0100 Subject: [PATCH] gh#100: dsVideoPort: Add L1 and L2 Test cases for ALLM APIs Addressed review comments --- src/test_l1_dsVideoPort.c | 28 ++++++++++++++++++++++++---- 1 file changed, 24 insertions(+), 4 deletions(-) diff --git a/src/test_l1_dsVideoPort.c b/src/test_l1_dsVideoPort.c index 5c3757b..bf3aa74 100644 --- a/src/test_l1_dsVideoPort.c +++ b/src/test_l1_dsVideoPort.c @@ -5046,7 +5046,12 @@ void test_l1_dsVideoPort_negative_dsGetAllmEnabled(void) { // Step 03: Call dsGetAllmEnabled with invalid handle status = dsGetAllmEnabled(handle, &enabled ); - UT_ASSERT_EQUAL(status, dsERR_INVALID_PARAM); + if (gSourceType == 1) { + UT_ASSERT_EQUAL(status, dsERR_INVALID_PARAM); + } + else if (gSourceType == 0) { + UT_ASSERT_EQUAL(status, dsERR_OPERATION_NOT_SUPPORTED); + } // Step 04: Get the port handle for supported video ports for (int i = 0; i < gDSvideoPort_NumberOfPorts; i++) { @@ -5073,7 +5078,12 @@ void test_l1_dsVideoPort_negative_dsGetAllmEnabled(void) { // Step 07: Attempt to get ALLM Status after termination status = dsGetAllmEnabled(valid_handle, &enabled ); - CHECK_FOR_EXTENDED_ERROR_CODE(status, dsERR_NOT_INITIALIZED, dsERR_INVALID_PARAM); + if (gSourceType == 1) { + CHECK_FOR_EXTENDED_ERROR_CODE(status, dsERR_NOT_INITIALIZED, dsERR_INVALID_PARAM); + } + else if (gSourceType == 0) { + UT_ASSERT_EQUAL(status, dsERR_OPERATION_NOT_SUPPORTED); + } UT_LOG_INFO("\n Out %s\n", __FUNCTION__); } @@ -5192,7 +5202,12 @@ void test_l1_dsVideoPort_negative_dsSetAllmEnabled(void) { // Step 03: Call dsSetAllmEnabled with invalid handle status = dsSetAllmEnabled(handle, true ); - UT_ASSERT_EQUAL(status, dsERR_INVALID_PARAM); + if (gSourceType == 1) { + UT_ASSERT_EQUAL(status, dsERR_INVALID_PARAM); + } + else if (gSourceType == 0) { + UT_ASSERT_EQUAL(status, dsERR_OPERATION_NOT_SUPPORTED); + } // Step 04: Get the port handle for supported video ports for (int i = 0; i < gDSvideoPort_NumberOfPorts; i++) { @@ -5211,7 +5226,12 @@ void test_l1_dsVideoPort_negative_dsSetAllmEnabled(void) { // Step 06: Attempt to enable ALLM Status after termination status = dsSetAllmEnabled(valid_handle, true ); - CHECK_FOR_EXTENDED_ERROR_CODE(status, dsERR_NOT_INITIALIZED, dsERR_INVALID_PARAM); + if (gSourceType == 1) { + CHECK_FOR_EXTENDED_ERROR_CODE(status, dsERR_NOT_INITIALIZED, dsERR_INVALID_PARAM); + } + else if (gSourceType == 0) { + UT_ASSERT_EQUAL(status, dsERR_OPERATION_NOT_SUPPORTED); + } UT_LOG("\n Out %s\n", __FUNCTION__); }