summaryrefslogtreecommitdiff
path: root/tests/gem_wait.c
AgeCommit message (Collapse)Author
2018-07-06lib: Convert spin batch constructor to a factoryChris Wilson
In order to make adding more options easier, expose the full set of options to the caller. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Cc: Petri Latvala <petri.latvala@intel.com> Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
2018-05-03igt/gem_wait: Relax assertion for wait completionChris Wilson
When waiting for a finite batch, all that we require is that the batch completes. If it takes the full second (or longer) for us to wake up and notice the completed batch is immaterial, so only assert that we don't report an infinite timeout afterwards. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
2018-03-20igt: Replace 'all-engines' magic numbers with macroAntonio Argenziano
In interfaces where a parameter allow to select an engine, we usually use '-1' or '~0u' to select all engines. This patch replaces magic numbers with a named constant. Suggested-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Antonio Argenziano <antonio.argenziano@intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2018-02-23tests/gem_wait: use igt_corkDaniele Ceraolo Spurio
With igt_cork added as common utility we can use it instead of the local copy Signed-off-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com> Signed-off-by: Antonio Argenziano <antonio.argenziano@intel.com> Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-09-07igt/gem_exec_schedule: Basic tests for preemptionChris Wilson
We queue N low priority hanging batches across the engines and check that our high priority write over takes them. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Michał Winiarski <michal.winiarski@intel.com>
2017-03-08igt: Markup more tests that require GEMChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-02-12igt/gem_wait: Expand testing to waits on write fencesChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-02-08igt/gem_wait: Inject hangs again for hang-wait-*Chris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-02-08igt/gem_wait: Exercise BUG_ON if wait_for_execute times outChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-11-29igt/gem_wait: Use new igt_spin_batchAbdiel Janulgue
v7: Adapt to api rename v8: Restore sanitycheck wait on the recursive batch and avoid using C99 locals (Chris Wilson) v9: Explicitly quit the batch instead of timing out right away v10: Adapt to api rename Cc: Chris Wilson <chris@chris-wilson.co.uk> Cc: Daniel Vetter <daniel.vetter@ffwll.ch> Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com> Signed-off-by: Abdiel Janulgue <abdiel.janulgue@linux.intel.com>
2016-10-13igt/gem_wait: munmap the batch along all pathsChris Wilson
Move the munmap() to the common path to ensure it is released at the end of each test. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-10-13igt/gem_wait: Use explicit timersChris Wilson
Rather than guestimating a workload that should take a certain amount of time, use a sigitimer to terminate a batch (and so complete the wait) after an exact amount of time. And in the process expand testing to cover multiple rings and hangcheck. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-02-23lib: Move gem_wait() to ioctl-wrappersChris Wilson
We intend to use gem_wait() in more tests than gem_wait.c, so move the simple ioctl wrapper into the core. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-02-18igt/gem_ctx_thrash: Combine context thrashing with a render testChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-09-11convert drm_open_any*() calls to drm_open_driver*(DRIVER_INTEL) calls with cocciMicah Fedke
Apply the new API to all call sites within the test suite using the following semantic patch: // Semantic patch for replacing drm_open_any* with arch-specific drm_open_driver* calls @@ identifier i =~ "\bdrm_open_any\b"; @@ - i() + drm_open_driver(DRIVER_INTEL) @@ identifier i =~ "\bdrm_open_any_master\b"; @@ - i() + drm_open_driver_master(DRIVER_INTEL) @@ identifier i =~ "\bdrm_open_any_render\b"; @@ - i() + drm_open_driver_render(DRIVER_INTEL) @@ identifier i =~ "\b__drm_open_any\b"; @@ - i() + __drm_open_driver(DRIVER_INTEL) Signed-off-by: Micah Fedke <micah.fedke@collabora.co.uk> Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-08-21lib: add a single include headerThomas Wood
Add a header that includes all the headers for the library. This allows reorganisation of the library without affecting programs using it and also simplifies the headers that need to be included to use the library. Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-08-12tests: Document ABI extension catchersDaniel Vetter
Our invalid-flags/params testcases are meant to catch abi extensions by just testing for the next available flag/param. Unfortunately we need that since without those we forgot to write testcases for these new flags way too often :( But it's not entirely clear why this is, so document this trick with comments. Also gem_wait wasn't this paranoid, so change the testcase to be so. Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2015-03-19igt/gem_wait: When waiting for infinity, an infinity remainsChris Wilson
Incorrect testing of out parameters leads to bug noise... Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=89494#c4 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-03-06igt/gem_wait: Test negative timeoutsChris Wilson
The user should be able to specify a negative timeout to indefinitely wait upon a bo becoming idle. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-03-06igt/gem_wait: Timeout parameter to the WAIT ioctl is signedChris Wilson
So convert from uint64_t to int64_t. The distinction becomes important when you realise what test we were missing... Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-02-27lib: add igt_assert_ltDaniel Vetter
Found one user in gem_wait.c Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2014-10-06gem_wait: Use PRIu64 in format stringDamien Lespiau
../../tests/gem_wait.c: In function ‘render_timeout’: ../../tests/gem_wait.c:182:3: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 3 has type ‘uint64_t’ [-Wformat=] igt_info("Finished with %llu time remaining\n", timeout); Cc: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2014-10-06tests/gem_wait: Don't close drmfd in subtestDaniel Vetter
I didn't notice this on the machine I developed it since the original wait testcase fails there. Oops. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-09-29tests/gem_wait: argument validation testsDaniel Vetter
Shockingly we don't check for 0 flags! Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2014-09-29tests/gem_wait_render_timeout: Convert to subtestsDaniel Vetter
I want to add a bunch of api tests besides the functional "render-timeout" testcase. Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>