From 74349379b3e047c44b3231aaea2212f2a888dd90 Mon Sep 17 00:00:00 2001 From: smanes0213 Date: Wed, 7 Jan 2026 14:24:33 +0530 Subject: [PATCH 1/9] Update L1 workflow to use L2TestPlugin_COMRPC branch for testframework Changed entservices-testframework checkout ref from develop to L2TestPlugin_COMRPC to maintain consistency with other repositories. --- .github/workflows/L1-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/L1-tests.yml b/.github/workflows/L1-tests.yml index a3f49a57..241d4341 100755 --- a/.github/workflows/L1-tests.yml +++ b/.github/workflows/L1-tests.yml @@ -123,7 +123,7 @@ jobs: with: repository: rdkcentral/entservices-testframework path: entservices-testframework - ref: develop + ref: L2TestPlugin_COMRPC token: ${{ secrets.RDKCM_RDKE }} - name: Checkout entservices-casting From 0b7158b51caf04aaaa20bac8ea86a8b41b95e4d6 Mon Sep 17 00:00:00 2001 From: smanes0213 Date: Wed, 7 Jan 2026 14:30:36 +0530 Subject: [PATCH 2/9] Change build type to develop for Thunder build process. --- .github/workflows/L1-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/L1-tests.yml b/.github/workflows/L1-tests.yml index 241d4341..1f4d5c47 100755 --- a/.github/workflows/L1-tests.yml +++ b/.github/workflows/L1-tests.yml @@ -188,7 +188,7 @@ jobs: -DCMAKE_INSTALL_PREFIX="$GITHUB_WORKSPACE/install/usr" -DCMAKE_MODULE_PATH="$GITHUB_WORKSPACE/install/tools/cmake" -DGENERIC_CMAKE_MODULE_PATH="$GITHUB_WORKSPACE/install/tools/cmake" - -DBUILD_TYPE=Debug + -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DBINDING=127.0.0.1 -DPORT=55555 -DEXCEPTIONS_ENABLE=ON From 4c2bb4640bafcbc034a34b51ebbc4572b06bc1dc Mon Sep 17 00:00:00 2001 From: smanes0213 Date: Wed, 7 Jan 2026 14:34:29 +0530 Subject: [PATCH 3/9] Change entservices-apis checkout ref to Test branch --- .github/workflows/L1-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/L1-tests.yml b/.github/workflows/L1-tests.yml index 1f4d5c47..15711ca7 100755 --- a/.github/workflows/L1-tests.yml +++ b/.github/workflows/L1-tests.yml @@ -203,7 +203,7 @@ jobs: with: repository: rdkcentral/entservices-apis path: entservices-apis - ref: ${{env.INTERFACES_REF}} + ref: Test #token : ${{ secrets.RDKCM_RDKE }} run: rm -rf $GITHUB_WORKSPACE/entservices-apis/jsonrpc/DTV.json From 8cb10f7751441937664048f846099377fca6eb83 Mon Sep 17 00:00:00 2001 From: smanes0213 Date: Wed, 7 Jan 2026 14:55:55 +0530 Subject: [PATCH 4/9] Resolve issues causing L1 failures --- Tests/L1Tests/tests/test_MiracastService.cpp | 40 ++++++++++---------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/Tests/L1Tests/tests/test_MiracastService.cpp b/Tests/L1Tests/tests/test_MiracastService.cpp index 82ff2023..aa0f5361 100755 --- a/Tests/L1Tests/tests/test_MiracastService.cpp +++ b/Tests/L1Tests/tests/test_MiracastService.cpp @@ -267,7 +267,7 @@ TEST_F(MiracastServiceTest, P2PCtrlInterfaceNameNotFound) // WIFI_P2P_CTRL_INTERFACE not configured in device properties file EXPECT_NE(string(""), plugin->Initialize(&service)); - plugin->Deinitialize(nullptr); + plugin->Deinitialize(&service); } TEST_F(MiracastServiceTest, P2PCtrlInterfacePathNotFound) @@ -277,7 +277,7 @@ TEST_F(MiracastServiceTest, P2PCtrlInterfacePathNotFound) // Invalid P2P Ctrl iface configured EXPECT_NE(string(""), plugin->Initialize(&service)); - plugin->Deinitialize(nullptr); + plugin->Deinitialize(&service); removeEntryFromFile("/etc/device.properties","WIFI_P2P_CTRL_INTERFACE=p2p0"); } @@ -296,7 +296,7 @@ TEST_F(MiracastServiceTest, RegisteredMethods) EXPECT_EQ(Core::ERROR_NONE, handler.Exists(_T("updatePlayerState"))); EXPECT_EQ(Core::ERROR_NONE, handler.Exists(_T("setP2PBackendDiscovery"))); - plugin->Deinitialize(nullptr); + plugin->Deinitialize(&service); removeEntryFromFile("/etc/device.properties","WIFI_P2P_CTRL_INTERFACE=p2p0"); removeFile("/var/run/wpa_supplicant/p2p0"); @@ -327,7 +327,7 @@ TEST_F(MiracastServiceTest, P2P_DiscoveryStatus) EXPECT_EQ(Core::ERROR_NONE, handler.Invoke(connection, _T("getEnable"), _T("{}"), response)); EXPECT_EQ(response, string("{\"enabled\":false,\"success\":true}")); - plugin->Deinitialize(nullptr); + plugin->Deinitialize(&service); removeEntryFromFile("/etc/device.properties","WIFI_P2P_CTRL_INTERFACE=p2p0"); removeFile("/var/run/wpa_supplicant/p2p0"); @@ -342,7 +342,7 @@ TEST_F(MiracastServiceTest, BackendDiscoveryStatus) EXPECT_EQ(Core::ERROR_NONE, handler.Invoke(connection, _T("setP2PBackendDiscovery"), _T("{\"enabled\": true}"), response)); - plugin->Deinitialize(nullptr); + plugin->Deinitialize(&service); removeEntryFromFile("/etc/device.properties","WIFI_P2P_CTRL_INTERFACE=p2p0"); removeFile("/var/run/wpa_supplicant/p2p0"); @@ -440,7 +440,7 @@ TEST_F(MiracastServiceEventTest, stopClientConnection) EVENT_UNSUBSCRIBE(0, _T("onClientConnectionRequest"), _T("client.events"), message); - plugin->Deinitialize(nullptr); + plugin->Deinitialize(&service); removeEntryFromFile("/etc/device.properties","WIFI_P2P_CTRL_INTERFACE=p2p0"); removeFile("/var/run/wpa_supplicant/p2p0"); @@ -625,7 +625,7 @@ TEST_F(MiracastServiceEventTest, P2P_GOMode_onClientConnectionAndLaunchRequest) EVENT_UNSUBSCRIBE(0, _T("onClientConnectionRequest"), _T("client.events"), message); EVENT_UNSUBSCRIBE(0, _T("onLaunchRequest"), _T("client.events"), message); - plugin->Deinitialize(nullptr); + plugin->Deinitialize(&service); removeEntryFromFile("/etc/device.properties","WIFI_P2P_CTRL_INTERFACE=p2p0"); removeFile("/var/run/wpa_supplicant/p2p0"); @@ -707,7 +707,7 @@ TEST_F(MiracastServiceEventTest, onClientConnectionRequestRejected) EVENT_UNSUBSCRIBE(0, _T("onClientConnectionRequest"), _T("client.events"), message); - plugin->Deinitialize(nullptr); + plugin->Deinitialize(&service); removeEntryFromFile("/etc/device.properties","WIFI_P2P_CTRL_INTERFACE=p2p0"); removeFile("/var/run/wpa_supplicant/p2p0"); @@ -804,7 +804,7 @@ TEST_F(MiracastServiceEventTest, P2P_CONNECT_FAIL_onClientConnectionError) EVENT_UNSUBSCRIBE(0, _T("onClientConnectionRequest"), _T("client.events"), message); EVENT_UNSUBSCRIBE(0, _T("onClientConnectionError"), _T("client.events"), message); - plugin->Deinitialize(nullptr); + plugin->Deinitialize(&service); removeEntryFromFile("/etc/device.properties","WIFI_P2P_CTRL_INTERFACE=p2p0"); removeFile("/var/run/wpa_supplicant/p2p0"); @@ -918,7 +918,7 @@ TEST_F(MiracastServiceEventTest, P2P_GO_NEGOTIATION_FAIL_onClientConnectionError EVENT_UNSUBSCRIBE(0, _T("onClientConnectionRequest"), _T("client.events"), message); EVENT_UNSUBSCRIBE(0, _T("onClientConnectionError"), _T("client.events"), message); - plugin->Deinitialize(nullptr); + plugin->Deinitialize(&service); removeEntryFromFile("/etc/device.properties","WIFI_P2P_CTRL_INTERFACE=p2p0"); removeFile("/var/run/wpa_supplicant/p2p0"); @@ -1039,7 +1039,7 @@ TEST_F(MiracastServiceEventTest, P2P_GO_FORMATION_FAIL_onClientConnectionError) EVENT_UNSUBSCRIBE(0, _T("onClientConnectionRequest"), _T("client.events"), message); EVENT_UNSUBSCRIBE(0, _T("onClientConnectionError"), _T("client.events"), message); - plugin->Deinitialize(nullptr); + plugin->Deinitialize(&service); removeEntryFromFile("/etc/device.properties","WIFI_P2P_CTRL_INTERFACE=p2p0"); removeFile("/var/run/wpa_supplicant/p2p0"); @@ -1196,7 +1196,7 @@ TEST_F(MiracastServiceEventTest, P2P_ClientMode_onClientConnectionAndLaunchReque EVENT_UNSUBSCRIBE(0, _T("onClientConnectionRequest"), _T("client.events"), message); EVENT_UNSUBSCRIBE(0, _T("onLaunchRequest"), _T("client.events"), message); - plugin->Deinitialize(nullptr); + plugin->Deinitialize(&service); removeEntryFromFile("/etc/device.properties","WIFI_P2P_CTRL_INTERFACE=p2p0"); removeFile("/var/run/wpa_supplicant/p2p0"); @@ -1305,7 +1305,7 @@ TEST_F(MiracastServiceEventTest, P2P_ClientMode_DirectonClientConnectionAndLaunc EVENT_UNSUBSCRIBE(0, _T("onClientConnectionRequest"), _T("client.events"), message); EVENT_UNSUBSCRIBE(0, _T("onLaunchRequest"), _T("client.events"), message); - plugin->Deinitialize(nullptr); + plugin->Deinitialize(&service); removeEntryFromFile("/etc/device.properties","WIFI_P2P_CTRL_INTERFACE=p2p0"); removeFile("/var/run/wpa_supplicant/p2p0"); @@ -1408,7 +1408,7 @@ TEST_F(MiracastServiceEventTest, P2P_ClientMode_DirectGroupStartWithName) EVENT_UNSUBSCRIBE(0, _T("onClientConnectionRequest"), _T("client.events"), message); EVENT_UNSUBSCRIBE(0, _T("onLaunchRequest"), _T("client.events"), message); - plugin->Deinitialize(nullptr); + plugin->Deinitialize(&service); removeEntryFromFile("/etc/device.properties","WIFI_P2P_CTRL_INTERFACE=p2p0"); removeFile("/var/run/wpa_supplicant/p2p0"); @@ -1511,7 +1511,7 @@ TEST_F(MiracastServiceEventTest, P2P_ClientMode_DirectGroupStartWithoutName) EVENT_UNSUBSCRIBE(0, _T("onClientConnectionRequest"), _T("client.events"), message); EVENT_UNSUBSCRIBE(0, _T("onLaunchRequest"), _T("client.events"), message); - plugin->Deinitialize(nullptr); + plugin->Deinitialize(&service); removeEntryFromFile("/etc/device.properties","WIFI_P2P_CTRL_INTERFACE=p2p0"); removeFile("/var/run/wpa_supplicant/p2p0"); @@ -1638,7 +1638,7 @@ TEST_F(MiracastServiceEventTest, P2P_ClientMode_DirectP2PGoNegotiationGroupStart EVENT_UNSUBSCRIBE(0, _T("onClientConnectionRequest"), _T("client.events"), message); EVENT_UNSUBSCRIBE(0, _T("onLaunchRequest"), _T("client.events"), message); - plugin->Deinitialize(nullptr); + plugin->Deinitialize(&service); removeEntryFromFile("/etc/device.properties","WIFI_P2P_CTRL_INTERFACE=p2p0"); removeFile("/var/run/wpa_supplicant/p2p0"); @@ -1797,7 +1797,7 @@ TEST_F(MiracastServiceEventTest, P2P_ClientMode_GENERIC_FAILURE) EVENT_UNSUBSCRIBE(0, _T("onClientConnectionRequest"), _T("client.events"), message); EVENT_UNSUBSCRIBE(0, _T("onClientConnectionError"), _T("client.events"), message); - plugin->Deinitialize(nullptr); + plugin->Deinitialize(&service); removeEntryFromFile("/etc/device.properties","WIFI_P2P_CTRL_INTERFACE=p2p0"); removeFile("/var/run/wpa_supplicant/p2p0"); @@ -1940,7 +1940,7 @@ TEST_F(MiracastServiceEventTest, P2P_GOMode_GENERIC_FAILURE) EVENT_UNSUBSCRIBE(0, _T("onClientConnectionRequest"), _T("client.events"), message); EVENT_UNSUBSCRIBE(0, _T("onClientConnectionError"), _T("client.events"), message); - plugin->Deinitialize(nullptr); + plugin->Deinitialize(&service); removeEntryFromFile("/etc/device.properties","WIFI_P2P_CTRL_INTERFACE=p2p0"); removeFile("/var/run/wpa_supplicant/p2p0"); @@ -2043,7 +2043,7 @@ TEST_F(MiracastServiceEventTest, P2P_GOMode_AutoConnect) sleep(10); - plugin->Deinitialize(nullptr); + plugin->Deinitialize(&service); removeEntryFromFile("/etc/device.properties","WIFI_P2P_CTRL_INTERFACE=p2p0"); removeFile("/var/run/wpa_supplicant/p2p0"); @@ -2066,7 +2066,7 @@ TEST_F(MiracastServiceEventTest, powerStateChange) EXPECT_EQ(Core::ERROR_NONE, handler.Invoke(connection, _T("setEnable"), _T("{\"enabled\": false}"), response)); Plugin::MiracastServiceImplementation::_instance->onPowerModeChanged(WPEFramework::Exchange::IPowerManager::POWER_STATE_STANDBY_DEEP_SLEEP, WPEFramework::Exchange::IPowerManager::POWER_STATE_ON); EXPECT_EQ(Core::ERROR_NONE, handler.Invoke(connection, _T("setEnable"), _T("{\"enabled\": true}"), response)); - plugin->Deinitialize(nullptr); + plugin->Deinitialize(&service); removeEntryFromFile("/etc/device.properties","WIFI_P2P_CTRL_INTERFACE=p2p0"); removeFile("/var/run/wpa_supplicant/p2p0"); From 3458b91f674a0267b2bf9e11c03a177c9a6c2c73 Mon Sep 17 00:00:00 2001 From: smanes0213 Date: Wed, 7 Jan 2026 17:06:17 +0530 Subject: [PATCH 5/9] Update test_MiracastService.cpp --- Tests/L1Tests/tests/test_MiracastService.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Tests/L1Tests/tests/test_MiracastService.cpp b/Tests/L1Tests/tests/test_MiracastService.cpp index aa0f5361..3c972017 100755 --- a/Tests/L1Tests/tests/test_MiracastService.cpp +++ b/Tests/L1Tests/tests/test_MiracastService.cpp @@ -267,7 +267,8 @@ TEST_F(MiracastServiceTest, P2PCtrlInterfaceNameNotFound) // WIFI_P2P_CTRL_INTERFACE not configured in device properties file EXPECT_NE(string(""), plugin->Initialize(&service)); - plugin->Deinitialize(&service); + // Don't call Deinitialize - when Initialize fails, implementation auto-deinitializes + // Destructor's Deactivate will handle cleanup } TEST_F(MiracastServiceTest, P2PCtrlInterfacePathNotFound) @@ -277,7 +278,8 @@ TEST_F(MiracastServiceTest, P2PCtrlInterfacePathNotFound) // Invalid P2P Ctrl iface configured EXPECT_NE(string(""), plugin->Initialize(&service)); - plugin->Deinitialize(&service); + // Don't call Deinitialize - when Initialize fails, implementation auto-deinitializes + // Destructor's Deactivate will handle cleanup removeEntryFromFile("/etc/device.properties","WIFI_P2P_CTRL_INTERFACE=p2p0"); } From a303428315d1431b2c6640a922d9319338afc7b0 Mon Sep 17 00:00:00 2001 From: smanes0213 Date: Wed, 7 Jan 2026 17:17:45 +0530 Subject: [PATCH 6/9] Update test_MiracastService.cpp --- Tests/L1Tests/tests/test_MiracastService.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Tests/L1Tests/tests/test_MiracastService.cpp b/Tests/L1Tests/tests/test_MiracastService.cpp index 3c972017..657ba0d1 100755 --- a/Tests/L1Tests/tests/test_MiracastService.cpp +++ b/Tests/L1Tests/tests/test_MiracastService.cpp @@ -214,6 +214,8 @@ class MiracastServiceTest : public ::testing::Test { { TEST_LOG("MiracastServiceTest Destructor"); + workerPool->Stop(); + dispatcher->Deactivate(); dispatcher->Release(); From 51900e34ce29c8bf1bba1935637ed74b270a62ab Mon Sep 17 00:00:00 2001 From: smanes0213 Date: Thu, 8 Jan 2026 11:55:56 +0530 Subject: [PATCH 7/9] Remove Deinitialize from test fixtures and let destructor handle the deinitialization. --- Tests/L1Tests/tests/test_MiracastService.cpp | 21 -------------------- 1 file changed, 21 deletions(-) diff --git a/Tests/L1Tests/tests/test_MiracastService.cpp b/Tests/L1Tests/tests/test_MiracastService.cpp index 657ba0d1..882ee527 100755 --- a/Tests/L1Tests/tests/test_MiracastService.cpp +++ b/Tests/L1Tests/tests/test_MiracastService.cpp @@ -300,8 +300,6 @@ TEST_F(MiracastServiceTest, RegisteredMethods) EXPECT_EQ(Core::ERROR_NONE, handler.Exists(_T("updatePlayerState"))); EXPECT_EQ(Core::ERROR_NONE, handler.Exists(_T("setP2PBackendDiscovery"))); - plugin->Deinitialize(&service); - removeEntryFromFile("/etc/device.properties","WIFI_P2P_CTRL_INTERFACE=p2p0"); removeFile("/var/run/wpa_supplicant/p2p0"); } @@ -331,8 +329,6 @@ TEST_F(MiracastServiceTest, P2P_DiscoveryStatus) EXPECT_EQ(Core::ERROR_NONE, handler.Invoke(connection, _T("getEnable"), _T("{}"), response)); EXPECT_EQ(response, string("{\"enabled\":false,\"success\":true}")); - plugin->Deinitialize(&service); - removeEntryFromFile("/etc/device.properties","WIFI_P2P_CTRL_INTERFACE=p2p0"); removeFile("/var/run/wpa_supplicant/p2p0"); } @@ -346,8 +342,6 @@ TEST_F(MiracastServiceTest, BackendDiscoveryStatus) EXPECT_EQ(Core::ERROR_NONE, handler.Invoke(connection, _T("setP2PBackendDiscovery"), _T("{\"enabled\": true}"), response)); - plugin->Deinitialize(&service); - removeEntryFromFile("/etc/device.properties","WIFI_P2P_CTRL_INTERFACE=p2p0"); removeFile("/var/run/wpa_supplicant/p2p0"); } @@ -444,7 +438,6 @@ TEST_F(MiracastServiceEventTest, stopClientConnection) EVENT_UNSUBSCRIBE(0, _T("onClientConnectionRequest"), _T("client.events"), message); - plugin->Deinitialize(&service); removeEntryFromFile("/etc/device.properties","WIFI_P2P_CTRL_INTERFACE=p2p0"); removeFile("/var/run/wpa_supplicant/p2p0"); @@ -629,7 +622,6 @@ TEST_F(MiracastServiceEventTest, P2P_GOMode_onClientConnectionAndLaunchRequest) EVENT_UNSUBSCRIBE(0, _T("onClientConnectionRequest"), _T("client.events"), message); EVENT_UNSUBSCRIBE(0, _T("onLaunchRequest"), _T("client.events"), message); - plugin->Deinitialize(&service); removeEntryFromFile("/etc/device.properties","WIFI_P2P_CTRL_INTERFACE=p2p0"); removeFile("/var/run/wpa_supplicant/p2p0"); @@ -711,7 +703,6 @@ TEST_F(MiracastServiceEventTest, onClientConnectionRequestRejected) EVENT_UNSUBSCRIBE(0, _T("onClientConnectionRequest"), _T("client.events"), message); - plugin->Deinitialize(&service); removeEntryFromFile("/etc/device.properties","WIFI_P2P_CTRL_INTERFACE=p2p0"); removeFile("/var/run/wpa_supplicant/p2p0"); @@ -808,7 +799,6 @@ TEST_F(MiracastServiceEventTest, P2P_CONNECT_FAIL_onClientConnectionError) EVENT_UNSUBSCRIBE(0, _T("onClientConnectionRequest"), _T("client.events"), message); EVENT_UNSUBSCRIBE(0, _T("onClientConnectionError"), _T("client.events"), message); - plugin->Deinitialize(&service); removeEntryFromFile("/etc/device.properties","WIFI_P2P_CTRL_INTERFACE=p2p0"); removeFile("/var/run/wpa_supplicant/p2p0"); @@ -922,7 +912,6 @@ TEST_F(MiracastServiceEventTest, P2P_GO_NEGOTIATION_FAIL_onClientConnectionError EVENT_UNSUBSCRIBE(0, _T("onClientConnectionRequest"), _T("client.events"), message); EVENT_UNSUBSCRIBE(0, _T("onClientConnectionError"), _T("client.events"), message); - plugin->Deinitialize(&service); removeEntryFromFile("/etc/device.properties","WIFI_P2P_CTRL_INTERFACE=p2p0"); removeFile("/var/run/wpa_supplicant/p2p0"); @@ -1043,7 +1032,6 @@ TEST_F(MiracastServiceEventTest, P2P_GO_FORMATION_FAIL_onClientConnectionError) EVENT_UNSUBSCRIBE(0, _T("onClientConnectionRequest"), _T("client.events"), message); EVENT_UNSUBSCRIBE(0, _T("onClientConnectionError"), _T("client.events"), message); - plugin->Deinitialize(&service); removeEntryFromFile("/etc/device.properties","WIFI_P2P_CTRL_INTERFACE=p2p0"); removeFile("/var/run/wpa_supplicant/p2p0"); @@ -1200,7 +1188,6 @@ TEST_F(MiracastServiceEventTest, P2P_ClientMode_onClientConnectionAndLaunchReque EVENT_UNSUBSCRIBE(0, _T("onClientConnectionRequest"), _T("client.events"), message); EVENT_UNSUBSCRIBE(0, _T("onLaunchRequest"), _T("client.events"), message); - plugin->Deinitialize(&service); removeEntryFromFile("/etc/device.properties","WIFI_P2P_CTRL_INTERFACE=p2p0"); removeFile("/var/run/wpa_supplicant/p2p0"); @@ -1309,7 +1296,6 @@ TEST_F(MiracastServiceEventTest, P2P_ClientMode_DirectonClientConnectionAndLaunc EVENT_UNSUBSCRIBE(0, _T("onClientConnectionRequest"), _T("client.events"), message); EVENT_UNSUBSCRIBE(0, _T("onLaunchRequest"), _T("client.events"), message); - plugin->Deinitialize(&service); removeEntryFromFile("/etc/device.properties","WIFI_P2P_CTRL_INTERFACE=p2p0"); removeFile("/var/run/wpa_supplicant/p2p0"); @@ -1412,7 +1398,6 @@ TEST_F(MiracastServiceEventTest, P2P_ClientMode_DirectGroupStartWithName) EVENT_UNSUBSCRIBE(0, _T("onClientConnectionRequest"), _T("client.events"), message); EVENT_UNSUBSCRIBE(0, _T("onLaunchRequest"), _T("client.events"), message); - plugin->Deinitialize(&service); removeEntryFromFile("/etc/device.properties","WIFI_P2P_CTRL_INTERFACE=p2p0"); removeFile("/var/run/wpa_supplicant/p2p0"); @@ -1515,7 +1500,6 @@ TEST_F(MiracastServiceEventTest, P2P_ClientMode_DirectGroupStartWithoutName) EVENT_UNSUBSCRIBE(0, _T("onClientConnectionRequest"), _T("client.events"), message); EVENT_UNSUBSCRIBE(0, _T("onLaunchRequest"), _T("client.events"), message); - plugin->Deinitialize(&service); removeEntryFromFile("/etc/device.properties","WIFI_P2P_CTRL_INTERFACE=p2p0"); removeFile("/var/run/wpa_supplicant/p2p0"); @@ -1642,7 +1626,6 @@ TEST_F(MiracastServiceEventTest, P2P_ClientMode_DirectP2PGoNegotiationGroupStart EVENT_UNSUBSCRIBE(0, _T("onClientConnectionRequest"), _T("client.events"), message); EVENT_UNSUBSCRIBE(0, _T("onLaunchRequest"), _T("client.events"), message); - plugin->Deinitialize(&service); removeEntryFromFile("/etc/device.properties","WIFI_P2P_CTRL_INTERFACE=p2p0"); removeFile("/var/run/wpa_supplicant/p2p0"); @@ -1801,7 +1784,6 @@ TEST_F(MiracastServiceEventTest, P2P_ClientMode_GENERIC_FAILURE) EVENT_UNSUBSCRIBE(0, _T("onClientConnectionRequest"), _T("client.events"), message); EVENT_UNSUBSCRIBE(0, _T("onClientConnectionError"), _T("client.events"), message); - plugin->Deinitialize(&service); removeEntryFromFile("/etc/device.properties","WIFI_P2P_CTRL_INTERFACE=p2p0"); removeFile("/var/run/wpa_supplicant/p2p0"); @@ -1944,7 +1926,6 @@ TEST_F(MiracastServiceEventTest, P2P_GOMode_GENERIC_FAILURE) EVENT_UNSUBSCRIBE(0, _T("onClientConnectionRequest"), _T("client.events"), message); EVENT_UNSUBSCRIBE(0, _T("onClientConnectionError"), _T("client.events"), message); - plugin->Deinitialize(&service); removeEntryFromFile("/etc/device.properties","WIFI_P2P_CTRL_INTERFACE=p2p0"); removeFile("/var/run/wpa_supplicant/p2p0"); @@ -2047,7 +2028,6 @@ TEST_F(MiracastServiceEventTest, P2P_GOMode_AutoConnect) sleep(10); - plugin->Deinitialize(&service); removeEntryFromFile("/etc/device.properties","WIFI_P2P_CTRL_INTERFACE=p2p0"); removeFile("/var/run/wpa_supplicant/p2p0"); @@ -2070,7 +2050,6 @@ TEST_F(MiracastServiceEventTest, powerStateChange) EXPECT_EQ(Core::ERROR_NONE, handler.Invoke(connection, _T("setEnable"), _T("{\"enabled\": false}"), response)); Plugin::MiracastServiceImplementation::_instance->onPowerModeChanged(WPEFramework::Exchange::IPowerManager::POWER_STATE_STANDBY_DEEP_SLEEP, WPEFramework::Exchange::IPowerManager::POWER_STATE_ON); EXPECT_EQ(Core::ERROR_NONE, handler.Invoke(connection, _T("setEnable"), _T("{\"enabled\": true}"), response)); - plugin->Deinitialize(&service); removeEntryFromFile("/etc/device.properties","WIFI_P2P_CTRL_INTERFACE=p2p0"); removeFile("/var/run/wpa_supplicant/p2p0"); From 0557338ca7956ce35a1840f8ef5b86a37bebf828 Mon Sep 17 00:00:00 2001 From: smanes0213 Date: Thu, 8 Jan 2026 12:35:36 +0530 Subject: [PATCH 8/9] Remove Debug flag while building thunder --- .github/workflows/L1-tests.yml | 4 +-- Tests/L1Tests/tests/test_MiracastService.cpp | 29 ++++++++++++++++---- 2 files changed, 25 insertions(+), 8 deletions(-) diff --git a/.github/workflows/L1-tests.yml b/.github/workflows/L1-tests.yml index 15711ca7..8e6984eb 100755 --- a/.github/workflows/L1-tests.yml +++ b/.github/workflows/L1-tests.yml @@ -138,7 +138,7 @@ jobs: with: repository: rdkcentral/entservices-casting path: entservices-casting - ref: develop + ref: L2TestPlugin_COMRPC - name: Checkout googletest if: steps.cache.outputs.cache-hit != 'true' @@ -188,7 +188,7 @@ jobs: -DCMAKE_INSTALL_PREFIX="$GITHUB_WORKSPACE/install/usr" -DCMAKE_MODULE_PATH="$GITHUB_WORKSPACE/install/tools/cmake" -DGENERIC_CMAKE_MODULE_PATH="$GITHUB_WORKSPACE/install/tools/cmake" - -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} + -DBUILD_TYPE=Debug -DBINDING=127.0.0.1 -DPORT=55555 -DEXCEPTIONS_ENABLE=ON diff --git a/Tests/L1Tests/tests/test_MiracastService.cpp b/Tests/L1Tests/tests/test_MiracastService.cpp index 882ee527..82ff2023 100755 --- a/Tests/L1Tests/tests/test_MiracastService.cpp +++ b/Tests/L1Tests/tests/test_MiracastService.cpp @@ -214,8 +214,6 @@ class MiracastServiceTest : public ::testing::Test { { TEST_LOG("MiracastServiceTest Destructor"); - workerPool->Stop(); - dispatcher->Deactivate(); dispatcher->Release(); @@ -269,8 +267,7 @@ TEST_F(MiracastServiceTest, P2PCtrlInterfaceNameNotFound) // WIFI_P2P_CTRL_INTERFACE not configured in device properties file EXPECT_NE(string(""), plugin->Initialize(&service)); - // Don't call Deinitialize - when Initialize fails, implementation auto-deinitializes - // Destructor's Deactivate will handle cleanup + plugin->Deinitialize(nullptr); } TEST_F(MiracastServiceTest, P2PCtrlInterfacePathNotFound) @@ -280,8 +277,7 @@ TEST_F(MiracastServiceTest, P2PCtrlInterfacePathNotFound) // Invalid P2P Ctrl iface configured EXPECT_NE(string(""), plugin->Initialize(&service)); - // Don't call Deinitialize - when Initialize fails, implementation auto-deinitializes - // Destructor's Deactivate will handle cleanup + plugin->Deinitialize(nullptr); removeEntryFromFile("/etc/device.properties","WIFI_P2P_CTRL_INTERFACE=p2p0"); } @@ -300,6 +296,8 @@ TEST_F(MiracastServiceTest, RegisteredMethods) EXPECT_EQ(Core::ERROR_NONE, handler.Exists(_T("updatePlayerState"))); EXPECT_EQ(Core::ERROR_NONE, handler.Exists(_T("setP2PBackendDiscovery"))); + plugin->Deinitialize(nullptr); + removeEntryFromFile("/etc/device.properties","WIFI_P2P_CTRL_INTERFACE=p2p0"); removeFile("/var/run/wpa_supplicant/p2p0"); } @@ -329,6 +327,8 @@ TEST_F(MiracastServiceTest, P2P_DiscoveryStatus) EXPECT_EQ(Core::ERROR_NONE, handler.Invoke(connection, _T("getEnable"), _T("{}"), response)); EXPECT_EQ(response, string("{\"enabled\":false,\"success\":true}")); + plugin->Deinitialize(nullptr); + removeEntryFromFile("/etc/device.properties","WIFI_P2P_CTRL_INTERFACE=p2p0"); removeFile("/var/run/wpa_supplicant/p2p0"); } @@ -342,6 +342,8 @@ TEST_F(MiracastServiceTest, BackendDiscoveryStatus) EXPECT_EQ(Core::ERROR_NONE, handler.Invoke(connection, _T("setP2PBackendDiscovery"), _T("{\"enabled\": true}"), response)); + plugin->Deinitialize(nullptr); + removeEntryFromFile("/etc/device.properties","WIFI_P2P_CTRL_INTERFACE=p2p0"); removeFile("/var/run/wpa_supplicant/p2p0"); } @@ -438,6 +440,7 @@ TEST_F(MiracastServiceEventTest, stopClientConnection) EVENT_UNSUBSCRIBE(0, _T("onClientConnectionRequest"), _T("client.events"), message); + plugin->Deinitialize(nullptr); removeEntryFromFile("/etc/device.properties","WIFI_P2P_CTRL_INTERFACE=p2p0"); removeFile("/var/run/wpa_supplicant/p2p0"); @@ -622,6 +625,7 @@ TEST_F(MiracastServiceEventTest, P2P_GOMode_onClientConnectionAndLaunchRequest) EVENT_UNSUBSCRIBE(0, _T("onClientConnectionRequest"), _T("client.events"), message); EVENT_UNSUBSCRIBE(0, _T("onLaunchRequest"), _T("client.events"), message); + plugin->Deinitialize(nullptr); removeEntryFromFile("/etc/device.properties","WIFI_P2P_CTRL_INTERFACE=p2p0"); removeFile("/var/run/wpa_supplicant/p2p0"); @@ -703,6 +707,7 @@ TEST_F(MiracastServiceEventTest, onClientConnectionRequestRejected) EVENT_UNSUBSCRIBE(0, _T("onClientConnectionRequest"), _T("client.events"), message); + plugin->Deinitialize(nullptr); removeEntryFromFile("/etc/device.properties","WIFI_P2P_CTRL_INTERFACE=p2p0"); removeFile("/var/run/wpa_supplicant/p2p0"); @@ -799,6 +804,7 @@ TEST_F(MiracastServiceEventTest, P2P_CONNECT_FAIL_onClientConnectionError) EVENT_UNSUBSCRIBE(0, _T("onClientConnectionRequest"), _T("client.events"), message); EVENT_UNSUBSCRIBE(0, _T("onClientConnectionError"), _T("client.events"), message); + plugin->Deinitialize(nullptr); removeEntryFromFile("/etc/device.properties","WIFI_P2P_CTRL_INTERFACE=p2p0"); removeFile("/var/run/wpa_supplicant/p2p0"); @@ -912,6 +918,7 @@ TEST_F(MiracastServiceEventTest, P2P_GO_NEGOTIATION_FAIL_onClientConnectionError EVENT_UNSUBSCRIBE(0, _T("onClientConnectionRequest"), _T("client.events"), message); EVENT_UNSUBSCRIBE(0, _T("onClientConnectionError"), _T("client.events"), message); + plugin->Deinitialize(nullptr); removeEntryFromFile("/etc/device.properties","WIFI_P2P_CTRL_INTERFACE=p2p0"); removeFile("/var/run/wpa_supplicant/p2p0"); @@ -1032,6 +1039,7 @@ TEST_F(MiracastServiceEventTest, P2P_GO_FORMATION_FAIL_onClientConnectionError) EVENT_UNSUBSCRIBE(0, _T("onClientConnectionRequest"), _T("client.events"), message); EVENT_UNSUBSCRIBE(0, _T("onClientConnectionError"), _T("client.events"), message); + plugin->Deinitialize(nullptr); removeEntryFromFile("/etc/device.properties","WIFI_P2P_CTRL_INTERFACE=p2p0"); removeFile("/var/run/wpa_supplicant/p2p0"); @@ -1188,6 +1196,7 @@ TEST_F(MiracastServiceEventTest, P2P_ClientMode_onClientConnectionAndLaunchReque EVENT_UNSUBSCRIBE(0, _T("onClientConnectionRequest"), _T("client.events"), message); EVENT_UNSUBSCRIBE(0, _T("onLaunchRequest"), _T("client.events"), message); + plugin->Deinitialize(nullptr); removeEntryFromFile("/etc/device.properties","WIFI_P2P_CTRL_INTERFACE=p2p0"); removeFile("/var/run/wpa_supplicant/p2p0"); @@ -1296,6 +1305,7 @@ TEST_F(MiracastServiceEventTest, P2P_ClientMode_DirectonClientConnectionAndLaunc EVENT_UNSUBSCRIBE(0, _T("onClientConnectionRequest"), _T("client.events"), message); EVENT_UNSUBSCRIBE(0, _T("onLaunchRequest"), _T("client.events"), message); + plugin->Deinitialize(nullptr); removeEntryFromFile("/etc/device.properties","WIFI_P2P_CTRL_INTERFACE=p2p0"); removeFile("/var/run/wpa_supplicant/p2p0"); @@ -1398,6 +1408,7 @@ TEST_F(MiracastServiceEventTest, P2P_ClientMode_DirectGroupStartWithName) EVENT_UNSUBSCRIBE(0, _T("onClientConnectionRequest"), _T("client.events"), message); EVENT_UNSUBSCRIBE(0, _T("onLaunchRequest"), _T("client.events"), message); + plugin->Deinitialize(nullptr); removeEntryFromFile("/etc/device.properties","WIFI_P2P_CTRL_INTERFACE=p2p0"); removeFile("/var/run/wpa_supplicant/p2p0"); @@ -1500,6 +1511,7 @@ TEST_F(MiracastServiceEventTest, P2P_ClientMode_DirectGroupStartWithoutName) EVENT_UNSUBSCRIBE(0, _T("onClientConnectionRequest"), _T("client.events"), message); EVENT_UNSUBSCRIBE(0, _T("onLaunchRequest"), _T("client.events"), message); + plugin->Deinitialize(nullptr); removeEntryFromFile("/etc/device.properties","WIFI_P2P_CTRL_INTERFACE=p2p0"); removeFile("/var/run/wpa_supplicant/p2p0"); @@ -1626,6 +1638,7 @@ TEST_F(MiracastServiceEventTest, P2P_ClientMode_DirectP2PGoNegotiationGroupStart EVENT_UNSUBSCRIBE(0, _T("onClientConnectionRequest"), _T("client.events"), message); EVENT_UNSUBSCRIBE(0, _T("onLaunchRequest"), _T("client.events"), message); + plugin->Deinitialize(nullptr); removeEntryFromFile("/etc/device.properties","WIFI_P2P_CTRL_INTERFACE=p2p0"); removeFile("/var/run/wpa_supplicant/p2p0"); @@ -1784,6 +1797,7 @@ TEST_F(MiracastServiceEventTest, P2P_ClientMode_GENERIC_FAILURE) EVENT_UNSUBSCRIBE(0, _T("onClientConnectionRequest"), _T("client.events"), message); EVENT_UNSUBSCRIBE(0, _T("onClientConnectionError"), _T("client.events"), message); + plugin->Deinitialize(nullptr); removeEntryFromFile("/etc/device.properties","WIFI_P2P_CTRL_INTERFACE=p2p0"); removeFile("/var/run/wpa_supplicant/p2p0"); @@ -1926,6 +1940,7 @@ TEST_F(MiracastServiceEventTest, P2P_GOMode_GENERIC_FAILURE) EVENT_UNSUBSCRIBE(0, _T("onClientConnectionRequest"), _T("client.events"), message); EVENT_UNSUBSCRIBE(0, _T("onClientConnectionError"), _T("client.events"), message); + plugin->Deinitialize(nullptr); removeEntryFromFile("/etc/device.properties","WIFI_P2P_CTRL_INTERFACE=p2p0"); removeFile("/var/run/wpa_supplicant/p2p0"); @@ -2028,6 +2043,7 @@ TEST_F(MiracastServiceEventTest, P2P_GOMode_AutoConnect) sleep(10); + plugin->Deinitialize(nullptr); removeEntryFromFile("/etc/device.properties","WIFI_P2P_CTRL_INTERFACE=p2p0"); removeFile("/var/run/wpa_supplicant/p2p0"); @@ -2050,6 +2066,7 @@ TEST_F(MiracastServiceEventTest, powerStateChange) EXPECT_EQ(Core::ERROR_NONE, handler.Invoke(connection, _T("setEnable"), _T("{\"enabled\": false}"), response)); Plugin::MiracastServiceImplementation::_instance->onPowerModeChanged(WPEFramework::Exchange::IPowerManager::POWER_STATE_STANDBY_DEEP_SLEEP, WPEFramework::Exchange::IPowerManager::POWER_STATE_ON); EXPECT_EQ(Core::ERROR_NONE, handler.Invoke(connection, _T("setEnable"), _T("{\"enabled\": true}"), response)); + plugin->Deinitialize(nullptr); removeEntryFromFile("/etc/device.properties","WIFI_P2P_CTRL_INTERFACE=p2p0"); removeFile("/var/run/wpa_supplicant/p2p0"); From 7860630c4acf93da11142a8a7f1f51d5f8dafe08 Mon Sep 17 00:00:00 2001 From: mkumar705 Date: Fri, 30 Jan 2026 12:17:22 +0530 Subject: [PATCH 9/9] Update L1-tests.yml --- .github/workflows/L1-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/L1-tests.yml b/.github/workflows/L1-tests.yml index 8e6984eb..23f38f32 100755 --- a/.github/workflows/L1-tests.yml +++ b/.github/workflows/L1-tests.yml @@ -203,7 +203,7 @@ jobs: with: repository: rdkcentral/entservices-apis path: entservices-apis - ref: Test + ref: ${{env.INTERFACES_REF}} #token : ${{ secrets.RDKCM_RDKE }} run: rm -rf $GITHUB_WORKSPACE/entservices-apis/jsonrpc/DTV.json