dbus-sensors: Fix dbus sensor getConfiguration() failing
Fix typo to have the correct interface name
Tested:
Test qtv with mimik, bring down the flakiness
from 20% to <1%
http://sponge2/b6153cfb-0b09-4850-ac96-b218cf364f48
https://fusion2.corp.google.com/524eeba3-a9ae-368e-9092-72b6ef5d9780
https://fusion2.corp.google.com/c1251504-997d-3797-b464-cbc7206ddd2a
https://fusion2.corp.google.com/6bd9cf6d-9fe9-3b0a-a129-c21470c991e6
https://fusion2.corp.google.com/e7336b1b-82e6-3b4e-a542-1fa33949d716
https://fusion2.corp.google.com/0acdd768-29fa-3513-bae1-d926cc56c490
Google-Bug-Id: 427267248
Change-Id: I57df6b7d2a4a6178de33106b4a9c2a9dae344209
Signed-off-by: Jason Fan <fanjason@google.com>
diff --git a/recipes-phosphor/sensors/dbus-sensors/0001-fix-dbus-sensor-typo.patch b/recipes-phosphor/sensors/dbus-sensors/0001-fix-dbus-sensor-typo.patch
new file mode 100644
index 0000000..7fa4aa1
--- /dev/null
+++ b/recipes-phosphor/sensors/dbus-sensors/0001-fix-dbus-sensor-typo.patch
@@ -0,0 +1,49 @@
+From 86aa169602efd0b2f56f2cd11858df44854e5bff Mon Sep 17 00:00:00 2001
+From: Jason Fan <fanjason@google.com>
+Date: Tue, 1 Jul 2025 15:47:18 +0000
+Subject: [PATCH] fix dbus sensor typo.
+
+Signed-off-by: Jason Fan <fanjason@google.com>
+
+diff --git a/src/Utils.hpp b/src/Utils.hpp
+index e1b7d43..df73a50 100644
+--- a/src/Utils.hpp
++++ b/src/Utils.hpp
+@@ -312,11 +312,13 @@ struct GetSensorConfiguration :
+
+ std::shared_ptr<GetSensorConfiguration> self = shared_from_this();
+ dbusConnection->async_method_call(
+- [self, interfaces, retries](const boost::system::error_code ec,
+- const GetSubTreeType& ret) {
++ [self, interfaces, retries, types](
++ const boost::system::error_code ec,
++ const GetSubTreeType& ret) {
+ if (ec)
+ {
+- std::cerr << "Error calling mapper\n";
++ std::cerr << "Error calling mapper retries = "
++ << retries << std::endl;
+ if (retries == 0U)
+ {
+ return;
+@@ -324,14 +326,14 @@ struct GetSensorConfiguration :
+ auto timer = std::make_shared<boost::asio::steady_timer>(
+ self->dbusConnection->get_io_context());
+ timer->expires_after(std::chrono::seconds(10));
+- timer->async_wait([self, timer, interfaces,
+- retries](boost::system::error_code ec) {
++ timer->async_wait([self, timer, types, retries](
++ boost::system::error_code ec) {
+ if (ec)
+ {
+ std::cerr << "Timer error!\n";
+ return;
+ }
+- self->getConfiguration(interfaces, retries - 1);
++ self->getConfiguration(types, retries - 1);
+ });
+
+ return;
+--
+2.50.0.727.gbf7dc18ff4-goog
+
diff --git a/recipes-phosphor/sensors/dbus-sensors_%.bbappend b/recipes-phosphor/sensors/dbus-sensors_%.bbappend
index 6a8cb1f..b908e1c 100644
--- a/recipes-phosphor/sensors/dbus-sensors_%.bbappend
+++ b/recipes-phosphor/sensors/dbus-sensors_%.bbappend
@@ -21,6 +21,7 @@
file://0012-TDA38740-PSUSensor-support.patch \
file://0001-Add-SkipDbusRead-property-to-sensor-EM-configs.patch \
file://0001-Ensure-sysfs-files-always-open-non-blocking.patch \
+ file://0001-fix-dbus-sensor-typo.patch \
"
# TODO(linchuyuan@google.com): remove the following section once the upstream has the change