summaryrefslogtreecommitdiff
path: root/tests/perf.c
diff options
context:
space:
mode:
authorLionel Landwerlin <lionel.g.landwerlin@intel.com>2018-12-11 18:06:46 +0000
committerLionel Landwerlin <lionel.g.landwerlin@intel.com>2018-12-14 13:59:25 +0000
commit3915d3e8652365a5b640850d1fbcb3b603d55cb3 (patch)
tree74dbc0d13ae5f3778d6d1ce92a8ebb09dd522b41 /tests/perf.c
parentad821d1dc5d0eea4ac3a0e8e29c56c7f66191108 (diff)
tests/perf: bump max number of block/poll interations
Those 2 tests fail regularly on HSW, probably because the OA period aligns slightly differently there because of the differnce in the timestamp frequency between HSW and other generation. Just bump the max number by 1 to fix the issue. Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=102252 Reviewed-by: Matthew Auld <matthew.auld@intel.com>
Diffstat (limited to 'tests/perf.c')
-rw-r--r--tests/perf.c16
1 files changed, 2 insertions, 14 deletions
diff --git a/tests/perf.c b/tests/perf.c
index 48b323e5..220c52ef 100644
--- a/tests/perf.c
+++ b/tests/perf.c
@@ -2025,7 +2025,7 @@ test_blocking(void)
int64_t tick_ns = 1000000000 / sysconf(_SC_CLK_TCK);
int64_t test_duration_ns = tick_ns * 1000;
- int max_iterations = (test_duration_ns / oa_period) + 1;
+ int max_iterations = (test_duration_ns / oa_period) + 2;
int n_extra_iterations = 0;
/* It's a bit tricky to put a lower limit here, but we expect a
@@ -2116,12 +2116,6 @@ test_blocking(void)
n++;
}
- /* Updated the maximum of iterations based on the time spent
- * in the loop.
- */
- max_iterations = (end - start) / oa_period + 1;
- igt_debug("adjusted max iter. = %d\n", max_iterations);
-
times(&end_times);
/* Using nanosecond units is fairly silly here, given the tick in-
@@ -2190,7 +2184,7 @@ test_polling(void)
int64_t tick_ns = 1000000000 / sysconf(_SC_CLK_TCK);
int64_t test_duration_ns = tick_ns * 1000;
- int max_iterations = (test_duration_ns / oa_period) + 1;
+ int max_iterations = (test_duration_ns / oa_period) + 2;
int n_extra_iterations = 0;
/* It's a bit tricky to put a lower limit here, but we expect a
@@ -2309,12 +2303,6 @@ test_polling(void)
n++;
}
- /* Updated the maximum of iterations based on the time spent
- * in the loop.
- */
- max_iterations = (end - start) / oa_period + 1;
- igt_debug("adjusted max iter. = %d\n", max_iterations);
-
times(&end_times);
/* Using nanosecond units is fairly silly here, given the tick in-