Fix includes

Run misc-include-cleaner on the codebase and fix all the includes.

misc-include-cleaner gets some things wrong, so had edit those back to
previous.  It doesn't seem to like nlohmann or zone.hpp very much.

At some point in the future we could fix these, and get these enforced
at CI time.

Change-Id: Ie087e03dd26570db09e44e5b3f0641fb77668711
Signed-off-by: Ed Tanous <etanous@nvidia.com>
diff --git a/test/controller_mock.hpp b/test/controller_mock.hpp
index 533b6db..30b7bef 100644
--- a/test/controller_mock.hpp
+++ b/test/controller_mock.hpp
@@ -4,6 +4,8 @@
 #include "pid/pidcontroller.hpp"
 #include "pid/zone_interface.hpp"
 
+#include <string>
+
 #include <gmock/gmock.h>
 
 namespace pid_control
diff --git a/test/dbus_passive_unittest.cpp b/test/dbus_passive_unittest.cpp
index 9989e0d..c7e1346 100644
--- a/test/dbus_passive_unittest.cpp
+++ b/test/dbus_passive_unittest.cpp
@@ -1,16 +1,21 @@
 #include "conf.hpp"
+#include "dbus/dbushelper_interface.hpp"
 #include "dbus/dbuspassive.hpp"
-#include "failsafeloggers/builder.hpp"
-#include "failsafeloggers/failsafe_logger.hpp"
-#include "failsafeloggers/failsafe_logger_utility.hpp"
+#include "interfaces.hpp"
 #include "test/dbushelper_mock.hpp"
 
+#include <systemd/sd-bus.h>
+
+#include <sdbusplus/bus.hpp>
+#include <sdbusplus/message.hpp>
 #include <sdbusplus/test/sdbus_mock.hpp>
 
+#include <cmath>
+#include <cstdint>
 #include <functional>
 #include <memory>
 #include <string>
-#include <variant>
+#include <utility>
 
 #include <gmock/gmock.h>
 #include <gtest/gtest.h>
diff --git a/test/dbus_util_unittest.cpp b/test/dbus_util_unittest.cpp
index 09d1b5c..7ae303b 100644
--- a/test/dbus_util_unittest.cpp
+++ b/test/dbus_util_unittest.cpp
@@ -1,5 +1,7 @@
 #include "dbus/dbusutil.hpp"
 
+#include <cstdint>
+#include <map>
 #include <string>
 #include <tuple>
 #include <unordered_map>
diff --git a/test/dbushelper_mock.hpp b/test/dbushelper_mock.hpp
index b11eff3..646ddd1 100644
--- a/test/dbushelper_mock.hpp
+++ b/test/dbushelper_mock.hpp
@@ -1,7 +1,6 @@
 #pragma once
 
 #include "dbus/dbushelper_interface.hpp"
-#include "util.hpp"
 
 #include <string>
 
diff --git a/test/helpers.hpp b/test/helpers.hpp
index c1715fe..bcb269a 100644
--- a/test/helpers.hpp
+++ b/test/helpers.hpp
@@ -1,6 +1,8 @@
 // THIS EXISTS AS A COPY OF SDBUSPLUS/TEST/HELPERS.HPP until that is merged.
 #pragma once
 
+#include <systemd/sd-bus.h>
+
 #include <sdbusplus/test/sdbus_mock.hpp>
 
 #include <string>
diff --git a/test/json_parse_unittest.cpp b/test/json_parse_unittest.cpp
index f8967de..3a157a2 100644
--- a/test/json_parse_unittest.cpp
+++ b/test/json_parse_unittest.cpp
@@ -1,7 +1,6 @@
 #include "buildjson/buildjson.hpp"
 #include "errors/exception.hpp"
 
-#include <gmock/gmock.h>
 #include <gtest/gtest.h>
 
 namespace pid_control
diff --git a/test/pid_fancontroller_unittest.cpp b/test/pid_fancontroller_unittest.cpp
index 3fc6433..315931f 100644
--- a/test/pid_fancontroller_unittest.cpp
+++ b/test/pid_fancontroller_unittest.cpp
@@ -1,14 +1,14 @@
-#include "config.h"
 
