Skip to content

Commit

Permalink
Added min/max limit check for temperature in sysman temperature CTS
Browse files Browse the repository at this point in the history
Related-To: VLCLJ-2296
  • Loading branch information
harinik124 committed Sep 20, 2024
1 parent ab306e0 commit 2c379a7
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ class TempModuleTest : public lzt::SysmanCtsClass {};
#define TEMPERATURE_TEST TempModuleTest
#endif // USE_ZESINIT

constexpr uint32_t invalid_max_temperature = 125;
constexpr uint32_t invalid_min_temperature = 10;

TEST_F(
TEMPERATURE_TEST,
GivenComponentCountZeroWhenRetrievingTempHandlesThenNonZeroCountIsReturned) {
Expand Down Expand Up @@ -253,7 +256,8 @@ TEST_F(TEMPERATURE_TEST,
for (auto temp_handle : temp_handles) {
ASSERT_NE(nullptr, temp_handle);
auto temp = lzt::get_temp_state(temp_handle);
EXPECT_GT(temp, 0);
EXPECT_GT(temp, invalid_min_temperature);
EXPECT_LT(temp, invalid_max_temperature);
}
}
}
Expand Down

0 comments on commit 2c379a7

Please sign in to comment.