From 611ad5f5401fdc47ed2451be99b221da52d4b40d Mon Sep 17 00:00:00 2001 From: Deepak_m Date: Tue, 7 Nov 2023 22:26:05 +0530 Subject: [PATCH] RDKB-51761 Test scenario to cover multiple rbus_open() call Reason for change: Need to cover test app and unit test to have a test cases which covers multiple rbus_open() with same component name without rbus_close() call. The test scenario should also cover regDataElements, rbus_set, rbus_get, addrow and methodinvoke after doing multiple rbus_open() function call Test Procedure: Start rtrouted and ./rbus_test.sh Risks: Medium Priority: P1 Signed-off-by: Deepak_m --- .../multiRbusOpenMethodConsumer.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/rbus/multiRbusOpenMethodConsumer/multiRbusOpenMethodConsumer.c b/test/rbus/multiRbusOpenMethodConsumer/multiRbusOpenMethodConsumer.c index c0274ff7..f19c6071 100644 --- a/test/rbus/multiRbusOpenMethodConsumer/multiRbusOpenMethodConsumer.c +++ b/test/rbus/multiRbusOpenMethodConsumer/multiRbusOpenMethodConsumer.c @@ -109,8 +109,6 @@ int main(int argc, char *argv[]) { printf("multiRbusOpenMethodConsumer: rbusMethod_Invoke(Device.Methods.SimpleMethod()) using handle2 return err:%d\n", rc2); } - rbusObject_Release(inParams1); - rbusObject_Release(inParams2); if(rc1 == RBUS_ERROR_SUCCESS) { @@ -122,6 +120,8 @@ int main(int argc, char *argv[]) rbusObject_fwrite(outParams2, 1, stdout); rbusObject_Release(outParams2); } + rbusObject_Release(inParams1); + rbusObject_Release(inParams2); /*Test to check the Outparams error msg handling This testcase reads the provider specific error code and prints it. @@ -183,7 +183,6 @@ int main(int argc, char *argv[]) rc1 = rbusMethod_InvokeAsync(handle1, "Device.Methods.AsyncMethod()", inParams1, asyncMethodHandler, 0); - rbusObject_Release(inParams1); printf("multiRbusOpenMethodConsumer: rbusMethod_InvokeAsync(Device.Methods.AsyncMethod()) for handle1 %s with err :%d\n", rc1 == RBUS_ERROR_INVALID_HANDLE ? "success" : "fail",rc1); @@ -200,7 +199,6 @@ int main(int argc, char *argv[]) rbusObject_fwrite(outParams2, 1, stdout); rbusObject_Release(outParams2); } - rbusObject_Release(inParams2); sleep(10); @@ -217,6 +215,8 @@ int main(int argc, char *argv[]) printf("multiRbusOpenMethodConsumer: rbus_close handle1 err: %d\n", rc1); } exit1: + rbusObject_Release(inParams1); + rbusObject_Release(inParams2); printf("multiRbusOpenMethodConsumer: exit\n"); return rc2;