Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gh #277 dsVideoPort L3 for an API dsSetAllmEnabled #279

Open
wants to merge 5 commits into
base: develop
Choose a base branch
from

Conversation

KarthikeyanR470
Copy link
Contributor

@KarthikeyanR470 KarthikeyanR470 commented Dec 18, 2024

Added L3 test case for dsSetAllmEnabled

@KarthikeyanR470 KarthikeyanR470 linked an issue Dec 19, 2024 that may be closed by this pull request
@KarthikeyanR470 KarthikeyanR470 changed the title gh #277 Added a L3 for an API dsSetAllmEnabled gh #277 dsVideoPort L3 for an API dsSetAllmEnabled Dec 19, 2024
]

# Convert input arguments to strings and update the prompts
promptWithAnswers[0]["input"] = str(video_port)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could you please directly assign strings to input like below.
"input": str(video_port)
"input": str(port_index)
"input": str(mode)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, all other methods follow a similar approach of assigning strings to the input. Therefore, I maintained the same format in this API for consistency.

# Loop through supported video ports and verify ALLM Mode
for port, index in self.testdsVideoPort.getSupportedPorts():
self.testEnablePort(port, index)
# Set the ALLM Mode as Enable
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could you please add stepstart form here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, all other methods test cases follow a similar approach of adding stepstart . Therefore, I maintained the same format in this test_case for consistency.

for port, index in self.testdsVideoPort.getSupportedPorts():
self.testEnablePort(port, index)
# Set the ALLM Mode as Enable
self.testdsVideoPort.setAllmMode(port, index, 'Enable')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here we are setting the ALLM mode , why cant we verify through the getAllmMode.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, the verification is performed using an AV analyzer to directly observe the ALLM status and ensure compliance with HDMI specifications. Therefore, the getAllmMode method is not utilized in this context.


UT_LOG_INFO("Calling dsGetAllmEnabled(IN:Handle:[0x%0X],OUT:ALLM_Status:[]) ", gHandle);
status = dsGetAllmEnabled(gHandle, &AllmMode);
UT_LOG_INFO("Result dsGetAllmEnabled(IN:Handle:[0x%0X],OUT:ALLM_Status:[%s]) ,dsError_t=[%s]",gHandle, AllmMode,\
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could you please make the code aligned here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated


UT_LOG_INFO("Calling dsSetAllmEnabled(IN:Handle:[0x%0X],IN:ALLM_Status:[]) ", gHandle);
status = dsSetAllmEnabled(gHandle, choice);
UT_LOG_INFO("Result dsSetAllmEnabled(IN:Handle:[0x%0X],IN:ALLM_Status:[%s]) ,dsError_t=[%s]",gHandle, UT_Control_GetMapString(boolMappingTable, choice),\
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please make the code aligned here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated

void dsVideoPort_GetAllmEnabled()
{
dsError_t status = dsERR_NONE;
bool AllmMode;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AllmMode ,assign with the default value.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated with default value.

bool: Result of the ALLM mode verification.
"""
if manual == True:
#hdcpVersion = self.testdsVideoPort.getHDCPVersion()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you please remove the commented line if it is not required.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed the commented line.

Copy link
Contributor

@hari22yuva hari22yuva left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please check review comments

@@ -56,6 +56,7 @@ Below are top test use-case for the video port.
|7|Resets the video output to `SDR` for Source |Play the `HDR` stream and verify the video content formats|`dsResetOutputToSDR()`|`Y`|`NA`|1|
|8|Select preferred color depth for Source|Select the Color depth from Supported list & verify|`dsSetPreferredColorDepth()`|`Y`|`NA`|`NA`|
|9|sets the background color for Source |Select the background color form supported list & verify|`dsSetBackgroundColor()`|`Y`|`NA`|`NA`|
|10|Enables/Disables ALLM mode for HDMI output video port |Select the ALLM mode for HDMI output video port and verify|`dsSetAllmEnabled()`|`Y`|`NA`|`NA`|
Copy link
Contributor

@hari22yuva hari22yuva Dec 20, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if not add in ds-video-port_High-Level_TestSpec.md please add ALLM mode test case

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated ALLm mode test case in ds-video-port_High-Level_TestSpec.md

if(choice < 0 || choice > 1)
{
UT_LOG_ERROR("\nInvalid ALLM mode selected\n");
goto exit;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

don't use goto

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed the goto and updated the code.

}

UT_LOG_INFO("Calling dsSetAllmEnabled(IN:Handle:[0x%0X],IN:ALLM_Status:[]) ", gHandle);
status = dsSetAllmEnabled(gHandle, choice);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add
DS_ASSERT(status == dsERR_NONE);

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added DS_ASSERT(status == dsERR_NONE);


UT_LOG_INFO("Calling dsGetAllmEnabled(IN:Handle:[0x%0X],OUT:ALLM_Status:[]) ", gHandle);
status = dsGetAllmEnabled(gHandle, &AllmMode);
UT_LOG_INFO("Result dsGetAllmEnabled(IN:Handle:[0x%0X],OUT:ALLM_Status:[%s]) ,dsError_t=[%s]",gHandle, AllmMode,\
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

allmode is a bool so add
UT_Control_GetMapString(boolMappingTable, AllmMode)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added UT_Control_GetMapString(boolMappingTable, AllmMode)

dsVideoPort_getHandle();

UT_LOG_INFO("Calling dsGetAllmEnabled(IN:Handle:[0x%0X],OUT:ALLM_Status:[]) ", gHandle);
status = dsGetAllmEnabled(gHandle, &AllmMode);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add
DS_ASSERT(status == dsERR_NONE);

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added DS_ASSERT(status == dsERR_NONE);


result = self.utMenu.select(self.testSuite, "Set AllmMode", promptWithAnswers)


Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add dsGetAllmEnabled() in the class ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added dsGetAllmEnabled() in the class

"""
if manual == True:
#hdcpVersion = self.testdsVideoPort.getHDCPVersion()
return self.testUserResponse.getUserYN(f'Is ALLM Mode (Enable/Disable) is displayed on Analyzer (Y/N): ')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to specify the is enabled or disabled not both
like is ALLM Mode Enabled ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated for respective modes seperately.

#!/usr/bin/env python3
#** *****************************************************************************
# *
# * If not stated otherwise in this file or this component's LICENSE file the
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please update this test case to run all source python

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated the file dsVideoPort_RunAll_L3_SinkTest.py

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request L3 Work Element
Projects
Status: Under Review
Development

Successfully merging this pull request may close these issues.

dsVideoPort: Handle L3 for an API dsSetAllmEnabled
4 participants