956 Commits

Author SHA1 Message Date
Daniel Vetter
d0f3a0d77a README: piglit requires results-file for testruns
Noticed by Mika.
2012-12-04 10:42:15 +01:00
Daniel Vetter
175fc656eb tests/Makefile.am: Add a comment about the subtest infrastructure 2012-12-04 10:37:55 +01:00
Daniel Vetter
df545c1968 README: add quick howto for using piglit as testrunner 2012-12-04 10:35:21 +01:00
Daniel Vetter
6daae8bcb6 tests/gem_flink: check flink lifetime rules
flink names may not be destroyed while there's still a userspace
handle around. Test this by
- exporting an flink name from fd2
- open a gem bo from that name in fd
- close fd2, then open a new drm file (so that the original handle
  disappears)
- check whether the same flink name still works
2012-12-01 13:07:45 +01:00
Daniel Vetter
d8df90dc6b tests/gem_exec_bad_domains: add more bad domains
- mulitple write domains
- conflicting write domains
- not-yet-defined gpu domains

Also convert to subtests while at it.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-12-01 00:58:14 +01:00
Daniel Vetter
da6473184c tools/intel_reg_dumper: add some cpt/ppt debug regs
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-12-01 00:57:36 +01:00
Daniel Vetter
0d7139af58 tests/gem_stress: prevent segfault in getopt parsing
Needs a terminal element in the long option array.
2012-11-29 15:01:09 +01:00
Daniel Vetter
64f669f7a9 lib: extract get_render_copyfunc
Otherwise we won't update all the tests if we add new render
copyfuncs.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-11-29 14:59:57 +01:00
Daniel Vetter
d79414f64a tests: disable gem_non_secure_batch
Seems to cause hangs on some of my old gen2/3 machines, but not all of
them.
2012-11-29 11:27:32 +01:00
Daniel Vetter
df11a6f31d tests/gem_tiled_partial_pwrite_pread: convert to subtest infrastructure 2012-11-28 13:25:12 +01:00
Daniel Vetter
b0066d3659 tests/gem_tiled_partial_pwrite_pread: refactor subtests into functions 2012-11-28 13:22:39 +01:00
Daniel Vetter
129d201337 tests/gem_set_tiling_vs_blt: convert to subtest infrastructure 2012-11-28 13:10:26 +01:00
Daniel Vetter
ca2851f827 tests/gem_ringfill: convert to subtest infrastructure 2012-11-28 13:08:20 +01:00
Daniel Vetter
046b149b18 tests/gem_partial_pwrite_pread: convert to subtest infrastructure 2012-11-28 13:08:07 +01:00
Daniel Vetter
1a55ca753e tests/gem_partial_pwrite_pread: refactor subtests into functions
This was a too big mess.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-11-28 12:47:26 +01:00
Daniel Vetter
af228d4edc tests/gem_mmap_gtt: convert to subtest infrastructure 2012-11-28 12:40:23 +01:00
Daniel Vetter
7160c534f8 tests: re-enable gem_hangcheck_forcewak
Was accidentally disable in ab3f4bdafe60dede32a48674ef9920df090bf3a7

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-11-28 12:38:00 +01:00
Daniel Vetter
a2778575d5 tests/gem_gtt_concurrent_blit: convert to subtest infrastructure
Same treatment as for gem_cpu_concurrent_blit.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-11-28 12:35:03 +01:00
Daniel Vetter
2a9e128b18 tests/gem_flink: convert to subtest infrastructure 2012-11-28 12:17:40 +01:00
Daniel Vetter
9d65d484f6 tests/gem_cs_tlb: convert to subtests
Again required a bit of shuffling to avoid expensive setup and some
logic to properly handling 'skip' when only running a subtest.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-11-28 12:09:58 +01:00
Daniel Vetter
4f6ab180a1 tests/gem_cpu_concurrent_blt: convert to subtest infrastructure
Small changes to avoid expensive setup just to print out the subtest
list, and setting up the source buffers such that "early-read" works
without having run "overwrite-soure" right beforehand.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-11-28 12:00:33 +01:00
Daniel Vetter
792a05a0a1 tests/gem_cacheing: convert to subtest infrastructure 2012-11-28 11:57:58 +01:00
Daniel Vetter
3cca0d8c6d tests/gem_basic: convert to subtest infrastructure 2012-11-28 11:57:58 +01:00
Daniel Vetter
c3d5c1292b tests/flip_test: use subtest infrastructure
To make the testnames easier to handle in scripts, replace all
spaces with dashes.

