21 Commits

Author SHA1 Message Date
Micah Fedke
c81d293aed convert drm_open_any*() calls to drm_open_driver*(DRIVER_INTEL) calls with cocci
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-09-11 14:39:43 +01:00
Thomas Wood
804e11f40d lib: add a single include header
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-21 09:37:10 +01:00
Thomas Wood
b2ac2642a9 tests: add more test descriptions
Add more test descriptions based on exiting comments.

Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2014-12-04 16:07:55 +00:00
Daniel Vetter
0b7ce4ac29 tests: Use igt macros more
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-14 09:56:53 +02:00
Chris Wilson
e46ff3f8c2 igt/gem_lut_handle: Fix errno checking
Regression from
commit c1404e05b7477122b9923ba029593c2cb64671a7
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Tue Apr 29 07:14:33 2014 +0100

    errno is reset after each syscall

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-05-08 10:05:37 +01:00
Chris Wilson
c1404e05b7 errno is reset after each syscall
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=78055
Bugilla: https://bugs.freedesktop.org/show_bug.cgi?id=78053
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-04-29 07:17:30 +01:00
Daniel Vetter
e49ceb8690 lib: unnecessary header removal for drmtest.h, part 1
Brought a few missing headers to light in ioctl_wrappers.h, too.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-22 21:07:37 +01:00
Daniel Vetter
cb9e8376fa tests: fixup igt_simple_main fallout
Oops, I should look at compilier warnings a bit better.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-01-10 09:24:33 +01:00
Daniel Vetter
dda85fb108 tests: roll out igt_simple_init/igt_simple_main
Also use igt_skip a bit more to simplify some of the tests.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-12-10 10:18:32 +01:00
Daniel Vetter
83440953e5 tests: s/assert/igt_assert
Just a wholesale rollout for now, we can refine later on.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-08-13 15:07:44 +02:00
Daniel Vetter
7847ea2965 tests: use drmtest_skip to check for rings
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-12 11:17:58 +02:00
Damien Lespiau
204df66798 tests: Instrument gem_lut_handle for simulation
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2013-07-18 15:56:53 +01:00
Damien Lespiau
5fa15f79d0 tests: Black list tests we don't want to run on simulation
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-18 15:49:02 +01:00
Chris Wilson
ebfd01908f tests/gem_lut_handle: Quit when we hit ENOSPC
I'd been working under the falsehood that we would always generate an
error for an invalid reloc->target_handle before reserving any object.
However, only the execlist is checked up front for validity before
reservation so ENOSPC is a genuine error condition raised by the test.
Fix it so that we stop reporting that limit as a test failure.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=65391
2013-06-27 19:41:52 +01:00
Chris Wilson
60e3930987 tests/gem_lut_handle: Simplify creation of broken handles
Limit the broken handles to UINT32_MAX-4096 so that we can be sure that
they do not alias with a valid handle.

References: https://bugs.freedesktop.org/show_bug.cgi?id=65391
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-06-24 13:55:53 +01:00
Chris Wilson
e56754965f gem_lut_handle: Print some more information upon failure
References: https://bugs.freedesktop.org/show_bug.cgi?id=65391
2013-06-19 14:19:47 +01:00
Chris Wilson
9d8fc1957c gem_lut_handle: Avoid using a valid handle when testing BROKEN 2013-06-07 13:50:47 +01:00
Chris Wilson
f1e9e300fa gem_lut_handle: Make the error checking explicit for LUT handling
What this test is interested in is the handling of the LUT for very
large arrays, irrespective of whether such batch are actually
executable. So adjust the pass/fail checks to be explicit in the error
they are looking for, so that we do not conflate memory/aperture
pressure as a failure in the LUT API.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=65391
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-06-05 11:14:25 +01:00
Chris Wilson
fb7bc2e8d1 tests/gem_lut_handle: Limit testing LUT interface to recent kernels
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-17 15:10:29 +00:00
Chris Wilson
d5517a1301 tests/gem_lut_handle: Expand negative testing
Pass in lots of execs and relocs trying to trick the kernel into making
a mistake.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-17 15:05:20 +00:00
Chris Wilson
ec2eac6d7b tests: Exercise new API for using a LUT with the execbuffer
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-17 14:30:43 +00:00