14 Commits

Author SHA1 Message Date
Daniel Vetter
b3880d3a96 tests: roll out igt_fixture
Also sprinkle igt_assert and igt_require over the setup code to clean
up code while at it. To avoid gcc getting upset about unitialized
variables just move them out of main as global data (where they always
get initialized to 0) - gcc can't see through our igt_fixture and
igt_subtest maze properly.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-08-14 18:02:46 +02:00
Daniel Vetter
a1ca8ef5b1 tests: use igt_exit() consistently with subtests
This is mostly important to get the SKIP reporting right, but I've
found a few stragglers that wanted to get converted over to the igt
result reporting completely.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-08-14 16:08:00 +02: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
Daniel Vetter
814b135541 s/drmtest_subtest_block/drmtest_subtest/
The _block postfix meant to convey that a C statement/block must
follow can be misread as the verb to block. So drop it.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-08-12 12:15:16 +02:00
Daniel Vetter
9f6365e4ea lib/drmtest: Add drmtest_subtest_block macro
Doesn't do more than an if (drmtest_run_test(name)) right now, but
as soon as we get a bit of infrastructure to handle test failures and
skipping, this will get more interesting.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-08-12 11:10:26 +02:00
Daniel Vetter
8e46c382e3 lib/drmtest: add gem_flink and gem_open
Requires us to rename a few things in the gem_flink test to avoid
variable shadowing.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-07-23 23:15:12 +02:00
Daniel Vetter
573d59dd14 tests/gem_flink: enable flink lifetime subtest
Somehow fumbled this.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-12-17 15:30:53 +01:00
Daniel Vetter
6daae8bcb6 tests/gem_flink: check flink lifetime rules
flink names may not be destroyed while there's still a userspace
handle around. Test this by
- exporting an flink name from fd2
- open a gem bo from that name in fd
- close fd2, then open a new drm file (so that the original handle
  disappears)
- check whether the same flink name still works
2012-12-01 13:07:45 +01:00
Daniel Vetter
2a9e128b18 tests/gem_flink: convert to subtest infrastructure 2012-11-28 12:17:40 +01:00
Daniel Vetter
a7a80c2c2f tests: fixup new warnings
Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-01-10 15:50:20 +01:00
Chris Wilson
c935c60214 tests: Fix fallout from s/EBADF/ENOENT/ in 2.6.36
After bf79cb914dbfe848add8bb76cbb8ff89110d29ff, drm uses ENOENT to
report unknown handles buffer objects, update the tests accordingly.

Fixes:

  Bug 29794 - some intel_gpu_tools cases fail
  https://bugs.freedesktop.org/show_bug.cgi?id=29794

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-08-25 12:00:05 +01:00
Eric Anholt
0581738c7a tests/: warning fixes 2009-03-27 16:04:25 -07:00
Eric Anholt
895a415909 Add the tests we want from libdrm. 2009-03-26 18:47:42 -07:00