[PATCH i-g-t v2] tests/kms_flip: Skip timestamp checks in Intel simulation environments

Naladala Ramanaidu ramanaidu.naladala at intel.com
Tue Jul 8 10:08:13 UTC 2025


Bypass timestamp and sequence validations when INTEL_SIMULATION is
active to accommodate non-deterministic timing in simulated test
environments.

v2: Use existing function for reading environment variables. (kamil)

Signed-off-by: Naladala Ramanaidu <ramanaidu.naladala at intel.com>
---
 tests/kms_flip.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/tests/kms_flip.c b/tests/kms_flip.c
index 382b92d9a..0cebbecac 100755
--- a/tests/kms_flip.c
+++ b/tests/kms_flip.c
@@ -321,7 +321,19 @@ static bool should_skip_ts_checks(void) {
 	 * timestamp to drift with a relatively larger standard deviation over a large sample.
 	 * As it's a known issue, skip any Timestamp or Sequence checks for MTK drivers.
 	 */
-	return is_mtk_device(drm_fd);
+	if (is_mtk_device(drm_fd))
+		return true;
+
+	/*
+	 * In simulation environments, hardware behavior may not accurately reflect real-world
+	 * timing characteristics. To avoid false negatives in tests due to simulated timing
+	 * artifacts, skip timestamp and sequence checks when the INTEL_SIMULATION environment
+	 * variable is set to a truthy value.
+	 */
+	if (igt_run_in_simulation())
+		return true;
+
+	return false;
 }
 
 static bool vblank_dependence(int flags)
-- 
2.43.0



More information about the igt-dev mailing list