The important part is to not print anything to stdout when enumerating
subtests, so protect the timestamp test with the right check.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-11-28 11:57:58 +01:00
Daniel Vetter
9fc7e1386a lib/drmtest: subtest infrastructure
To make these helpers as least invasive as possible simply initialize
the options with a getopt parser and let the control flow be steered
with a simple helper which gets the subtest name as an argument.

The only tricky part for using it is that the subtest check helper
doubles up as the conduit to enumerate tests (and in that mode
prevents any test from being run). It is therefore important that
nothing gets printed to stdout outside of these checks.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-11-28 11:57:58 +01:00
Daniel Vetter
021909e10d tests: dont polute stderr if the test succeeds/skips
Results in spurious 'warn' results in piglit. Also don't print
progress indicators when not outputting to a terminal.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-11-28 11:08:37 +01:00
Daniel Vetter
4fae0c65c5 tests: remove ZZ_check_dmesg from runner
This is getting in the way of piglit integration. If we want this
functionality again, we should integrate it into the IGT piglit runner
as an option.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-11-28 11:08:37 +01:00
Daniel Vetter
c79c56cf8c tests: infrastructure for piglit runner
Piglit needs a way to grab the latest list of tests to run, so add new
make targets to dump those. Note that for future extendability we'll
dump 2 different lists, one for single-testcase tests and one for
testcases with enumerable subcases. Some support code for the later
will follow in subsequent patches.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-11-28 11:08:31 +01:00
Damien Lespiau
b11887741c testdisplay: Use the fb stride when painting the color key
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=55901

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-11-28 00:16:54 +01:00
Daniel Vetter
e5315f9dad tests: add gem_non_secure_batch 2012-11-25 13:55:55 +01:00
Imre Deak
314953117f flip_test: switch to using monotonic timestamps (v2)
Since monotonic timestamps are now the preferred time format, change
timestamps checks to compare against monotonic instead of real time.
Also add two tests for DRM's compatibility mode where it returns real
timestamps.

v2: drop the tests for the compatibilty mode (Daniel)

Signed-off-by: Imre Deak <imre.deak@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-11-22 21:20:30 +01:00
Imre Deak
b7067d6c10 flip_test: use monotonic time to measure the test duration
Signed-off-by: Imre Deak <imre.deak@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-11-22 14:51:28 +01:00
Imre Deak
8a2593bd3c flip_test: skip check for last_received_ts for the first event
The old way worked too, but just skipping the test for the first event
is more logical/simpler thing to do.

Signed-off-by: Imre Deak <imre.deak@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-11-22 14:51:26 +01:00
Imre Deak
b28caa0ac0 flip_test: add wf-vblank test for expired sequence
In v2:
- Wait for the seq that just completed (current_seq) not last_seq - 1.
- Do an equality check for ts and seq instead of >=. The previous
  issue didn't let us do this before.
- Simplify the condition when we do an "expired sequence" check by
  only using the last flip event as a reference.

Signed-off-by: Imre Deak <imre.deak@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-10-23 12:45:06 +02:00
Imre Deak
c7dd1dcdd9 flip_test: add comment about the race between flip vs. vblank events
Signed-off-by: Imre Deak <imre.deak@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-10-23 10:34:29 +02:00
Imre Deak
7f32adc6c5 flip_test: check if the vblank and flip states correlate
Signed-off-by: Imre Deak <imre.deak@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-10-23 10:34:26 +02:00
Imre Deak
429dc01636 flip_test: fixup zero timestamp for premature vblanks
Signed-off-by: Imre Deak <imre.deak@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-10-23 10:34:20 +02:00
Imre Deak
5fc312e9f1 flip_test: increase duration for vbl+flip tests with ts check
We need a big enough duration, so the hotplug event's affect doesn't
distort our final frame count too much.

