summaryrefslogtreecommitdiff
path: root/tests/gem_userptr_blits.c
AgeCommit message (Collapse)AuthorFilesLines
2014-10-02tests: Sprinkle missing igt_exit() where needed.prtsDaniel Vetter1-2/+0
Yay for breaking piles of tests. Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2014-09-26igt/gem_userptr_blits: Test interruptible create-destroyChris Wilson1-10/+24
In order to exercise https://bugs.freedesktop.org/show_bug.cgi?id=84207 we need to interrupt the mmu_notifier_register with a signal. This is likely to be quite difficult, but let's just try running the create-destroy test in an interruptible loop for 5s. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-09-12igt/gem_userptr_blits: GTT mmaping a userptr requires llcChris Wilson1-0/+3
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=83790 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-07-24igt/gem_userptr_blits: Fix multi-threaded mm stress testerTvrtko Ursulin1-11/+26
Two parts to the fix: 1. Do not use pthread_cancel since not available on Android. 2. Do not assert in the thread since that does not get propagated to the process. Rather pass out any failures so we know test did not work as expected. Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Cc: Tim Gore <tim.gore@intel.com> Reviewed-by: Tim Gore <tim.gore@intel.com>
2014-07-24igt/gem_userptr_blits: Fix forked access testTvrtko Ursulin1-11/+11
copy() blit helper assumes a certain object size much larger than a page size. Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-07-21igt/gem_userptr_blits: New tests, old issuesChris Wilson1-126/+179
Introduce a new test to keep that we clean up on process exit (if the userptr is busy or it has been gtt mmapped). This revealed a few bugs in the existing tests so clean those up. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-07-15tests/gem_userptr_blits: PolishDaniel Vetter1-30/+19
- Drop return values for test functions - we rely on the implicit control flow from igt_ checks. - Don't use assert directly, this upsets the test flow logic (and results in a CRASH result instead of FAIL). Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-07-15tests/gem_userptr_blits: Race between object creation and multi-threaded mm opsTvrtko Ursulin1-0/+51
Userptr v23 was not thread safe against memory map operations and object creation from separate threads. MMU notifier callback would get triggered on a partially constructed object causing a NULL pointer dereference. This test excercises that path a bit. In my testing it would trigger it every time and easily, but unfortunately a test pass here does not guarantee the absence of the race. v2: Added explicit cancellation point and removed the stop flag. Use only igt_assert(). Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-07-14igt/gem_userptr_blits: Add missing RAM check before coherency testsChris Wilson1-1/+1
-ENOCOFFE. References: https://bugs.freedesktop.org/show_bug.cgi?id=79237 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-07-14igt/gem_userptr_blits: Add missing RAM check before coherency testsChris Wilson1-0/+1
References: https://bugs.freedesktop.org/show_bug.cgi?id=79237 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-07-11igt/gem_userptr_blits: Verify that userptr bo work on unshared memoryChris Wilson1-0/+52
If the parent passes a userptr to some private memory, we expect to still be able to use the userptr in the child. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-07-11igt/gem_userptr_blits: Shared memory allocationsChris Wilson1-9/+30
The forked tests allocate the bo (and thus for userptr, the memory) in the parent and pass them to all children. The difference for userptr is that we allocate system memory which the kernel then copies into each child. As the children need to access the memory for their checks, it does need to be shared - so allocate the userptr from shared memory! Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=80208 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-03igt/gem_evict_everything: Move assertionChris Wilson1-4/+4
If we move the assertion from out of the callback, we can get a much more useful error message. References: https://bugs.freedesktop.org/show_bug.cgi?id=79573 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-05-22igt/gem_userptr_blits: Fix up last minute API changesChris Wilson1-3/+3
When the patch was merged, the ioctl numbers had to be adjusted to leave no holes. Also there was a final piece of munging of the API to downgrade unsynced userptr for export over dma-buf. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-05-14tests: Use igt macros moreDaniel Vetter1-11/+5
Often just folding together of the common if (cond) printf; abort|igt_skip|igt_fail; pattern. But in a few cases I've ripped out more since the igt macros will already print the condition and errno. A few tests where more work (like ripping out return codes en masse) is needed left as-is. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-05-14tests: sprinkle igt loggingDaniel Vetter1-10/+10
All the cases that simply dump some debug information and couldn't be converted to some of the fancier macros. Some information output removed when it's redundant with the subtest status. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-04-25test: Fixup for the previous patchDaniel Vetter1-1/+1
Oops, failed to git add. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-04-25test/gem_userptr_*: Fix compile failDaniel Vetter1-3/+11
Also shut up warnings. Those revealed incorrect usage of local variables in conjunction with igt_fixture/igt_subtest. Since those use longjmps we need to move the out of the stackframe those magic blocks are declared in. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-04-25tests/gem_userptr_blits: Expanded userptr test casesTvrtko Ursulin1-0/+1247
A set of userptr test cases to support the new feature. For the eviction and swapping stress testing I have extracted some common behaviour from gem_evict_everything and made both test cases use it to avoid duplicating the code. Both unsynchronized and synchronized userptr objects are tested but the latter set of tests will be skipped if kernel is compiled without MMU_NOTIFIERS. Also, with 32-bit userspace swapping tests are skipped if the system has a lot more RAM than process address space. Forking swapping tests are not skipped since they can still trigger swapping by cumulative effect. v2: * Fixed dmabuf test. * Added test for rejecting read-only. * Fixed ioctl detection for latest kernel patch. v3: * Use ALIGN macro. * Catchup with big lib/ reorganization. * Fixed up some warnings. Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Reviewed-by: Brad Volkin <bradley.d.volkin@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>