summaryrefslogtreecommitdiff
path: root/tests
AgeCommit message (Collapse)Author
2015-02-13lib/igt_aux: s/swap/igt_swap/Daniel Vetter
It collides with the subtest naming convention glossary entry for swap. Which makes the docbook xml stuff unhappy. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2015-02-13tests: Align subtest with naming conventionDaniel Vetter
Yeah, historically grown but we should try to be somewhat consistent. It helps with filtering testcases. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2015-02-13tests/gem_ppgtt: Start rcs before bcs for context testsDaniel Vetter
This way the igt_require for the ctx support is hit before we've launched a bazillion threads and need to wait until they're all done. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2015-02-13tests: Add invalid pad tests for ctx create/destroyDaniel Vetter
We've missed them, and the kernel isn't nasty enough and forgot to check them. To add these tests convert the existing create/destroy tests over to subtests. v2: Do the basic create/destroy in ctx_bad_destroy in a fixture so that all the tests skip properly. Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2015-02-13tests: Add gem_ctx_param_basicDaniel Vetter
Boring ioctl validation. Luckily no gaps found while doing it. v2: git add ftw! v3: Fixes: - args->size is an outparam for get, adjust test. - Pick an invalid param, not an invalid ioctl number ... tsk. Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2015-02-13tests/gem_reset_stat: Use new ctx helpersDaniel Vetter
A bit more invasive since getting rid off all the places meant to flatten some of the control flow with implicit igt_require. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2015-02-13tests/gem_ctx_*: Use helpersDaniel Vetter
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2015-02-13lib/ioctl: gem_ prefix for igt_require_mmap_wcDaniel Vetter
We stick to the overall prefix even for magic require functions. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2015-02-13lib/gt: api polish for igt_can_hang_ringDaniel Vetter
Align with common igt library style: - Push the igt_require into the function. - Push the intel_gen into the function. Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2015-02-10kms_cursor_crc: Kernel now checks for integer overflowMatt Roper
As of kernel commit commit a679064a7e9e8799177a64a31668a34a1bc6a4f1 Author: Matt Roper <matthew.d.roper@intel.com> Date: Fri Jan 30 16:22:37 2015 -0800 drm/i915: Switch planes from transitional helpers to full atomic helpers the kernel now checks for cursor coordinates that would result in integer overflow and returns -ERANGE, similar to the checking that was already done for other plane types. We update kms_cursor_crc here to reflect this small behavior change: * Check for success at extreme boundary conditions INT_MAX-{width,height} rather than INT_MAX * Add new check for success at SHRT_MAX; if the driver were to internally use short values and overflow, we could have the cursor reappear on the screen. * Add a test for failure with proper error code at INT_MAX-{width,height}+1 Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
2015-02-09gem_render_copy: Provide an all pixels checkBen Widawsky
Signed-off-by: Ben Widawsky <ben@bwidawsk.net> Reviewed-by: Imre Deak <imre.deak@intel.com>
2015-02-04tests/gem_userptr_blits: Race between close and invalidateMichał Winiarski
It was possible for invalidate range start mmu notifier callback to race with releasing userptr object. If the object is released prior to taking a spinlock in the callback, we'll encounter a null pointer dereference. v2: Moved expressions inside igt_assert(), added mem barrier (Chris) Cc: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Michał Winiarski <michal.winiarski@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2015-01-29tests/prime_self_import: further fix object countsThomas Daniel
A previous commit: commit 2f2c491cf3167befe7c79e4b17afb4f6284dfc84 Author: Mika Kuoppala <mika.kuoppala@intel.com> Date: Fri Mar 28 10:52:46 2014 +0200 lib/drmtest: don't dup quiescent fd introduced a regression for drm object leak checking. A following commit: commit 8741c2289f17e9bcb740a01cad4764a71c918eea Author: Mika Kuoppala <mika.kuoppala@intel.com> Date: Wed May 7 16:46:19 2014 +0300 tests/gem_flink_race,prime_self_import: fix object counts fixed the regression for some cases but missed the export-vs-gem_close-race subtest. Note that test behaviour depends on whether the subtest is run as part of the whole prime_self_import test (fail), or as a single subtest (pass). Using execlists on Gen8+ reverses the pass/fail due to lazy context allocation which is presumably why this has now been noticed. This commit applies the same fix to the export-vs-gem_close-race subtest. Cc: Mika Kuoppala <mika.kuoppala@intel.com> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=87627 Signed-off-by: Thomas Daniel <thomas.daniel@intel.com> Reviewed-by: Mika Kuoppala <mika.kuoppala@intel.com> Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
2015-01-27igt/gem_tiled_wc: Use correct offsetsChris Wilson
A last moment "tidification" in commit 5e9fac54918e424d928bc15b90e4c65d4cfdd356 Author: Chris Wilson <chris@chris-wilson.co.uk> Date: Thu Jan 22 07:52:09 2015 +0000 igt/gem_tiled_wc: Fix! Finish! wreaked havoc again. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=88816 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-01-22tests/gem_concurrent_blit: Fix indentDaniel Vetter
Thrown up my brain's parser for a moment ;-) Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2015-01-22tests/gem_concurrent_blt: Adjust subtest namingDaniel Vetter
Our tooling doesn't cope with () in the testnames (piglit becomes all confused apparently) and the naming convention says to use "blt" and "render". Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=88220 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=88349 Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2015-01-22test/gem_dummy_reloc_loop: add tests for dual bsd ringZhipeng Gong
Signed-off-by: Zhipeng Gong <zhipeng.gong@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2015-01-22tests/gem_exec_params: check the invalid flags for dual bsd ringZhipeng Gong
v2: add more tests to address Daniel's comments(Zhipeng) Signed-off-by: Zhipeng Gong <zhipeng.gong@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2015-01-22igt/gem_tiled_wc: Fix! Finish!Chris Wilson
It helps when testing whether tiled data read back through a linear mmaping to first tile the data. And not repeatedly unmapping the linear map stops it from segfaulting. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=88686 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-01-20kms_plane: Add test that suspends/resumes before getting crcAnder Conselvan de Oliveira
This adds a test that does a suspend/resume cycle between configuring a plane and getting the crc value for the pipe. The intention is to test if the user requested stated is restored properly, instead of being clobbered by the state read out from the hardware. Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2015-01-19igt/drv_module_reload: Check more carefully for a live driverChris Wilson
As drm_open_any() now quietly fails if there is no driver, this nullifies the effectiviness of using gem_exec_nop as the test for a good reload. Combine with gem_alive (and guarantee that gem_alive can detect a dead driver, putting lie to commit 032f30cb38bb03562ee7fde19cd278b1d8ac31a9 Author: Thomas Wood <thomas.wood@intel.com> Date: Tue Jan 13 13:33:57 2015 +0000 lib: remove unnecessary checks on the drm_open_any return value ) first. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=88573 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-01-15lib: remove unnecessary checks on the drm_open_any return valueThomas Wood
drm_open_any always returns a valid file descriptor, so there is no need to check the return value. Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-01-15igt/gem_tiled_swapping: Cycle through the bo a couple of timesChris Wilson
In order to exercise coherency across swapin/swapout of the same bo, explicitly loop over all bo a couple of times. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-01-15igt/gem_mmap_wc/set-cache-level: Exercise set-cache-level WARNingChris Wilson
With the introduction of mmap(wc) and its unbound GTT write domain, we can now hit the warning inside set-cache-level, complaining about the failure to do correct cpu cache tracking. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-01-14igt/gem_exec_big: Don't try to repeatedly munmap(NULL)Chris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-01-13igt/gem_mmap_wc: Reorder gem_close()Chris Wilson
Unlike a GTT mmap, a WC mmap does not have a direct reference to the object, only to the backing storage. If we want to control the domain correctly for mmap(wc), we have to keep the bo reference around. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=88356 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-01-12igt/gem_exec_big: Use mmap(wc) to speed up verificationChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-01-12igt/gem_exec_big: Also test a large batch with a large number of relocsChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-01-09igt/gem_exec_big: Increase stressChris Wilson
We should be able to execute batches up to the full GTT size (give or take fragmentation), so let's try! Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-01-07igt/gem_evict_(alignment|everything): contend with GPU hangsChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-01-07igt/gem_reloc_vs_hang: Inject hangs!Chris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-01-07igt/gem_pread_after_blit: Inject hangs!Chris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-01-07igt/gem_concurrent_blit: Inject hangs before verifying contentsChris Wilson
After setting up the copy operations, add a hanging batch. This should mean that we complete the copy and the compare then races against the GEM reset. Hopefully, this will catch driver bugs where the target object is no longer accessible after the hang. Note: hang injection is disabled until the required kernel interface is completed. But there are useful additional tests here... Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-01-06igt/gem_ctx_thrash: Tweak resource limitsChris Wilson
On some systems (ok, most systems!) we may need to enlarge the allowed number of open files in order to create enough fd to fill the aperture. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=87572 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-01-06Skip MADV_DOFORK & MADV_DONTFORK calls on OS'es that don't support themAlan Coopersmith
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2015-01-06Use pthread calls instead of raw syscalls on non-Linux systemsAlan Coopersmith
Raw system calls aren't portable to other kernels. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2015-01-06Solaris needs to #include <sys/kd.h> instead of <linux/kd.h>Alan Coopersmith
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2015-01-06igt/gem_mmap_wc: Add the invalid flags subtestAkash Goel
A new subtest added to validate the new version of gem_mmap ioctl, for creating the wc mappings, on yet to be supported flags. v2: Removed the flags checking for older kernels (Daniel) Signed-off-by: Akash Goel <akash.goel@intel.com> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2015-01-06igt/gem_concurrent_blit: Exercise wc mappingsChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2015-01-06igt/gem_fence_upload: Add comparison against wc mmapsChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2015-01-06igt/gem_gtt_speed: compare against WC mmapsChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2015-01-06igt/gem_tiled_wc: Exercise wc mmaps with swizzlingChris Wilson
This exercises both the wc mmappings and the extended get_tiling ioctl. Userspace cannot handle bit17 swizzling through wc mmaps (because bit17 requires swizzling based on the actual physical address of the page - which is unknown to userspace) and so we need an extended get_tiling ioctl to report the actual as well as the logical swizzling on an object. We then check that the contents of the object are tiled and swizzled correctly when viewed through a wc mmap. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2015-01-06igt/gem_mmap_wc: Exercise mmap(wc) interfaceChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-12-18igt/gem_ctx_thrash/threads: Allow bo resuseChris Wilson
We already allocate enough objects to thrash the ppGTT VMs, so allow us to reuse the batch buffers for some efficiency gains and through the contention more towards the ctx->vm. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-12-18igt/gem_ctx_thread/processes: Serialise after forking childrenChris Wilson
Play nice, especially with the subtest, and wait for the children to exit before finishing the test. If we don't we end up with a fork bomb for some unknown reason... Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-12-18igt/gem_ctx_thrash: Boost workloadsChris Wilson
Now that we are no longer busy-spinning inside random(), we can spend more time exercising i915.ko Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-12-17igt: Add gem_ctx_thrash to fill the GGTT with contextsChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-12-17tests/gem_exec_blt: Add subtest that uses dumb buffersDaniel Vetter
Just to make sure this keeps working since a patch to WARN_ON using dumb buffers in execbuf was accidentally merged. Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2014-12-12Android.mk: replace std=c99 with std=gnu99Tim Gore
The android makefiles were passing the -std=c99 flag to the compiler which disables the typeof keyword. This causes a build fail for a recent addition to igt_aux.h. Change this to -std=gnu99, which is the flag used in the linux build Signed-off-by: Tim Gore <tim.gore@intel.com> Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2014-12-11lib: add a function to lock memory into RAMThomas Wood
Add a function to lock memory into RAM and use it in the gem_tiled_swapping test to reduce the amount of allocated memory required to force swapping. This also reduces the amount of time required for the test to complete, since the data set is smaller. The following durations were recorded with gem_tiled_swapping on a haswell system before the change: Subtest non-threaded: SUCCESS (55.889s) Subtest threaded: SUCCESS (810.532s) and after: Subtest non-threaded: SUCCESS (11.804s) Subtest threaded: SUCCESS (268.336s) v2: add various assertions and requirements and make sure gem_tiled_swapping works on systems with less RAM (Daniel Vetter) v3: fix allocation size calculation Signed-off-by: Thomas Wood <thomas.wood@intel.com>