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

Signed-off-by: Harini Kumaran <[email protected]>
  • Loading branch information
harinik124 committed Sep 24, 2024
1 parent ab306e0 commit ca9f679
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
*
* Copyright (C) 2020-2023 Intel Corporation
* Copyright (C) 2020-2024 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
Expand All @@ -25,6 +25,9 @@ class TempModuleTest : public lzt::SysmanCtsClass {};
#define TEMPERATURE_TEST TempModuleTest
#endif // USE_ZESINIT

constexpr double invalid_min_temperature = 10;
constexpr double invalid_max_temperature = 125;

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 ca9f679

Please sign in to comment.