Conversation
Signed-off-by: PriyaDharshini_Kathiravan <priyakathiravan05@gmail.com>
Signed-off-by: PriyaDharshini_Kathiravan <priyakathiravan05@gmail.com>
| #include "ccspinterface.h" | ||
| #include "vector.h" | ||
| #include "telemetry2_0.h" | ||
| #if 0 |
There was a problem hiding this comment.
Similar comments. Please remove unused code.
| return T2ERROR_SUCCESS; | ||
| } | ||
|
|
||
| // Forward declarations for functions we want to test | ||
| extern bool isRbusEnabled(void); | ||
| extern T2ERROR getParameterValue(const char* paramName, char **paramValue); | ||
| extern T2ERROR registerForTelemetryEvents(TelemetryEventCallback eventCB); | ||
| extern T2ERROR unregisterForTelemetryEvents(void); | ||
| extern T2ERROR busUninit(void); | ||
| extern T2ERROR getRbusParameterVal(const char* paramName, char **paramValue); | ||
| extern T2ERROR getCCSPParamVal(const char* paramName, char **paramValue); | ||
| extern void resetBusState(void); | ||
| rbusError_t t2TriggerConditionGetHandler(rbusHandle_t handle, rbusProperty_t property, rbusGetHandlerOptions_t* opts); | ||
| void triggerCondtionReceiveHandler(rbusHandle_t handle, rbusEvent_t const* event, rbusEventSubscription_t* subscription); | ||
| void reportEventHandler(rbusHandle_t handle, rbusEvent_t const* event, rbusEventSubscription_t* subscription); | ||
| rbusError_t t2PropertyDataSetHandler(rbusHandle_t handle, rbusProperty_t prop, rbusSetHandlerOptions_t* opts); | ||
| rbusError_t t2PropertyDataGetHandler(rbusHandle_t handle, rbusProperty_t prop, rbusGetHandlerOptions_t* opts); | ||
| } | ||
|
|
There was a problem hiding this comment.
Are these stubs going away as we are now getting the actual rbus.h from the native container ?
| rdkconfigMock *g_rdkconfigMock = nullptr; | ||
| extern VectorMock *g_vectorMock; | ||
| extern CcspInterfaceMock *g_ccspInterfaceMock; | ||
| //extern CcspInterfaceMock *g_ccspInterfaceMock; |
| } | ||
| #endif | ||
|
|
||
| /* |
There was a problem hiding this comment.
Is there any specific reason for diabling an existing test case ?
| Vector* profileValueList = getProfileParameterValues(paramlist, 2); | ||
|
|
||
| EXPECT_NE(profileValueList, nullptr); | ||
| Vector_Destroy(paramlist, free); |
There was a problem hiding this comment.
Please check the allocations and freeing strategy in the test.
There was a problem hiding this comment.
Done. Replaced with correct free function.
|
|
||
| //t2PropertyDataGetHandler cases | ||
|
|
||
| TEST_F(CcspInterfaceTest, t2PropertyDataGetHandler_Success_1) |
There was a problem hiding this comment.
In general, could you please add short comments above the tests giving very high level of hints regarding the scenarios that we are testing.
| EXPECT_EQ(ret, 0); | ||
| } | ||
|
|
||
| /*TEST_F(TelemetryBusmessageSenderTest, t2_event_s_iscachingenabled_true_1) |
There was a problem hiding this comment.
Please do avoid commented/unused code to the best possible extend.
Coverity Issue - Check of thread-shared field evades lock acquisitionThread1 sets "initialized" to a new value. Now the two threads have an inconsistent view of "initialized" and updates to fields correlated with "initialized" may be lost. High Impact, CWE-543 How to fixGuard the modification of "initialized" and the read used to decide whether to modify "initialized" with the same set of locks. Issue locationThis issue was discovered outside the diff for this Pull Request. You can find it at: |
No description provided.