11 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
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
Chris Wilson
ea4aa70f3c igt/gem_wait: When waiting for infinity, an infinity remains
Incorrect testing of out parameters leads to bug noise...

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=89494#c4
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-03-19 08:37:51 +00:00
Chris Wilson
e23accf437 igt/gem_wait: Test negative timeouts
The user should be able to specify a negative timeout to indefinitely
wait upon a bo becoming idle.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-03-06 08:50:19 +00:00
Chris Wilson
15559e6cb6 igt/gem_wait: Timeout parameter to the WAIT ioctl is signed
So convert from uint64_t to int64_t. The distinction becomes important
when you realise what test we were missing...

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-03-06 08:50:19 +00:00
Daniel Vetter
305fb1db5c lib: add igt_assert_lt
Found one user in gem_wait.c

Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2015-02-27 16:24:25 +01:00
Damien Lespiau
d4c1bb7aab gem_wait: Use PRIu64 in format string
../../tests/gem_wait.c: In function ‘render_timeout’:
../../tests/gem_wait.c:182:3: warning: format ‘%llu’ expects argument of type
‘long long unsigned int’, but argument 3 has type ‘uint64_t’ [-Wformat=]

   igt_info("Finished with %llu time remaining\n", timeout);

Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2014-10-06 18:58:03 +01:00
Daniel Vetter
5c0139c304 tests/gem_wait: Don't close drmfd in subtest
I didn't notice this on the machine I developed it since the original
wait testcase fails there. Oops.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-10-06 08:32:49 +02:00
Daniel Vetter
0eaa18061b tests/gem_wait: argument validation tests
Shockingly we don't check for 0 flags!

Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2014-09-29 15:33:07 +02:00
Daniel Vetter
e4753d2d96 tests/gem_wait_render_timeout: Convert to subtests
I want to add a bunch of api tests besides the functional
"render-timeout" testcase.

Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2014-09-29 15:33:07 +02:00