11 Commits

Author SHA1 Message Date
Daniel Stone
de7ccdd083 tests: Run igt.cocci
Signed-off-by: Daniel Stone <daniels@collabora.com>
2015-11-03 19:46:11 +00:00
Chris Wilson
5ec54d8a21 Update CONTEXT_PARAM for GTT_SIZE reporting
Add the new PARAM identifier for reporting the context's GTT size.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-10-19 11:37:07 +01:00
Daniele Ceraolo Spurio
a16704261f tests/gem_ctx_param_basic.c: fix non-root-set-no-zeromap subtest
The test expects an ioctl failure when it tries to set
CONTEXT_PARAM_NO_ZEROMAP from a non-root process. However, there is no
requirement in the kernel for the user to be root to set this parameter,
so the test is failing (it never passed as far as I'm aware of).
Fix the test by making it expect a successful ioctl completion.

Signed-off-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-09-18 17:31:36 +01: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
Daniel Vetter
adfc294384 tests: Document ABI extension catchers
Our invalid-flags/params testcases are meant to catch abi extensions
by just testing for the next available flag/param. Unfortunately we
need that since without those we forgot to write testcases for these
new flags way too often :(

But it's not entirely clear why this is, so document this trick with
comments.

Also gem_wait wasn't this paranoid, so change the testcase to be so.

Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2015-08-12 14:46:46 +02:00
David Weinehall
24617ef82a tests/gem_ctx_param_basic: support NO_ZEROMAP
Signed-off-by: David Weinehall <david.weinehall@linux.intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2015-08-12 14:42:46 +02:00
Jesse Barnes
db0f28aee8 Revert "tests/gem_ctx_param_basic: fix invalid params"
This reverts commit 0b45b0746f45deea11670a8b2c949776bbbef55c.

We want to check against our local copy of the params so we can at least
potentially catch new flag additions.

Requested-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2015-08-06 14:35:34 -07:00
Jesse Barnes
0b45b0746f tests/gem_ctx_param_basic: fix invalid params
Use -1 as the invalid param since we've added more since this test was
created, causing expected EINVAL failures to return an unexpected error
code.

Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2015-08-06 13:17:48 -07:00
Daniel Vetter
3c8aa2fb6e tests/gem_ctx_param_basic: Include header, not source
Oops. Reported by Tim Gore.

Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2015-02-13 14:54:25 +01:00
Daniel Vetter
6f582f70e1 tests: Add gem_ctx_param_basic
Boring ioctl validation. Luckily no gaps found while doing it.

v2: git add ftw!

v3: Fixes:

- args->size is an outparam for get, adjust test.
- Pick an invalid param, not an invalid ioctl number ... tsk.

Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2015-02-13 09:35:36 +01:00