summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSowmya Kaparthi <sowmyax.kaparthi@intel.com>2020-08-31 14:37:49 +0000
committerLionel Landwerlin <lionel.g.landwerlin@intel.com>2020-09-01 10:26:25 +0300
commit58cb0aea18fa471af43c11ee9f587554721a7815 (patch)
treefcef7ec3696be74f10c7a06a4f62fac894c4d241
parent2a5db9f60241383272aeec176e1b97b3f487209f (diff)
tests/perf: Dropping kernel_ns check for parameterized tests
In this patch kernel_ns is not checked at all because the intent of the test is to make sure we are woken up a predetermined number of times for different values of hrtimer. Cc: Landwerlin, Lionel G <lionel.g.landwerlin@intel.com> Signed-off-by: Sowmya Kaparthi <sowmyax.kaparthi@intel.com> Reviewed-by: Landwerlin, Lionel G <lionel.g.landwerlin@intel.com>
-rw-r--r--tests/i915/perf.c20
1 files changed, 4 insertions, 16 deletions
diff --git a/tests/i915/perf.c b/tests/i915/perf.c
index 20d0cc82..ba477f1c 100644
--- a/tests/i915/perf.c
+++ b/tests/i915/perf.c
@@ -1993,7 +1993,6 @@ test_blocking(uint64_t requested_oa_period, bool set_kernel_hrtimer, uint64_t ke
int64_t start, end;
int n = 0;
- uint64_t max_expected_kernel_ns;
stream_fd = __perf_open(drm_fd, &param, true /* prevent_pm */);
@@ -2099,13 +2098,8 @@ test_blocking(uint64_t requested_oa_period, bool set_kernel_hrtimer, uint64_t ke
*/
igt_assert(n > (min_iterations + n_extra_iterations));
- if (set_kernel_hrtimer) {
- max_expected_kernel_ns = kernel_hrtimer * (test_duration_ns / 100)
- /(5 * 1000 * 1000);
- } else {
- max_expected_kernel_ns = test_duration_ns / 100;
- }
- igt_assert(kernel_ns <= max_expected_kernel_ns);
+ if (!set_kernel_hrtimer)
+ igt_assert(kernel_ns <= (test_duration_ns / 100ull));
__perf_close(stream_fd);
}
@@ -2159,7 +2153,6 @@ test_polling(uint64_t requested_oa_period, bool set_kernel_hrtimer, uint64_t ker
int min_iterations = (test_duration_ns / (oa_period + (kernel_hrtimer + kernel_hrtimer / 5)));
int64_t start, end;
int n = 0;
- uint64_t max_expected_kernel_ns;
stream_fd = __perf_open(drm_fd, &param, true /* prevent_pm */);
@@ -2294,13 +2287,8 @@ test_polling(uint64_t requested_oa_period, bool set_kernel_hrtimer, uint64_t ker
*/
igt_assert(n > (min_iterations + n_extra_iterations));
- if (set_kernel_hrtimer) {
- max_expected_kernel_ns = kernel_hrtimer * (test_duration_ns / 100)
- /(5 * 1000 * 1000);
- } else {
- max_expected_kernel_ns = test_duration_ns / 100;
- }
- igt_assert(kernel_ns <= max_expected_kernel_ns);
+ if (!set_kernel_hrtimer)
+ igt_assert(kernel_ns <= (test_duration_ns / 100ull));
__perf_close(stream_fd);
}