Skip to content

Commit b2d1710

Browse files
authored
Added min/max limit check for temperature in sysman temperature CTS (#74)
Related-To: VLCLJ-2296 Signed-off-by: Harini Kumaran <[email protected]>
1 parent 38c4b52 commit b2d1710

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

conformance_tests/sysman/test_sysman_temperature/src/test_sysman_temperature.cpp

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
*
3-
* Copyright (C) 2020-2023 Intel Corporation
3+
* Copyright (C) 2020-2024 Intel Corporation
44
*
55
* SPDX-License-Identifier: MIT
66
*
@@ -25,6 +25,9 @@ class TempModuleTest : public lzt::SysmanCtsClass {};
2525
#define TEMPERATURE_TEST TempModuleTest
2626
#endif // USE_ZESINIT
2727

28+
constexpr double max_valid_temperature = 125;
29+
constexpr double min_valid_temperature = 10;
30+
2831
TEST_F(
2932
TEMPERATURE_TEST,
3033
GivenComponentCountZeroWhenRetrievingTempHandlesThenNonZeroCountIsReturned) {
@@ -252,8 +255,9 @@ TEST_F(TEMPERATURE_TEST,
252255

253256
for (auto temp_handle : temp_handles) {
254257
ASSERT_NE(nullptr, temp_handle);
255-
auto temp = lzt::get_temp_state(temp_handle);
256-
EXPECT_GT(temp, 0);
258+
auto current_temperature = lzt::get_temp_state(temp_handle);
259+
EXPECT_GE(current_temperature, min_valid_temperature);
260+
EXPECT_LE(current_temperature, max_valid_temperature);
257261
}
258262
}
259263
}

0 commit comments

Comments
 (0)