28 Commits

Author SHA1 Message Date
Daniel Vetter
6672da5e8f Revert "igt: s/basic/sanitycheck/ on prior smoketesting"
This reverts commit 4f5efc5c844f6fe69209982463f9220f8f3951ed.

There was a bit a misunderstanding on IRC between Chris&me. We want
basic tests as sanity test to be run in the BAT CI. It's just unfortunate
that right now we have fairly limited ability to absorb new ones, both
because of a pile of existing bugs in the kernel and because the CI
infrastructure is still being scaled out.

The idea was just to remove the BAT tests added yesterday, not all of
the ones we've had for a while longer.

Cc: Chris Wilson <chris@chris-wilson.co.uk>
Grumpily-acked-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2015-12-10 12:45:20 +01:00
Chris Wilson
4f5efc5c84 igt: s/basic/sanitycheck/ on prior smoketesting
In times past, I added "basic" variants of tests just to ensure that the
general principle of operation was sound before proceeding on to the
main test (which typically looked at thrashing, i.e. were long and
tedious and pointless if the test didn't even work in the normal
situation). Since "basic" now collides with BAT, rename my trivial tests
to "sanitycheck".

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-12-10 10:05:20 +00:00
Thomas Wood
24b7bbc726 tests: remove unnecessary igt_exit calls
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-11-11 14:20:55 +00:00
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
Tim Gore
9f90aabc66 tests/gem_render_linear_blits: split into two subtests
The gem_render_linear_blits test tends to get oom killed
on low memory (< 4GB) Android systems. This is because the
test tries to allocate (sysinfo.totalram * 9 / 10) in
buffer objects and the remaining 10% of memory is not
always enough for the Android system.
After a discussion with Chris Wilson I have split this
test into a "basic" and an "apperture-thrash" subtest,
in the same way as gem_linear_blits. The basic test
uses just two buffer objects and the apperture-thrash
test is skipped if there is insuffiecient memory.

v2: Following comment from Chris Wilson:
    a) Remove the command line option for count.
    b) Add a third subtest to ensure swap is tested

v3: Replace some leading spaces with tabs

v4: Follwing comment from Daniel Vetter:
    a) Use igt_main macro instead of "open coding", and
    b) cull some more leading spaces

Signed-off-by: Tim Gore <tim.gore@intel.com>
2015-03-04 16:18:13 +01:00
Daniel Vetter
4306538d1d tests: Sprinkle missing igt_exit() where needed.
Yay for breaking piles of tests.

This regression has been introduced with

commit 5782eca1e19e85a04ad402fa4094aa1b5f9c53ce
Author: Tim Gore <tim.gore@intel.com>
Date:   Wed Oct 1 13:25:20 2014 +0100

    lib/igt_core.c: disable lowmemorykiller during tests

Cc: Tim Gore <tim.gore@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2014-10-02 11:34:55 +02:00
Thomas Wood
e73008bae3 tests: remove unused getopt header includes
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2014-07-23 15:23:53 +01:00
Daniel Vetter
5a98fe9d4a lib: Add argc/argv to igt_simple_init
There's a pile of ideas around to add generally useful options like
--debug to all igt tests. Or unify the runtime behaviour between
simple and subtest tests a bit more.

The first step to get there is to add argc/argv to igt_simple_init so
that we can get at the argument list.

Cc: Tim Gore <tim.gore@intel.com>
Cc: Thomas Wood <thomas.wood@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-07-14 15:03:59 +02:00
Daniel Vetter
c9c554594e tests: run igt.cocci
Re-run with correct igt_fail rules. Again manually fixup missing
includes for igt_core.h.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-06-13 18:27:59 +02: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
Daniel Vetter
e624fa8a2e tests: sprinkle igt logging
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-05-14 00:36:04 +02:00
Daniel Vetter
f5daeec724 lib: extract igt_aux.[hc]
And shovel all the various helpers in there.

Also move igt_set_vt_graphics_mode to igt_kms.h since the function is
implemented in igt_kms.c. And it fits better. I kinda missed this in
the prep work.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-23 13:47:09 +01:00
Daniel Vetter
c03c6ceb29 lib: rename intel_gpu_tools.h to intel_io.h
With the header cleanup we can now give this header a suitable name,
since it now really only contains register access and other I/O
functions and assorted definitions.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-22 21:34:29 +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
0e22f14ed6 tests|lib: remove assert.h includes
Only the igt core and non-test tools should have asserts to catch
internal errors, tests and helper libraries should all user igt_asert
instead.

Fix things up where assert instead of igt_assert was used.

One tiny step towards header sanity.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-22 19:39:46 +01:00
Daniel Vetter
53a4d9e982 lib/intel_batchbuffer: igt_ prefix for rendercopy/mediafill funcs
Now everything is prepared to pour some neat api docs over this all.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-22 15:49:02 +01:00
Daniel Vetter
83a4c7d3eb lib/intel_batchbuffer: igt_ namespace for the buffer structure
Step one to properly namespace the rendercpy/mediafill functions. Als
give the buf_height/width helpers a proper igt_ prefix.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-22 15:44:48 +01:00
Daniel Vetter
7dc0001f3d lib: make rendercopy.h an internal header
And move the public interfaces into intel_batchbuffer.[hc].

A bit messy since we are fairly inconsistent with our header #include
handling.

Also exclude rendercopy.h from the documentation.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-22 15:31:15 +01:00
Chris Wilson
4550a18a57 gem_render_linear_blits: Trim usage to fit within RAM
This is a render correctness test, the intention is not to exercise the
swapper (but preferrably some eviction code).

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=75247
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-02-24 08:57:35 +00: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
Ville Syrjälä
725da6ee74 rendercopy: Pass context to rendercopy functions
rendercopy does the batch buffer flush internally, so if we want
to use it with multiple contexts, we need to pass the context
in from caller.

v2: Modify rendercopy_gen8 as well

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2013-11-27 16:21:28 +02:00
Damien Lespiau
37c02cfa5c gem_render_linear_blits: Remove aub dump support
It's much easier to follow the new gem_render_copy test and acquire a
aub dump from it.

Suggested-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2013-10-24 13:44:32 +01:00
Damien Lespiau
09e9f0b216 rendercopy: Add a way to dump an .aub file with the rendercopy bos
v2 (by Ben): Remove libdrm dependency since intel-gpu-tools now requires
a higher version anyway. Remove associated #ifdef ENABLE_AUB_DUMP

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Ben Widawsky <benjamin.widawsky@intel.com>
2013-10-18 09:49:41 -07:00
Daniel Vetter
1caaf0a6b6 s/drmtest_/igt_/
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-12 12:20:22 +02:00
Damien Lespiau
d1e862324b tests: Instrument tests run in simulation to run quickly
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-18 15:56:35 +01:00
Damien Lespiau
6526d8c6fc tests: Forbid to run the blit tests with count of 1
Invoking say,

  sudo ./tests/gem_render_linear_blits 1

does not make a lot of sense as we're creating a single bo. The test
does not yell at you and passes, even if the rendercopy function does
not do anything. This makes it quite harmful when trying to debug
rendercopy without realizing that count is the number of allocated bos
and must be >= 2.

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-02-18 19:54:16 +01:00
Chris Wilson
3ad92902e1 tests: Add basic test for render blits
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-12-06 19:51:54 +00:00