rdkcentral / rdk-halif-test-hdmi_cec

RDK HDMI CEC Hardware Abstraction Layer test suite
Apache License 2.0
4 stars 1 forks source link

Fix the fail of hdmiCecTxAsyncSinkPositive and hdmiCecTxAsyncSink #3

Closed owencwchen closed 4 months ago

owencwchen commented 7 months ago

In the test cases test_hdmicec_hal_l1_hdmiCecTxAsync_sinkDevice_negative and test_hdmicec_hal_l1_hdmiCecTxAsync_sinkDevice_positive, callback data with NULL pointer will be set

/* Positive result */
 result = HdmiCecSetTxCallback(handle, DriverTransmitCallback, 0);
 if (HDMI_CEC_IO_SUCCESS != result) { HDMICEC_ASSERT_AUTO_TERM(); UT_FAIL ("HdmiCecSetTxCallback failed"); }

However in the call back function DriverTransmitCallback, there is a checker UT_ASSERT_PTR_NULL.

void DriverTransmitCallback(int handle, void *callbackData, int result)
{
    UT_ASSERT_TRUE(handle!=0);
    UT_ASSERT_PTR_NULL((bool)(!callbackData));
    //UT_ASSERT_TRUE( (unsigned long long)callbackData== (unsigned long long)0xDEADBEEF);
    UT_LOG ("\ncallbackData returned: %x result: %d\n",callbackData, result);
    if (HDMI_CEC_IO_SUCCESS != result) { HDMICEC_ASSERT_AUTO_TERM(); UT_FAIL ("Check failed"); }
}

Therefore the test case will always fail when HdmiCecTxAsync is called.

result = HdmiCecTxAsync(handle, buf, len);
if (HDMI_CEC_IO_SUCCESS != result) { HDMICEC_ASSERT_AUTO_TERM(); UT_FAIL ("HdmiCecTxAsync failed"); }
Ulrond commented 4 months ago

fixed as part of the latest release