-#include "failsafeloggers/builder.hpp"
-#include "failsafeloggers/failsafe_logger.hpp"
-#include "failsafeloggers/failsafe_logger_utility.hpp"
-#include "pid/ec/logging.hpp"
 #include "pid/ec/pid.hpp"
+#include "pid/fan.hpp"
 #include "pid/fancontroller.hpp"
+#include "pid/pidcontroller.hpp"
+#include "sensors/sensor.hpp"
 #include "test/sensor_mock.hpp"
 #include "test/zone_mock.hpp"
 
+#include <cstdint>
+#include <memory>
 #include <string>
 #include <vector>
 
diff --git a/test/pid_json_unittest.cpp b/test/pid_json_unittest.cpp
index 59db343..690e6dd 100644
--- a/test/pid_json_unittest.cpp
+++ b/test/pid_json_unittest.cpp
@@ -1,6 +1,12 @@
+#include "conf.hpp"
 #include "pid/buildjson.hpp"
 
-#include <gmock/gmock.h>
+#include <sys/types.h>
+
+#include <cstdint>
+#include <map>
+#include <tuple>
+
 #include <gtest/gtest.h>
 
 namespace pid_control
diff --git a/test/pid_stepwisecontroller_unittest.cpp b/test/pid_stepwisecontroller_unittest.cpp
index a832ed7..c730606 100644
--- a/test/pid_stepwisecontroller_unittest.cpp
+++ b/test/pid_stepwisecontroller_unittest.cpp
@@ -3,6 +3,8 @@
 #include "pid/stepwisecontroller.hpp"
 #include "test/zone_mock.hpp"
 
+#include <limits>
+#include <memory>
 #include <string>
 #include <vector>
 
diff --git a/test/pid_thermalcontroller_unittest.cpp b/test/pid_thermalcontroller_unittest.cpp
index b4b1e5d..49e0ef6 100644
--- a/test/pid_thermalcontroller_unittest.cpp
+++ b/test/pid_thermalcontroller_unittest.cpp
@@ -1,9 +1,11 @@
 #include "conf.hpp"
-#include "pid/ec/logging.hpp"
 #include "pid/ec/pid.hpp"
+#include "pid/pidcontroller.hpp"
 #include "pid/thermalcontroller.hpp"
 #include "test/zone_mock.hpp"
 
+#include <exception>
+#include <memory>
 #include <string>
 #include <vector>
 
diff --git a/test/pid_zone_unittest.cpp b/test/pid_zone_unittest.cpp
index 37fb0fa..fee388c 100644
--- a/test/pid_zone_unittest.cpp
+++ b/test/pid_zone_unittest.cpp
@@ -1,20 +1,29 @@
+#include "conf.hpp"
 #include "failsafeloggers/builder.hpp"
-#include "failsafeloggers/failsafe_logger.hpp"
-#include "failsafeloggers/failsafe_logger_utility.hpp"
-#include "pid/ec/logging.hpp"
+#include "interfaces.hpp"
 #include "pid/ec/pid.hpp"
+#include "pid/pidcontroller.hpp"
 #include "pid/zone.hpp"
+#include "pid/zone_interface.hpp"
 #include "sensors/manager.hpp"
+#include "sensors/sensor.hpp"
 #include "test/controller_mock.hpp"
 #include "test/helpers.hpp"
 #include "test/sensor_mock.hpp"
 
+#include <systemd/sd-bus.h>
+
 #include <sdbusplus/test/sdbus_mock.hpp>
 
 #include <chrono>
+#include <cstdint>
 #include <cstring>
+#include <map>
+#include <memory>
 #include <optional>
+#include <string>
 #include <unordered_map>
+#include <utility>
 #include <vector>
 
 #include <gmock/gmock.h>
diff --git a/test/sensor_host_unittest.cpp b/test/sensor_host_unittest.cpp
index 5e958c0..61d1ed6 100644
--- a/test/sensor_host_unittest.cpp
+++ b/test/sensor_host_unittest.cpp
@@ -1,12 +1,14 @@
-#include "failsafeloggers/builder.hpp"
-#include "failsafeloggers/failsafe_logger.hpp"
-#include "failsafeloggers/failsafe_logger_utility.hpp"
+#include "interfaces.hpp"
 #include "sensors/host.hpp"
