[v2] glx-oml-sync-control-timing: Make test behavior more stable

Submitted by Illia Iorin on Aug. 16, 2018, 7:15 p.m.

Details

Message ID 20180816191503.15258-1-illia.iorin@gloaballogic.com
State New
Headers show
Series "glx-oml-sync-control-timing: Make test behavior more stable" ( rev: 2 ) in Piglit

Not browsing as part of any series.

Commit Message

Illia Iorin Aug. 16, 2018, 7:15 p.m.
It is not mentioned what deviation is permissible in OML Spec.
This fail condition correction helps ignore unstable work
of the window manager. The old condition was left, but the test
result was changed from fail to warn, added fail condition.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=89437
Cc: Michel Dänzer <michel.daenzer@amd.com>
Cc: Emil Velikov <emil.velikov@collabora.com>
Signed-off-by: Illia Iorin <illia.iorin@globallogic.com>
---
 tests/spec/glx_oml_sync_control/timing.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

Patch hide | download patch | download mbox

diff --git a/tests/spec/glx_oml_sync_control/timing.c b/tests/spec/glx_oml_sync_control/timing.c
index ab7258940..6d810af52 100644
--- a/tests/spec/glx_oml_sync_control/timing.c
+++ b/tests/spec/glx_oml_sync_control/timing.c
@@ -332,7 +332,10 @@  draw(Display *dpy)
 				" does not match glXGetMscRateOML %fus\n",
 				msc_wallclock_duration_stats.mean,
 				expected_msc_wallclock_duration);
-			result = PIGLIT_FAIL;
+			piglit_merge_result(&result, PIGLIT_WARN);
+			if (fabs(expected_msc_wallclock_duration -
+			 	 msc_wallclock_duration_stats.mean) > 200)
+				result = PIGLIT_FAIL;
 		}
 	}