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
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
Derek Morton
1f6f6c07bd tests/gem_cpu_reloc: Fix gem_cpu_reloc OOM failure
On android with small memory footprints gem_cpu_reloc can fail
due to OOM.

Refactor gem_cpu_reloc into 2 tests, a basic test which performs
10 relocations and a full test which skips if there is insufficient
memory.

Changed the memory required test to better estimate the actual
RAM used.

v2: Addresed comments from Thomas Wood

Signed-off-by: Derek Morton <derek.j.morton@intel.com>
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-05-14 16:41:37 +01:00
Chris Wilson
43a1f64e72 igt/gem_cpu_reloc: Pretty print execbuf failures
References: https://bugs.freedesktop.org/show_bug.cgi?id=85672
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-04-03 09:25:42 +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
a535cdedfb lib/os: Pust igt_require into memory check function
More in line with the usual igt pattern and simplifies the code -
every called just wrapped it in igt_require.

Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2014-11-17 14:43:33 +01:00
Chris Wilson
cdf0ea825e igt/gem_cpu_reloc: Terminate the bad batch
gen2 will read the batch up until it reaches the end as defined by the
MI_BATCH_BUFFER_END command. Play nice and make sure that it does end on a
MI_BB_END.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-09-08 12:56:06 +01:00
Chris Wilson
2ce0691cd5 igt/gem_cpu_reloc: Update the memory requirements
Use intel_check_memory() for accuracy and beautification

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-08-12 15:34:12 +01: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
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
b5bfdbb1ad tests: More bdw fallout
This time misplaced parens.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-11-15 00:10:52 +01:00
Daniel Vetter
df5e880bea tests: More bdw fallout 2013-11-14 23:31:43 +01:00
Ben Widawsky
ffc43fcbc0 gem_cpu_reloc: Fixed botched BLIT conversion
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2013-11-07 23:06:01 -08:00
Ben Widawsky
6fa529ecd6 tests/bdw: gem_cpu_reloc
support gen8 style blits

Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2013-11-06 09:34:35 -08: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
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
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
Chris Wilson
aaa460951d gem_cpu_reloc: Do another pass explicitly moving to the CPU write domain
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-10-02 21:40:46 +01:00
Chris Wilson
99a0824669 gem_cpu_reloc: Use the mappable aperture size!
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-10-02 21:05:29 +01:00
Chris Wilson
217511012a gem_cpu_reloc: And run the test in reverse to check with already bound batches
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-10-02 21:05:29 +01:00
Chris Wilson
8b2c19da0b gem_cpu_reloc: Fix for running on SNB+
I work with these everyday and I still made a basic mistake.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-10-02 21:05:29 +01:00
Chris Wilson
3b9a76d2fa tests: Add gem_cpu_reloc
Attempt to stress test performing relocations whilst the batch is in the
CPU domain.

A freshly allocated buffer starts in the CPU domain, and the pwrite
should also be performed whilst in the CPU domain and so we should
execute the relocations within the CPU domain. If for any reason one of
those steps should land it in the GTT domain, we take the secondary
precaution of filling the mappable portion of the GATT.

In order to detect whether a relocation fails, we first fill a target
buffer with a sequence of invalid commands that would cause the GPU to
immediate hang, and then attempt to overwrite them with a legal, if
short, batchbuffer using a BLT. Then we come to execute the bo, if the
relocation fail and we either copy across all zeros or garbage, then the
GPU will hang.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-10-02 17:35:01 +01:00