+#include "sensors/sensor.hpp"
 #include "test/helpers.hpp"
 
+#include <systemd/sd-bus.h>
+
 #include <sdbusplus/test/sdbus_mock.hpp>
 
 #include <chrono>
+#include <cstdint>
 #include <memory>
 #include <string>
 #include <vector>
diff --git a/test/sensor_manager_unittest.cpp b/test/sensor_manager_unittest.cpp
index 85865a8..063aac3 100644
--- a/test/sensor_manager_unittest.cpp
+++ b/test/sensor_manager_unittest.cpp
@@ -1,8 +1,14 @@
 #include "sensors/manager.hpp"
+#include "sensors/sensor.hpp"
 #include "test/sensor_mock.hpp"
 
 #include <sdbusplus/test/sdbus_mock.hpp>
 
+#include <cstdint>
+#include <memory>
+#include <string>
+#include <utility>
+
 #include <gmock/gmock.h>
 #include <gtest/gtest.h>
 
diff --git a/test/sensor_mock.hpp b/test/sensor_mock.hpp
index ae4cf13..2016156 100644
--- a/test/sensor_mock.hpp
+++ b/test/sensor_mock.hpp
@@ -3,6 +3,9 @@
 #include "interfaces.hpp"
 #include "sensors/sensor.hpp"
 
+#include <cstdint>
+#include <string>
+
 #include <gmock/gmock.h>
 
 namespace pid_control
diff --git a/test/sensor_pluggable_unittest.cpp b/test/sensor_pluggable_unittest.cpp
index ffd08cd..98dd3ce 100644
--- a/test/sensor_pluggable_unittest.cpp
+++ b/test/sensor_pluggable_unittest.cpp
@@ -1,8 +1,13 @@
+#include "interfaces.hpp"
 #include "sensors/pluggable.hpp"
 #include "test/readinterface_mock.hpp"
 #include "test/writeinterface_mock.hpp"
 
 #include <chrono>
+#include <cstdint>
+#include <memory>
+#include <string>
+#include <utility>
 
 #include <gmock/gmock.h>
 #include <gtest/gtest.h>
diff --git a/test/sensors_json_unittest.cpp b/test/sensors_json_unittest.cpp
index 257b6d7..611c724 100644
--- a/test/sensors_json_unittest.cpp
+++ b/test/sensors_json_unittest.cpp
@@ -1,7 +1,8 @@
 #include "sensors/buildjson.hpp"
 #include "sensors/sensor.hpp"
 
-#include <gmock/gmock.h>
+#include <sys/types.h>
+
 #include <gtest/gtest.h>
 
 namespace pid_control
diff --git a/test/util_unittest.cpp b/test/util_unittest.cpp
index 457c470..b74cccf 100644
--- a/test/util_unittest.cpp
+++ b/test/util_unittest.cpp
@@ -2,7 +2,6 @@
 
 #include <string>
 
-#include <gmock/gmock.h>
 #include <gtest/gtest.h>
 
 namespace pid_control
diff --git a/test/writeinterface_mock.hpp b/test/writeinterface_mock.hpp
index 409178c..7bf6f1c 100644
--- a/test/writeinterface_mock.hpp
+++ b/test/writeinterface_mock.hpp
@@ -2,6 +2,8 @@
 
 #include "interfaces.hpp"
 
+#include <cstdint>
+
 #include <gmock/gmock.h>
 
 namespace pid_control
diff --git a/test/zone_mock.hpp b/test/zone_mock.hpp
index dcf6b2a..7d3a199 100644
--- a/test/zone_mock.hpp
+++ b/test/zone_mock.hpp
@@ -1,8 +1,14 @@
 #pragma once
 
+#include "interfaces.hpp"
 #include "pid/zone_interface.hpp"
+#include "sensors/sensor.hpp"
 
+#include <cstdint>
+#include <map>
 #include <string>
+#include <string_view>
+#include <utility>
 #include <vector>
 
 #include <gmock/gmock.h>