-
- gRet = hal_drm_hdcp_close(gHalHandle);
- ASSERT_EQ(gRet, HAL_DRM_ERROR_NONE);
-}
-
-/**
- * @testcase HdcpOpenP
- * @since HAL_MODULE_DRM 1.0
- * @author SR(haesu.gwon)
- * @reviewer SR(gilbok)
- * @type auto
- * @description Positive, Open HDCP
- * @apicovered hal_drm_hdcp_open
- * @passcase when hal_drm_hdcp_open returns HAL_DRM_ERROR_NONE
- * @failcase when hal_drm_hdcp_open does not return HAL_DRM_ERROR_NONE
- * @precondition None
- * @postcondition None
- */
-TEST_F(DrmHalTest, HdcpOpenP)
-{
- gRet = hal_drm_hdcp_open(gHalHandle, HAL_DRM_HDCP_DEVICE_RECEIVER, HAL_DRM_HDCP_VERSION_2_0);
- ASSERT_EQ(gRet, HAL_DRM_ERROR_NONE);
-}
-
-/**
- * @testcase HdcpCloseP
- * @since HAL_MODULE_DRM 1.0
- * @author SR(haesu.gwon)
- * @reviewer SR(gilbok)
- * @type auto
- * @description Positive, Close HDCP
- * @apicovered hal_drm_hdcp_close
- * @passcase when hal_drm_hdcp_close returns HAL_DRM_ERROR_NONE
- * @failcase when hal_drm_hdcp_close does not return HAL_DRM_ERROR_NONE
- * @precondition None
- * @postcondition None
- */
-TEST_F(DrmHalTest, HdcpCloseP)
-{
- gRet = hal_drm_hdcp_open(gHalHandle, HAL_DRM_HDCP_DEVICE_RECEIVER, HAL_DRM_HDCP_VERSION_2_0);
- ASSERT_EQ(gRet, HAL_DRM_ERROR_NONE);
-
- gRet = hal_drm_hdcp_close(gHalHandle);
- ASSERT_EQ(gRet, HAL_DRM_ERROR_NONE);
-}
-
-/**
- * @testcase HdcpCloseN
- * @since HAL_MODULE_DRM 1.0
- * @author SR(haesu.gwon)
- * @reviewer SR(gilbok)
- * @type auto
- * @description Negative, Close HDCP
- * @apicovered hal_drm_hdcp_close
- * @passcase when hal_drm_hdcp_open is not called and hal_drm_hdcp_close returns HAL_DRM_ERROR_INVALID_STATE
- * @failcase when hal_drm_hdcp_close does not return HAL_DRM_ERROR_INVALID_STATE
- * @precondition None
- * @postcondition None
- */
-TEST_F(DrmHalTest, HdcpCloseN1)
-{
- gRet = hal_drm_hdcp_close(gHalHandle);
- ASSERT_EQ(gRet, HAL_DRM_ERROR_INVALID_STATE);
-}
-
-/**
- * @testcase HdcpCloseN
- * @since HAL_MODULE_DRM 1.0
- * @author SR(haesu.gwon)
- * @reviewer SR(gilbok)
- * @type auto
- * @description Negative, Close HDCP
- * @apicovered hal_drm_hdcp_close
- * @passcase when hal_drm_hdcp_close returns HAL_DRM_ERROR_INVALID_PARAMETER
- * @failcase when hal_drm_hdcp_close does not return HAL_DRM_ERROR_INVALID_PARAMETER
- * @precondition None
- * @postcondition None
- */
-TEST_F(DrmHalTest, HdcpCloseN2)
-{
- gRet = hal_drm_hdcp_open(gHalHandle, HAL_DRM_HDCP_DEVICE_RECEIVER, HAL_DRM_HDCP_VERSION_2_0);
- ASSERT_EQ(gRet, HAL_DRM_ERROR_NONE);
-
- gRet = hal_drm_hdcp_close(nullptr);
- ASSERT_EQ(gRet, HAL_DRM_ERROR_INVALID_PARAMETER);
-}
-
-/**
- * @testcase HdcpStartReceiverP
- * @since HAL_MODULE_DRM 1.0
- * @author SR(haesu.gwon)
- * @reviewer SR(gilbok)
- * @type auto
- * @description Positive, Start HDCP receiver
- * @apicovered hal_drm_hdcp_start_receiver
- * @passcase when hal_drm_hdcp_start_receiver returns HAL_DRM_ERROR_NONE
- * @failcase when hal_drm_hdcp_start_receiver does not return HAL_DRM_ERROR_NONE
- * @precondition None
- * @postcondition None
- */
-TEST_F(DrmHalTest, HdcpStartReceiverP)
-{
- uint32_t hdcp_id = 0;
-
- gRet = hal_drm_hdcp_open(gHalHandle, HAL_DRM_HDCP_DEVICE_RECEIVER, HAL_DRM_HDCP_VERSION_2_0);
- ASSERT_EQ(gRet, HAL_DRM_ERROR_NONE);
-
- gRet = hal_drm_hdcp_start_receiver(gHalHandle, 100, &hdcp_id);
- ASSERT_EQ(gRet, HAL_DRM_ERROR_NONE);
-
- gRet = hal_drm_hdcp_close(gHalHandle);
- ASSERT_EQ(gRet, HAL_DRM_ERROR_NONE);
-}
-
-/**
- * @testcase HdcpStartReceiverN
- * @since HAL_MODULE_DRM 1.0
- * @author SR(haesu.gwon)
- * @reviewer SR(gilbok)
- * @type auto
- * @description Negative, Start HDCP receiver
- * @apicovered hal_drm_hdcp_start_receiver
- * @passcase when hal_drm_hdcp_start_receiver returns HAL_DRM_ERROR_INVALID_STATE
- * @failcase when hal_drm_hdcp_start_receiver does not return HAL_DRM_ERROR_INVALID_STATE
- * @precondition None
- * @postcondition None
- */
-TEST_F(DrmHalTest, HdcpStartReceiverN1)
-{
- uint32_t hdcp_id = 0;
-
- gRet = hal_drm_hdcp_start_receiver(gHalHandle, 100, &hdcp_id);
- ASSERT_EQ(gRet, HAL_DRM_ERROR_INVALID_STATE);
-}
-
-/**
- * @testcase HdcpStartReceiverN2
- * @since HAL_MODULE_DRM 1.0
- * @author SR(haesu.gwon)
- * @reviewer SR(gilbok)
- * @type auto
- * @description Negative, Start HDCP receiver
- * @apicovered hal_drm_hdcp_start_receiver
- * @passcase when hal_drm_hdcp_start_receiver returns HAL_DRM_ERROR_INVALID_PARAMETER
- * @failcase when hal_drm_hdcp_start_receiver does not return HAL_DRM_ERROR_INVALID_PARAMETER
- * @precondition None
- * @postcondition None
- */
-TEST_F(DrmHalTest, HdcpStartReceiverN2)
-{
- uint32_t hdcp_id = 0;
-
- gRet = hal_drm_hdcp_open(gHalHandle, HAL_DRM_HDCP_DEVICE_RECEIVER, HAL_DRM_HDCP_VERSION_2_0);
- ASSERT_EQ(gRet, HAL_DRM_ERROR_NONE);
-
- gRet = hal_drm_hdcp_start_receiver(nullptr, 100, &hdcp_id);
- ASSERT_EQ(gRet, HAL_DRM_ERROR_INVALID_PARAMETER);
-
- gRet = hal_drm_hdcp_start_receiver(gHalHandle, 100, nullptr);
- ASSERT_EQ(gRet, HAL_DRM_ERROR_INVALID_PARAMETER);
-
- gRet = hal_drm_hdcp_close(gHalHandle);
- ASSERT_EQ(gRet, HAL_DRM_ERROR_NONE);
-}
-
-/**
- * @testcase HdcpStopReceiverP
- * @since HAL_MODULE_DRM 1.0
- * @author SR(haesu.gwon)
- * @reviewer SR(gilbok)
- * @type auto
- * @description Positive, Stop HDCP receiver
- * @apicovered hal_drm_hdcp_stop_receiver
- * @passcase when hal_drm_hdcp_stop_receiver returns HAL_DRM_ERROR_NONE
- * @failcase when hal_drm_hdcp_stop_receiver does not return HAL_DRM_ERROR_NONE
- * @precondition None
- * @postcondition None
- */
-TEST_F(DrmHalTest, HdcpStopReceiverP)
-{
- uint32_t hdcp_id = 0;
-
- gRet = hal_drm_hdcp_open(gHalHandle, HAL_DRM_HDCP_DEVICE_RECEIVER, HAL_DRM_HDCP_VERSION_2_0);
- ASSERT_EQ(gRet, HAL_DRM_ERROR_NONE);
-
- gRet = hal_drm_hdcp_start_receiver(gHalHandle, 100, &hdcp_id);
- ASSERT_EQ(gRet, HAL_DRM_ERROR_NONE);
-
- gRet = hal_drm_hdcp_stop_receiver(gHalHandle, hdcp_id);
- ASSERT_EQ(gRet, HAL_DRM_ERROR_NONE);
-
- gRet = hal_drm_hdcp_close(gHalHandle);
- ASSERT_EQ(gRet, HAL_DRM_ERROR_NONE);
-}
-
-/**
- * @testcase HdcpStopReceiverN1
- * @since HAL_MODULE_DRM 1.0
- * @author SR(haesu.gwon)
- * @reviewer SR(gilbok)
- * @type auto
- * @description Negative, Stop HDCP receiver
- * @apicovered hal_drm_hdcp_stop_receiver
- * @passcase when hal_drm_hdcp_stop_receiver returns HAL_DRM_ERROR_INVALID_STATE
- * @failcase when hal_drm_hdcp_stop_receiver does not return HAL_DRM_ERROR_INVALID_STATE
- * @precondition None
- * @postcondition None
- */
-TEST_F(DrmHalTest, HdcpStopReceiverN1)
-{
- uint32_t hdcp_id = 0;
-
- gRet = hal_drm_hdcp_stop_receiver(gHalHandle, hdcp_id);
- ASSERT_EQ(gRet, HAL_DRM_ERROR_INVALID_STATE);
-}
-
-/**
- * @testcase HdcpStopReceiverN2
- * @since HAL_MODULE_DRM 1.0
- * @author SR(haesu.gwon)
- * @reviewer SR(gilbok)
- * @type auto
- * @description Negative, Stop HDCP receiver
- * @apicovered hal_drm_hdcp_stop_receiver
- * @passcase when hal_drm_hdcp_stop_receiver returns HAL_DRM_ERROR_INVALID_PARAMETER
- * @failcase when hal_drm_hdcp_stop_receiver does not return HAL_DRM_ERROR_INVALID_PARAMETER
- * @precondition None
- * @postcondition None
- */
-TEST_F(DrmHalTest, HdcpStopReceiverN2)
-{
- uint32_t hdcp_id = 0;
-
- gRet = hal_drm_hdcp_open(gHalHandle, HAL_DRM_HDCP_DEVICE_RECEIVER, HAL_DRM_HDCP_VERSION_2_0);
- ASSERT_EQ(gRet, HAL_DRM_ERROR_NONE);
-
- gRet = hal_drm_hdcp_start_receiver(gHalHandle, 100, &hdcp_id);
- ASSERT_EQ(gRet, HAL_DRM_ERROR_NONE);
-
- gRet = hal_drm_hdcp_stop_receiver(nullptr, hdcp_id);
- ASSERT_EQ(gRet, HAL_DRM_ERROR_INVALID_PARAMETER);
-
- gRet = hal_drm_hdcp_close(gHalHandle);
- ASSERT_EQ(gRet, HAL_DRM_ERROR_NONE);
-}
-
-/**
- * @testcase HdcpStartTransmitterP
- * @since HAL_MODULE_DRM 1.0
- * @author SR(haesu.gwon)
- * @reviewer SR(gilbok)
- * @type auto
- * @description Positive, Start HDCP transmitter
- * @apicovered hal_drm_hdcp_start_transmitter
- * @passcase when hal_drm_hdcp_start_transmitter returns HAL_DRM_ERROR_NONE
- * @failcase when hal_drm_hdcp_start_transmitter does not return HAL_DRM_ERROR_NONE
- * @precondition None
- * @postcondition None
- */
-TEST_F(DrmHalTest, HdcpStartTransmitterP)
-{
- uint32_t hdcp_id = 0;
-
- gRet = hal_drm_hdcp_open(gHalHandle, HAL_DRM_HDCP_DEVICE_RECEIVER, HAL_DRM_HDCP_VERSION_2_0);
- ASSERT_EQ(gRet, HAL_DRM_ERROR_NONE);
-
- gRet = hal_drm_hdcp_start_transmitter(gHalHandle, gSocketIp, gPortIp, &hdcp_id);
- ASSERT_EQ(gRet, HAL_DRM_ERROR_NONE);
-
- gRet = hal_drm_hdcp_close(gHalHandle);
- ASSERT_EQ(gRet, HAL_DRM_ERROR_NONE);
-}
-
-/**
- * @testcase HdcpStartTransmitterN1
- * @since HAL_MODULE_DRM 1.0
- * @author SR(haesu.gwon)
- * @reviewer SR(gilbok)
- * @type auto
- * @description Negative, Start HDCP transmitter
- * @apicovered hal_drm_hdcp_start_transmitter
- * @passcase when hal_drm_hdcp_start_transmitter returns HAL_DRM_ERROR_INVALID_STATE
- * @failcase when hal_drm_hdcp_start_transmitter does not return HAL_DRM_ERROR_INVALID_STATE
- * @precondition None
- * @postcondition None
- */
-TEST_F(DrmHalTest, HdcpStartTransmitterN1)
-{
- uint32_t hdcp_id = 0;
-
- gRet = hal_drm_hdcp_start_transmitter(gHalHandle, gSocketIp, gPortIp, &hdcp_id);
- ASSERT_EQ(gRet, HAL_DRM_ERROR_INVALID_STATE);
-}
-
-/**
- * @testcase HdcpStartTransmitterN2
- * @since HAL_MODULE_DRM 1.0
- * @author SR(haesu.gwon)
- * @reviewer SR(gilbok)
- * @type auto
- * @description Negative, Start HDCP transmitter
- * @apicovered hal_drm_hdcp_start_transmitter
- * @passcase when hal_drm_hdcp_start_transmitter returns HAL_DRM_ERROR_INVALID_PARAMETER
- * @failcase when hal_drm_hdcp_start_transmitter does not return HAL_DRM_ERROR_INVALID_PARAMETER
- * @precondition None
- * @postcondition None
- */
-TEST_F(DrmHalTest, HdcpStartTransmitterN2)
-{
- uint32_t hdcp_id = 0;
-
- gRet = hal_drm_hdcp_open(gHalHandle, HAL_DRM_HDCP_DEVICE_RECEIVER, HAL_DRM_HDCP_VERSION_2_0);
- ASSERT_EQ(gRet, HAL_DRM_ERROR_NONE);
-
- gRet = hal_drm_hdcp_start_transmitter(nullptr, gSocketIp, gPortIp, &hdcp_id);
- ASSERT_EQ(gRet, HAL_DRM_ERROR_INVALID_PARAMETER);
-
- gRet = hal_drm_hdcp_close(gHalHandle);
- ASSERT_EQ(gRet, HAL_DRM_ERROR_NONE);
-}
-
-/**
- * @testcase HdcpStopTransmitterP
- * @since HAL_MODULE_DRM 1.0
- * @author SR(haesu.gwon)
- * @reviewer SR(gilbok)
- * @type auto
- * @description Positive, Stop HDCP transmitter
- * @apicovered hal_drm_hdcp_stop_transmitter
- * @passcase when hal_drm_hdcp_stop_transmitter returns HAL_DRM_ERROR_NONE
- * @failcase when hal_drm_hdcp_stop_transmitter does not return HAL_DRM_ERROR_NONE
- * @precondition None
- * @postcondition None
- */
-TEST_F(DrmHalTest, HdcpStopTransmitterP)
-{
- uint32_t hdcp_id = 0;
-
- gRet = hal_drm_hdcp_open(gHalHandle, HAL_DRM_HDCP_DEVICE_RECEIVER, HAL_DRM_HDCP_VERSION_2_0);
- ASSERT_EQ(gRet, HAL_DRM_ERROR_NONE);
-
- gRet = hal_drm_hdcp_start_transmitter(gHalHandle, gSocketIp, gPortIp, &hdcp_id);
- ASSERT_EQ(gRet, HAL_DRM_ERROR_NONE);
-
- gRet = hal_drm_hdcp_stop_transmitter(gHalHandle, hdcp_id);
- ASSERT_EQ(gRet, HAL_DRM_ERROR_NONE);
-
- gRet = hal_drm_hdcp_close(gHalHandle);
- ASSERT_EQ(gRet, HAL_DRM_ERROR_NONE);
-}
-
-/**
- * @testcase HdcpStopTransmitterN1
- * @since HAL_MODULE_DRM 1.0
- * @author SR(haesu.gwon)
- * @reviewer SR(gilbok)
- * @type auto
- * @description Negative, Stop HDCP transmitter
- * @apicovered hal_drm_hdcp_stop_transmitter
- * @passcase when hal_drm_hdcp_stop_transmitter returns HAL_DRM_ERROR_INVALID_STATE
- * @failcase when hal_drm_hdcp_stop_transmitter does not return HAL_DRM_ERROR_INVALID_STATE
- * @precondition None
- * @postcondition None
- */
-TEST_F(DrmHalTest, HdcpStopTransmitterN1)
-{
- uint32_t hdcp_id = 0;
-
- gRet = hal_drm_hdcp_stop_transmitter(gHalHandle, hdcp_id);
- ASSERT_EQ(gRet, HAL_DRM_ERROR_INVALID_STATE);
-}
-
-/**
- * @testcase HdcpStopTransmitterN2
- * @since HAL_MODULE_DRM 1.0
- * @author SR(haesu.gwon)
- * @reviewer SR(gilbok)
- * @type auto
- * @description Negative, Stop HDCP transmitter
- * @apicovered hal_drm_hdcp_stop_transmitter
- * @passcase when hal_drm_hdcp_stop_transmitter returns HAL_DRM_ERROR_INVALID_PARAMETER
- * @failcase when hal_drm_hdcp_stop_transmitter does not return HAL_DRM_ERROR_INVALID_PARAMETER
- * @precondition None
- * @postcondition None
- */
-TEST_F(DrmHalTest, HdcpStopTransmitterN2)
-{
- uint32_t hdcp_id = 0;
-
- gRet = hal_drm_hdcp_open(gHalHandle, HAL_DRM_HDCP_DEVICE_RECEIVER, HAL_DRM_HDCP_VERSION_2_0);
- ASSERT_EQ(gRet, HAL_DRM_ERROR_NONE);
-
- gRet = hal_drm_hdcp_start_transmitter(gHalHandle, gSocketIp, gPortIp, &hdcp_id);
- ASSERT_EQ(gRet, HAL_DRM_ERROR_NONE);
-
- gRet = hal_drm_hdcp_stop_transmitter(nullptr, hdcp_id);
- ASSERT_EQ(gRet, HAL_DRM_ERROR_INVALID_PARAMETER);
-
- gRet = hal_drm_hdcp_close(gHalHandle);
- ASSERT_EQ(gRet, HAL_DRM_ERROR_NONE);
-}
-
-/**
- * @testcase HdcpAllocateBufferP
- * @since HAL_MODULE_DRM 1.0
- * @author SR(haesu.gwon)
- * @reviewer SR(gilbok)
- * @type auto
- * @description Positive, Allocate output buffer
- * @apicovered hal_drm_hdcp_allocate_output_buffer
- * @passcase when hal_drm_hdcp_allocate_output_buffer returns HAL_DRM_ERROR_NONE
- * @failcase when hal_drm_hdcp_allocate_output_buffer does not return HAL_DRM_ERROR_NONE
- * @precondition None
- * @postcondition None
- */
-TEST_F(DrmHalTest, HdcpAllocateBufferP)
-{
- uint32_t hdcp_id = 0;
- hal_drm_buffer_s output;
-
- gRet = hal_drm_hdcp_open(gHalHandle, HAL_DRM_HDCP_DEVICE_RECEIVER, HAL_DRM_HDCP_VERSION_2_0);
- ASSERT_EQ(gRet, HAL_DRM_ERROR_NONE);
-
- gRet = hal_drm_hdcp_start_transmitter(gHalHandle, gSocketIp, gPortIp, &hdcp_id);
- ASSERT_EQ(gRet, HAL_DRM_ERROR_NONE);
-
- gRet = hal_drm_hdcp_allocate_output_buffer(gHalHandle, 1000, false, &output);
- ASSERT_EQ(gRet, HAL_DRM_ERROR_NONE);
-
- gRet = hal_drm_hdcp_stop_transmitter(gHalHandle, hdcp_id);
- ASSERT_EQ(gRet, HAL_DRM_ERROR_NONE);
-
- gRet = hal_drm_hdcp_close(gHalHandle);
- ASSERT_EQ(gRet, HAL_DRM_ERROR_NONE);
-}
-
-/**
- * @testcase HdcpAllocateBufferN
- * @since HAL_MODULE_DRM 1.0
- * @author SR(haesu.gwon)
- * @reviewer SR(gilbok)
- * @type auto
- * @description Negative, Allocate output buffer
- * @apicovered hal_drm_hdcp_allocate_output_buffer
- * @passcase when hal_drm_hdcp_allocate_output_buffer returns HAL_DRM_ERROR_NONE
- * @failcase when hal_drm_hdcp_allocate_output_buffer does not return HAL_DRM_ERROR_NONE
- * @precondition None
- * @postcondition None
- */
-TEST_F(DrmHalTest, HdcpAllocateBufferN)
-{
- uint32_t hdcp_id = 0;
- hal_drm_buffer_s output;
-
- gRet = hal_drm_hdcp_open(gHalHandle, HAL_DRM_HDCP_DEVICE_RECEIVER, HAL_DRM_HDCP_VERSION_2_0);
- ASSERT_EQ(gRet, HAL_DRM_ERROR_NONE);
-
- gRet = hal_drm_hdcp_start_transmitter(gHalHandle, gSocketIp, gPortIp, &hdcp_id);
- ASSERT_EQ(gRet, HAL_DRM_ERROR_NONE);
-
- gRet = hal_drm_hdcp_allocate_output_buffer(nullptr, 1000, false, &output);
- ASSERT_EQ(gRet, HAL_DRM_ERROR_INVALID_PARAMETER);
-
- gRet = hal_drm_hdcp_allocate_output_buffer(gHalHandle, 1000, false, nullptr);
- ASSERT_EQ(gRet, HAL_DRM_ERROR_INVALID_PARAMETER);
-
- gRet = hal_drm_hdcp_stop_transmitter(gHalHandle, hdcp_id);
- ASSERT_EQ(gRet, HAL_DRM_ERROR_NONE);
-
- gRet = hal_drm_hdcp_close(gHalHandle);
- ASSERT_EQ(gRet, HAL_DRM_ERROR_NONE);
-}
-
-/**
- * @testcase HdcpReleaseBufferP
- * @since HAL_MODULE_DRM 1.0
- * @author SR(haesu.gwon)
- * @reviewer SR(gilbok)
- * @type auto
- * @description Positive, Release output buffer
- * @apicovered hal_drm_hdcp_release_output_buffer
- * @passcase when hal_drm_hdcp_release_output_buffer returns HAL_DRM_ERROR_NONE
- * @failcase when hal_drm_hdcp_release_output_buffer does not return HAL_DRM_ERROR_NONE
- * @precondition None
- * @postcondition None
- */
-TEST_F(DrmHalTest, HdcpReleaseBufferP)
-{
- uint32_t hdcp_id = 0;
- hal_drm_buffer_s output;
-
- gRet = hal_drm_hdcp_open(gHalHandle, HAL_DRM_HDCP_DEVICE_RECEIVER, HAL_DRM_HDCP_VERSION_2_0);
- ASSERT_EQ(gRet, HAL_DRM_ERROR_NONE);
-
- gRet = hal_drm_hdcp_start_transmitter(gHalHandle, gSocketIp, gPortIp, &hdcp_id);
- ASSERT_EQ(gRet, HAL_DRM_ERROR_NONE);
-
- gRet = hal_drm_hdcp_allocate_output_buffer(gHalHandle, 1000, false, &output);
- ASSERT_EQ(gRet, HAL_DRM_ERROR_NONE);
-
- gRet = hal_drm_hdcp_release_output_buffer(gHalHandle, &output);
- ASSERT_EQ(gRet, HAL_DRM_ERROR_NONE);
-
- gRet = hal_drm_hdcp_stop_transmitter(gHalHandle, hdcp_id);
- ASSERT_EQ(gRet, HAL_DRM_ERROR_NONE);
-
- gRet = hal_drm_hdcp_close(gHalHandle);
- ASSERT_EQ(gRet, HAL_DRM_ERROR_NONE);
-}
-
-/**
- * @testcase HdcpReleaseBufferN
- * @since HAL_MODULE_DRM 1.0
- * @author SR(haesu.gwon)
- * @reviewer SR(gilbok)
- * @type auto
- * @description Negative, Release output buffer
- * @apicovered hal_drm_hdcp_release_output_buffer
- * @passcase when hal_drm_hdcp_release_output_buffer returns HAL_DRM_ERROR_NONE
- * @failcase when hal_drm_hdcp_release_output_buffer does not return HAL_DRM_ERROR_NONE
- * @precondition None
- * @postcondition None
- */
-TEST_F(DrmHalTest, HdcpReleaseBufferN)
-{
- uint32_t hdcp_id = 0;
- hal_drm_buffer_s output;
-
- gRet = hal_drm_hdcp_open(gHalHandle, HAL_DRM_HDCP_DEVICE_RECEIVER, HAL_DRM_HDCP_VERSION_2_0);
- ASSERT_EQ(gRet, HAL_DRM_ERROR_NONE);
-
- gRet = hal_drm_hdcp_start_transmitter(gHalHandle, gSocketIp, gPortIp, &hdcp_id);
- ASSERT_EQ(gRet, HAL_DRM_ERROR_NONE);
-
- gRet = hal_drm_hdcp_allocate_output_buffer(gHalHandle, 1000, false, &output);
- ASSERT_EQ(gRet, HAL_DRM_ERROR_NONE);
-
- gRet = hal_drm_hdcp_release_output_buffer(nullptr, &output);
- ASSERT_EQ(gRet, HAL_DRM_ERROR_INVALID_PARAMETER);
-
- gRet = hal_drm_hdcp_release_output_buffer(gHalHandle, nullptr);
- ASSERT_EQ(gRet, HAL_DRM_ERROR_INVALID_PARAMETER);
-
- gRet = hal_drm_hdcp_stop_transmitter(gHalHandle, hdcp_id);
- ASSERT_EQ(gRet, HAL_DRM_ERROR_NONE);
-
- gRet = hal_drm_hdcp_close(gHalHandle);
- ASSERT_EQ(gRet, HAL_DRM_ERROR_NONE);
-}
-
-/**
- * @testcase HdcpDecryptP
- * @since HAL_MODULE_DRM 1.0
- * @author SR(haesu.gwon)
- * @reviewer SR(gilbok)
- * @type auto
- * @description Positive, Decrypt HDCP data
- * @apicovered hal_drm_hdcp_decrypt
- * @passcase when hal_drm_hdcp_decrypt returns HAL_DRM_ERROR_NONE
- * @failcase when hal_drm_hdcp_decrypt does not return HAL_DRM_ERROR_NONE
- * @precondition None
- * @postcondition None
- */
-TEST_F(DrmHalTest, HdcpDecryptP)
-{
- uint32_t hdcp_id = 0;
- hal_drm_buffer_s input, output;
- uint32_t decrypt_info;
-
- gRet = hal_drm_hdcp_open(gHalHandle, HAL_DRM_HDCP_DEVICE_RECEIVER, HAL_DRM_HDCP_VERSION_2_0);
- ASSERT_EQ(gRet, HAL_DRM_ERROR_NONE);
-
- gRet = hal_drm_hdcp_start_transmitter(gHalHandle, gSocketIp, gPortIp, &hdcp_id);
- ASSERT_EQ(gRet, HAL_DRM_ERROR_NONE);
-
- gRet = hal_drm_hdcp_allocate_output_buffer(gHalHandle, 1000, false, &output);
- ASSERT_EQ(gRet, HAL_DRM_ERROR_NONE);
-
- input.size = 100;
- gRet = hal_drm_hdcp_decrypt(gHalHandle, &input, (void *)&decrypt_info, &output);
- ASSERT_EQ(gRet, HAL_DRM_ERROR_NONE);
-
- gRet = hal_drm_hdcp_stop_transmitter(gHalHandle, hdcp_id);
- ASSERT_EQ(gRet, HAL_DRM_ERROR_NONE);
-
- gRet = hal_drm_hdcp_close(gHalHandle);
- ASSERT_EQ(gRet, HAL_DRM_ERROR_NONE);
-}
-
-/**
- * @testcase HdcpDecryptN1
- * @since HAL_MODULE_DRM 1.0
- * @author SR(haesu.gwon)
- * @reviewer SR(gilbok)
- * @type auto
- * @description Negative, Decrypt HDCP data
- * @apicovered hal_drm_hdcp_decrypt
- * @passcase when hal_drm_hdcp_decrypt returns HAL_DRM_ERROR_INVALID_PARAMETER
- * @failcase when hal_drm_hdcp_decrypt does not return HAL_DRM_ERROR_INVALID_PARAMETER
- * @precondition None
- * @postcondition None
- */
-TEST_F(DrmHalTest, HdcpDecryptN1)
-{
- uint32_t hdcp_id = 0;
- hal_drm_buffer_s output;
- int decrypt_info;
-
- gRet = hal_drm_hdcp_open(gHalHandle, HAL_DRM_HDCP_DEVICE_RECEIVER, HAL_DRM_HDCP_VERSION_2_0);
- ASSERT_EQ(gRet, HAL_DRM_ERROR_NONE);
-
- gRet = hal_drm_hdcp_start_transmitter(gHalHandle, gSocketIp, gPortIp, &hdcp_id);
- ASSERT_EQ(gRet, HAL_DRM_ERROR_NONE);
-
- gRet = hal_drm_hdcp_decrypt(gHalHandle, nullptr, (void *)&decrypt_info, &output);
- ASSERT_EQ(gRet, HAL_DRM_ERROR_INVALID_PARAMETER);
-
- gRet = hal_drm_hdcp_stop_transmitter(gHalHandle, hdcp_id);
- ASSERT_EQ(gRet, HAL_DRM_ERROR_NONE);
-
- gRet = hal_drm_hdcp_close(gHalHandle);
- ASSERT_EQ(gRet, HAL_DRM_ERROR_NONE);
-}
-
-/**
- * @testcase HdcpEncryptP
- * @since HAL_MODULE_DRM 1.0
- * @author SR(haesu.gwon)
- * @reviewer SR(gilbok)
- * @type auto
- * @description Positive, Encrypt HDCP data
- * @apicovered hal_drm_hdcp_encrypt
- * @passcase when hal_drm_hdcp_encrypt returns HAL_DRM_ERROR_NONE
- * @failcase when hal_drm_hdcp_encrypt does not return HAL_DRM_ERROR_NONE
- * @precondition None
- * @postcondition None
- */
-TEST_F(DrmHalTest, HdcpEncryptP)
-{
- uint32_t hdcp_id = 0;
- hal_drm_buffer_s input, output;
- uint32_t encrypt_info;
-
- gRet = hal_drm_hdcp_open(gHalHandle, HAL_DRM_HDCP_DEVICE_RECEIVER, HAL_DRM_HDCP_VERSION_2_0);
- ASSERT_EQ(gRet, HAL_DRM_ERROR_NONE);
-
- gRet = hal_drm_hdcp_start_transmitter(gHalHandle, gSocketIp, gPortIp, &hdcp_id);
- ASSERT_EQ(gRet, HAL_DRM_ERROR_NONE);
-
- gRet = hal_drm_hdcp_allocate_output_buffer(gHalHandle, 1000, false, &output);
- ASSERT_EQ(gRet, HAL_DRM_ERROR_NONE);
-
- input.size = 100;
- gRet = hal_drm_hdcp_encrypt(gHalHandle, &input, hdcp_id, (void *)&encrypt_info, &output);
- ASSERT_EQ(gRet, HAL_DRM_ERROR_NONE);
-
- gRet = hal_drm_hdcp_stop_transmitter(gHalHandle, hdcp_id);
- ASSERT_EQ(gRet, HAL_DRM_ERROR_NONE);
-
- gRet = hal_drm_hdcp_close(gHalHandle);
- ASSERT_EQ(gRet, HAL_DRM_ERROR_NONE);
-}
-
-/**
- * @testcase HdcpEncryptN1
- * @since HAL_MODULE_DRM 1.0
- * @author SR(haesu.gwon)
- * @reviewer SR(gilbok)
- * @type auto
- * @description Negative, Encrypt HDCP data
- * @apicovered hal_drm_hdcp_encrypt
- * @passcase when hal_drm_hdcp_encrypt returns HAL_DRM_ERROR_INVALID_PARAMETER
- * @failcase when hal_drm_hdcp_encrypt does not return HAL_DRM_ERROR_INVALID_PARAMETER
- * @precondition None
- * @postcondition None
- */
-TEST_F(DrmHalTest, HdcpEncryptN1)
-{
- uint32_t hdcp_id = 0;
- hal_drm_buffer_s input, output;
- uint32_t encrypt_info;
- input.size = 100;
-
- gRet = hal_drm_hdcp_open(gHalHandle, HAL_DRM_HDCP_DEVICE_RECEIVER, HAL_DRM_HDCP_VERSION_2_0);
- ASSERT_EQ(gRet, HAL_DRM_ERROR_NONE);
-
- gRet = hal_drm_hdcp_start_transmitter(gHalHandle, gSocketIp, gPortIp, &hdcp_id);
- ASSERT_EQ(gRet, HAL_DRM_ERROR_NONE);
-
- gRet = hal_drm_hdcp_encrypt(gHalHandle, nullptr, hdcp_id, (void *)&encrypt_info, &output);
- ASSERT_EQ(gRet, HAL_DRM_ERROR_INVALID_PARAMETER);
-
- gRet = hal_drm_hdcp_encrypt(gHalHandle, &input, hdcp_id, nullptr, &output);
- ASSERT_EQ(gRet, HAL_DRM_ERROR_INVALID_PARAMETER);
-
- gRet = hal_drm_hdcp_encrypt(gHalHandle, &input, hdcp_id, (void *)&encrypt_info, nullptr);
- ASSERT_EQ(gRet, HAL_DRM_ERROR_INVALID_PARAMETER);
-
- gRet = hal_drm_hdcp_stop_transmitter(gHalHandle, hdcp_id);
- ASSERT_EQ(gRet, HAL_DRM_ERROR_NONE);
-
- gRet = hal_drm_hdcp_close(gHalHandle);
- ASSERT_EQ(gRet, HAL_DRM_ERROR_NONE);