summaryrefslogtreecommitdiff
path: root/tests
AgeCommit message (Collapse)Author
2013-08-12tests: s/return igt_retval();/igt_exit();/Daniel Vetter
Requested-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-08-12s/drmtest_/igt_/Daniel Vetter
Requested-by: Chris Wilson <chris@chris-wilson.co.uk> Acked-by: Damien Lespiau <damien.lespiau@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-08-12s/drmtest_subtest_block/drmtest_subtest/Daniel Vetter
The _block postfix meant to convey that a C statement/block must follow can be misread as the verb to block. So drop it. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-08-12tests: use drmtest_skip to check for ringsDaniel Vetter
To simplify things add a set of gem_check_<ring> functions which take care of this. Since I've opted for static inlines drmtest.h grew a few more header includes which was a neat opportunity to dump a few redundant #defines. This kills all the skipped_all hand-rolled logic we have. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-08-12tests: use drmtest_skip() in caching ioctl helpersDaniel Vetter
This way we can rip out all the skip handling from the test control flow, and additionally (by using drmtest_retval()) even get correct exit codes. The only tricky part is that when we only want ot skip parts of a test (like for gem_pread and gem_pwrite) we need to split out those parts as subtests. But no addition of control-flow is required, the set/longjmp magic in the helpers all makes it happen. Also we make extensive use of the behaviour of drmtest_skip to skip all subsequent subtests if it is called outside of a subtest. This allows us to re-flatten the control flow a lot. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-08-12tests/gem_caching: convert to use drmtest retval infrastructureDaniel Vetter
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-08-12lib/drmtest: Add drmtest_subtest_block macroDaniel Vetter
Doesn't do more than an if (drmtest_run_test(name)) right now, but as soon as we get a bit of infrastructure to handle test failures and skipping, this will get more interesting. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-08-12tests: s/cacheing/cachingDaniel Vetter
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-08-12gem_pwrite: Print the cache name not the numberChris Wilson
Bugzilla: https://bugzilla.freedesktop.org/show_bug.cgi?id=68003
2013-08-10Expand gem_set_cacheing testing to handle the proposed DISPLAY domainChris Wilson
2013-08-07tests/prime_self_import: fix commentDaniel Vetter
2013-08-07tests/prime_self_import: Fixup previuos testDaniel Vetter
... not a great display of my prowess here. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-08-07tests/prime_self_import: Add a flink/dma-buf self-import testDaniel Vetter
This checks that we really always fill the dma-buf export cache. Which sometimes we don't. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-08-07tests: update .gitignoreDaniel Vetter
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-08-07tests/gem_pwrite_pread: subtest annotationDaniel Vetter
This testcase mixes correctnes tests with performance tests, so it's good to track the different correctness test separate for QA. Together with pread_after_blt the pwrite->blt tests here exercise the full cache coherency lifecycle of both snooped and uncached objects. /me is happy Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-08-06tests: add gem_prw_concurrent_bltDaniel Vetter
New testcase to check that pwrite/pread correctly synchronize with oustanding rendering. Just to catch regressions when we change something. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-08-06tests/prime_self_import: Add racing handle2fd testcaseDaniel Vetter
Similar to how we test flink races. Note that on unfixed kernels this oopses, and with my current set of patches it still leaks like mad. v2: Only close the prime fd if we've successfully created it. v3: Add a reimport test to check whether we don't race when reaping the obj->dma_buf link. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-08-06tests/gem_flink_race: Kill duplicate drm_open_anyDaniel Vetter
Leak test that leaks ... Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-08-06gem_pwrite_pread: Use mmap to bypass pwrite/pread for comparisonChris Wilson
Just to help sanity test alternate paths.
2013-08-06gem_pwrite_pread: Measure how long it takes to upload/copy/downloadChris Wilson
Further trying to determine the effects of setting snooping.
2013-08-06gem_pread: Symmetric measurement to gem_pwriteChris Wilson
2013-08-06gem_pwrite: Time pwrites to both uncached/snooped memoryChris Wilson
2013-08-06gem_partial_pwrite_pread: Exercise different cacheing of the staging boChris Wilson
2013-08-06gem_pread_after_blit: Exercise reading back through different cache levelsChris Wilson
2013-07-29kms_render: fix gpu-blit for non-32bit bppsImre Deak
intel_copy_bo assumes a 32bpp bo, whereas we passed it bos with arbitrary bpp values. This resulted in thrashing GPU memory following the destination bo. Fix this by using a blit helper that can handle other bpps too. Signed-off-by: Imre Deak <imre.deak@intel.com>
2013-07-25tests/sysfs_edid_timing: use real bashDaniel Vetter
The lib/drm_lib.sh load path trick doesn't work otherwise. Tsk. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-07-24tests/gem_flink_race: correct thread countDaniel Vetter
They all race against each another, no worker-slave relationship like in the other subtest. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-07-24tests/gem_flink_race: fix up scanf formatDaniel Vetter
Oops, failed to git add. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-07-24tests/gem_flink_race: actually make it somewhat usefulDaniel Vetter
- Enable subtest support. - Add a check for the same flink name in the racing threads, which is an issue one of my recent patches actually fixes. - Add the test I've actually wanted to write which races an flink against gem close (with no open in between). That one does indeed leak. - Readd the leak check, but note that this needs a fixed kernel. Otherwise the leak counter will be utter garbage. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-07-24Revert "tests/gem_flink_race: count leaked objects"Daniel Vetter
This reverts commit bd927662fcfb1443c5982fb04cc694f78e1c8d53. It's bogus. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-07-24tests/gem_flink_race: check for expected flink failure codeDaniel Vetter
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-07-24tests/gem_flink_race: count leaked objectsDaniel Vetter
And fail the test if the leak count is bigger than 0. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-07-24tests/gem_flink_race: kill debug printfDaniel Vetter
Oops. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-07-23tests: add gem_flink_raceDaniel Vetter
This exercises a race in the flink name descruction of the current drm gem core. When racing a gem close with a gem open the open can sneak in and cause the kernel to leak the flink name and its reference. This results in leaked gem objects that won't get reaped even at drm file close time. On my 2 core/4 threads snb machine this leaks on the order of 1k objects per second. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-07-23lib/drmtest: add gem_flink and gem_openDaniel Vetter
Requires us to rename a few things in the gem_flink test to avoid variable shadowing. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-07-23tests: sort tests in Makefile.am and .gitignoreDaniel Vetter
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-07-23tests/gem_suspend: exercise fence restore codeDaniel Vetter
This exercise the bug fixed in commit 94a335dba34ff47cad3d6d0c29b452d43a1be3c8 Author: Daniel Vetter <daniel.vetter@ffwll.ch> Date: Wed Jul 17 14:51:28 2013 +0200 drm/i915: correctly restore fences with objects attached For fun I've also added a subtest for the inverse transition. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-07-21tests: Basic tools testerBen Widawsky
Requested-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2013-07-20test/gem_pread_after_blit: Make the test a little more stressfulChris Wilson
Extend the simply functionality by repeating it under the rude interrupter and chain together a couple of steps in new test cases. As a compromise for adding more tests, incorporate the piglit subtest framework.
2013-07-19tests: Source drm_lib.sh instead of having its own INTEL_SIMULATION testDamien Lespiau
One code path to maintain is always better. Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2013-07-19tests: Allow a shell test to declare it doesn't need to be DRM masterDamien Lespiau
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2013-07-19tests: add reloc, pread, pwrite slow path subtestXiong Zhang
the reloc, pread, pwrite slow path will be prevented by prefault, these subtests will disable prefault first, then do reloc, pread, pwrite, finally enable prefault. Signed-off-by: Xiong Zhang <xiong.y.zhang@intel.com>
2013-07-18tests: Add some tiled tests to the runs on simulationDamien Lespiau
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2013-07-18tests: Instrument gem_seqno_wrap to run in simulationDamien Lespiau
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2013-07-18tests: Instrument gem_lut_handle for simulationDamien Lespiau
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2013-07-18tests: Instrument tests run in simulation to run quicklyDamien Lespiau
We tweak the tests marked as runnable in simulation to run more quickly, more often then not at the expense of stress testing (which is of an arguable interest for the initial bring up in simulation). Hopefully the values chosen still test something, which is not always straightforward. It does run quickly, the number on an IVB machines are: $ time sudo IGT_SIMULATION=0 ./piglit-run.py tests/igt.tests foo [...] real 2m0.141s user 0m16.365s sys 1m33.382s Vs. $ time sudo IGT_SIMULATION=1 ./piglit-run.py tests/igt.tests foo [...] real 0m0.448s user 0m0.226s sys 0m0.183s Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2013-07-18tests: Black list tests we don't want to run on simulationDamien Lespiau
Let's start by a small set of tests, to eventually consider running more. The current list should then be: gem_mmap gem_pread_after_blit gem_ring_sync_loop gem_ctx_basic gem_pipe_control_store_loop gem_storedw_loop_render gem_storedw_loop_blt gem_storedw_loop_bsd gem_render_linear_blits gem_tiled_blits gem_cpu_reloc gem_exec_nop gem_mmap_gtt v2 add (Daniel Vetter) gem_exec_bad_domains gem_exec_faulting_reloc gem_flink gem_reg_read gem_reloc_overflow gem_tiling_max_stride prime_* Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2013-07-16tests/prime_nv_api: check multiple foreign imports with flinkDaniel Vetter
We want prime to only ever create one native gem object for each dma-buf it sees. This can e.g. happen if multiple processes import the same foreign dma-buf, e.g. the application imports a yuv frame from v4l to encode it into a video stream and the compositor imports it into his fd again to display it with an overlay. Hence add a bunch of tests which check all the various orders in which this could happen. Currently they all fail. Checking flink names is the easiest (and afaik only) way to check whether we're indeed dealing with the same object. This checks both ways, i.e. exporting from i915 and from nouveau, each with two variants of the test: One reuses the prime fd, the other closes it and creates a new one. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-07-15test/prime_nv_test: use gem drmtest functions for pread/pwriteDaniel Vetter
Different argument order, otherwise the same. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-07-15test/prime_nv_test: nicer test namesDaniel Vetter
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>