From d4c181164ab91481bd6085995726b4322213087e Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 17 Mar 2026 06:04:19 +0000 Subject: [PATCH 1/2] Initial plan From f09bcef62b7194fb3471eefa8ab43a5e1c862cd0 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 17 Mar 2026 06:09:56 +0000 Subject: [PATCH 2/2] Add VBN/QA unit tests and FRIEND_TEST declarations for isSecureDbgSrvUnlocked Co-authored-by: KTirumalaSrihari <102281309+KTirumalaSrihari@users.noreply.github.com> --- rfcMgr/gtest/gtest_main.cpp | 16 ++++++++++++++++ rfcMgr/rfc_xconf_handler.h | 7 +++++++ 2 files changed, 23 insertions(+) diff --git a/rfcMgr/gtest/gtest_main.cpp b/rfcMgr/gtest/gtest_main.cpp index cabff72b..a470cce9 100644 --- a/rfcMgr/gtest/gtest_main.cpp +++ b/rfcMgr/gtest/gtest_main.cpp @@ -618,6 +618,22 @@ TEST(rfcMgrTest, isSecureDbgSrvUnlocked_labsigned_DbgSrv_false) { EXPECT_EQ(result, false); } +TEST(rfcMgrTest, isSecureDbgSrvUnlocked_vbn) { + writeToTr181storeFile("BUILD_TYPE", "vbn", "/tmp/device.properties", Plain); + RuntimeFeatureControlProcessor *rfcObj = new RuntimeFeatureControlProcessor(); + bool result = rfcObj->isSecureDbgSrvUnlocked(); + delete rfcObj; + EXPECT_EQ(result, false); +} + +TEST(rfcMgrTest, isSecureDbgSrvUnlocked_qa) { + writeToTr181storeFile("BUILD_TYPE", "qa", "/tmp/device.properties", Plain); + RuntimeFeatureControlProcessor *rfcObj = new RuntimeFeatureControlProcessor(); + bool result = rfcObj->isSecureDbgSrvUnlocked(); + delete rfcObj; + EXPECT_EQ(result, false); +} + TEST(rfcMgrTest, isDebugServicesEnabled) { writeToTr181storeFile("Device.DeviceInfo.X_RDKCENTRAL-COM_RFC.Identity.DbgServices.Enable", "true", "/opt/secure/RFC/tr181store.ini", Quoted); RuntimeFeatureControlProcessor *rfcObj = new RuntimeFeatureControlProcessor(); diff --git a/rfcMgr/rfc_xconf_handler.h b/rfcMgr/rfc_xconf_handler.h index 76c03c52..1a098bfd 100644 --- a/rfcMgr/rfc_xconf_handler.h +++ b/rfcMgr/rfc_xconf_handler.h @@ -230,6 +230,13 @@ class RuntimeFeatureControlProcessor : public xconf::XconfHandler FRIEND_TEST(rfcMgrTest, getJsonRpc); FRIEND_TEST(rfcMgrTest, cleanAllFile); FRIEND_TEST(rfcMgrTest, checkWhoamiSupport); + FRIEND_TEST(rfcMgrTest, isSecureDbgSrvUnlocked_dev); + FRIEND_TEST(rfcMgrTest, isSecureDbgSrvUnlocked_labsigned_true); + FRIEND_TEST(rfcMgrTest, isSecureDbgSrvUnlocked_prod); + FRIEND_TEST(rfcMgrTest, isSecureDbgSrvUnlocked_dType_prod); + FRIEND_TEST(rfcMgrTest, isSecureDbgSrvUnlocked_labsigned_DbgSrv_false); + FRIEND_TEST(rfcMgrTest, isSecureDbgSrvUnlocked_vbn); + FRIEND_TEST(rfcMgrTest, isSecureDbgSrvUnlocked_qa); FRIEND_TEST(rfcMgrTest, isDebugServicesEnabled); FRIEND_TEST(rfcMgrTest, isMaintenanceEnabled); FRIEND_TEST(rfcMgrTest, GetOsClass);