[i-g-t 1/2] tests/intel/kms_cdclk: Use igt_assert_lte for CD clock frequency checks

Naladala Ramanaidu ramanaidu.naladala at intel.com
Fri Aug 9 22:23:36 UTC 2024


In the test_mode_transition and test_mode_transition_on_all_outputs
functions, replace igt_assert_lt with igt_assert_lte to ensure the
CD clock frequency check accounts for cases where the new frequency
is equal to the reference frequency. This change improves the
robustness of the tests by allowing for scenarios where the CD clock
frequency does not increase but remains the same.

Signed-off-by: Naladala Ramanaidu <ramanaidu.naladala at intel.com>
---
 tests/intel/kms_cdclk.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tests/intel/kms_cdclk.c b/tests/intel/kms_cdclk.c
index 6fe6e6c3f..24b49d1fd 100644
--- a/tests/intel/kms_cdclk.c
+++ b/tests/intel/kms_cdclk.c
@@ -262,7 +262,7 @@ static void test_mode_transition(data_t *data, enum pipe pipe, igt_output_t *out
 
 	/* cdclk should bump */
 	if (cdclk_new != MAX_CDCLK_4K)
-		igt_assert_lt(cdclk_ref, cdclk_new);
+		igt_assert_lte(cdclk_ref, cdclk_new);
 
 	/* cleanup */
 	do_cleanup_display(display);
@@ -358,7 +358,7 @@ static void test_mode_transition_on_all_outputs(data_t *data)
 	igt_info("CD clock frequency %d -> %d\n", cdclk_ref, cdclk_new);
 
 	/* cdclk should bump */
-	igt_assert_lt(cdclk_ref, cdclk_new);
+	igt_assert_lte(cdclk_ref, cdclk_new);
 
 	igt_plane_set_fb(plane, NULL);
 	do_cleanup_display(display);
-- 
2.43.0



More information about the Intel-gfx-trybot mailing list