Without this these tests will exit with a "dropped frames" error.

Signed-off-by: Imre Deak <imre.deak@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-10-23 10:34:17 +02:00
Daniel Vetter
554237f351 tests/gem_cs_tlb: make it more robust
... using a fine roll of duct-tape. Dunno what exactly leaks out from
the previous testcase, but the bo gets moved about a bit and makes the
self-check of the test fail.
2012-10-19 00:26:16 +02:00
Daniel Vetter
ea50871f15 flip_test: check whether wait_vblank fails when it should 2012-10-17 11:09:13 +02:00
Daniel Vetter
3b1fbbf412 flip_test: drop vblank vs. pan
pageflip vs. pan is interesting since we wait for outstanding flips
before updating the fb base address. For vblank absolutely nothing
interesting happens.
2012-10-17 00:35:43 +02:00
Daniel Vetter
7125a338ec flip_test: tune test-durations a bit
15 seconds for timestamp checkers (to at least hit the dreaded hotplug
once), 5 seconds for fast tests that check every vblank something, 30
for slow test (dpms/modeset cycles).
2012-10-17 00:34:43 +02:00
Imre Deak
6473c537d8 flip_test: add wait-for-vblank tests
Signed-off-by: Imre Deak <imre.deak@intel.com>
[danvet: add {} for multi-line but single-statement if block.]
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-10-16 21:46:18 +02:00
Imre Deak
ae62874cf1 flip_test: add check to see if any event has occured
At the moment select() would time out in case we don't get any event.
When we add vblank events in a later patch, it's possible that we
receive one type of events but not the other type. In this case select()
doesn't time out and we need another way to detect this.

Signed-off-by: Imre Deak <imre.deak@intel.com>
2012-10-16 19:40:06 +03:00
Imre Deak
fe7fea0be3 flip_test: add event sequence number tracking
Signed-off-by: Imre Deak <imre.deak@intel.com>
2012-10-16 19:40:06 +03:00
Imre Deak
887a2597fa flip_test: add logic to track pending events
When we add the vblank tests later, it can happen that one type of event
is pending while we are servicing another. Prepare for that by
maintaining a pending/completed event mask.

No functional change.

Signed-off-by: Imre Deak <imre.deak@intel.com>
2012-10-16 19:40:06 +03:00
Imre Deak
a7d9a57c47 flip_test: make page flip tests conditional
Since later we want to add vblank tests where we don't want to flip,
make the flips and corresponding state checks conditional.

No functional change.

Signed-off-by: Imre Deak <imre.deak@intel.com>
2012-10-16 19:40:06 +03:00
Imre Deak
eecae8dfef flip_test: unify the name of the current test in status messages
Signed-off-by: Imre Deak <imre.deak@intel.com>
2012-10-16 19:40:06 +03:00
Imre Deak
6c2b53d894 flip_test: store the pipe id in the test context obj
For DRM_IOCTL_WAIT_VBLANK we'll have to pass the pipe id - as opposed to
the crtc id required by the rest of the IOCTLs we use.

Thanks for Chris Wilson for pointing this out.

No functional change.

Signed-off-by: Imre Deak <imre.deak@intel.com>
2012-10-16 19:40:06 +03:00
Imre Deak
641261f4fe flip_test: don't skip checks for sequence #1
So far we skipped some tests for seq#0 and #1, since at that point we
were missing the 'last' state against which we could compare the current
state. Since in the previous patches we fixed the ordering in the test
loop and moved the increment of count to the update state phase, we have
a proper 'last' state for seq#1, so enable the tests already at that
point.

Signed-off-by: Imre Deak <imre.deak@intel.com>
2012-10-16 19:40:06 +03:00