zone: Add debug interface to zone dbus path
- Add xyz.openbmc_project.Debug.Pid.Zone interface to fanctrl/zoneX dbus
to record the PID config name which is driving this zone.
TEST:
```
busctl introspect xyz.openbmc_project.State.FanCtrl /xyz/openbmc_project/settings/fanctrl/zone0 xyz.openbmc_project.Debug.Pid.Zone
NAME TYPE SIGNATURE RESULT/VALUE FLAGS
.Leader property s "CPU0_PID" emits-change
```
Signed-off-by: Harvey Wu <Harvey.Wu@quantatw.com>
Change-Id: I6fcfa596eec6b51a7727c2a01e7d36e3698eebcf
diff --git a/test/pid_zone_unittest.cpp b/test/pid_zone_unittest.cpp
index 8c55a70..391d026 100644
--- a/test/pid_zone_unittest.cpp
+++ b/test/pid_zone_unittest.cpp
@@ -26,6 +26,7 @@
using ::testing::StrEq;
static std::string modeInterface = "xyz.openbmc_project.Control.Mode";
+static std::string debugZoneInterface = "xyz.openbmc_project.Debug.Pid.Zone";
static std::string enableInterface = "xyz.openbmc_project.Object.Enable";
namespace
@@ -60,6 +61,8 @@
std::vector<std::string> properties;
SetupDbusObject(&sdbus_mock_mode, defer, objPath, modeInterface, properties,
&d);
+ SetupDbusObject(&sdbus_mock_mode, defer, objPath, debugZoneInterface,
+ properties, &d);
std::string sensorname = "temp1";
std::string pidsensorpath = "/xyz/openbmc_project/settings/fanctrl/zone1/" +
@@ -100,6 +103,8 @@
SetupDbusObject(&sdbus_mock_mode, defer, objPath, modeInterface,
properties, &property_index);
+ SetupDbusObject(&sdbus_mock_mode, defer, objPath, debugZoneInterface,
+ properties, &property_index);
SetupDbusObject(&sdbus_mock_enable, defer, pidsensorpath.c_str(),
enableInterface, propertiesenable,