Skip to content

Commit

Permalink
Initialize fan_service config member in hwtest
Browse files Browse the repository at this point in the history
Summary:
This was masking Janga/Tahan fan service issues.
I verified no other NPIs were impacted.

Reviewed By: alandau

Differential Revision: D67762321

fbshipit-source-id: 704047537e08f3a3c47bc3cee0e80921c5da62ac
  • Loading branch information
Justin Kim authored and facebook-github-bot committed Jan 6, 2025
1 parent fafe1ab commit 2bb9a45
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion fboss/platform/fan_service/ControlLogic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -468,7 +468,7 @@ void ControlLogic::programLed(const Fan& fan, bool fanFailed) {
(fanFailed ? "Fail" : "Good"),
valueToWrite);
} else {
XLOG(DBG1) << fmt::format(
XLOG(INFO) << fmt::format(
"{}: FAN LED sysfs path is empty. It's likely that FAN LED is controlled by hardware.",
*fan.fanName());
}
Expand Down
10 changes: 5 additions & 5 deletions fboss/platform/fan_service/hw_test/FanServiceHwTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,14 @@ class FanServiceHwTest : public ::testing::Test {
public:
void SetUp() override {
std::string fanServiceConfJson = ConfigLib().getFanServiceConfig();
auto config =
fanServiceConfig_ =
apache::thrift::SimpleJSONSerializer::deserialize<FanServiceConfig>(
fanServiceConfJson);
XLOG(INFO) << apache::thrift::SimpleJSONSerializer::serialize<std::string>(
config);
auto pBsp = std::make_shared<Bsp>(config);
auto pBsp = std::make_shared<Bsp>(fanServiceConfig_);
EXPECT_NO_THROW(
controlLogic_ = std::make_unique<ControlLogic>(config, pBsp));
controlLogic_ =
std::make_unique<ControlLogic>(fanServiceConfig_, pBsp));
EXPECT_FALSE(fanServiceConfig_.fans()->empty());
}

std::unique_ptr<ControlLogic> controlLogic_;
Expand Down

0 comments on commit 2bb9a45

Please sign in to comment.