14 Commits

Author SHA1 Message Date
Daniel Vetter
f3c54d0cb4 tests: use igt_assert/igt_require more
With the new _f variants we can replace almost all of them.

Also remove a ton of checks for argc != 1, they're a bit useless ...

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-09-25 14:37:07 +02:00
Daniel Vetter
44d4a3defb tests/gem_reloc_overflow: convert to subtests
More will come!

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-09-04 15:27:14 +02:00
Daniel Vetter
3c46789c8d tests/gem_exec_bad_domains: enable conflicting write domains test
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-09-04 15:27:14 +02:00
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
5e25fcc285 tests: use igt_fail instead of exit(param != 0)
Mostly a sed job with too manual fixups:
- one case of using _exit instead of exit
- and one case which under some conditions use 77, so convert that
  check to an igt_skip.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-08-13 15:15:17 +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
3084263782 tests: disable gem_exec_bad_domains/conflicting-write-domain
Kernel checks have been eased in

commit c1f093e09c4ceb583b04d11e767bb3201812e4d2
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Mon Dec 3 11:49:07 2012 +0000

    drm/i915: Remove check for conflicting relocation write-domains
2012-12-07 23:34:23 +01:00
Daniel Vetter
d8df90dc6b tests/gem_exec_bad_domains: add more bad domains
- mulitple write domains
- conflicting write domains
- not-yet-defined gpu domains

Also convert to subtests while at it.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-12-01 00:58:14 +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
Daniel Vetter
ab3f4bdafe tests: add gem_exec_bad_domains
To check whether the kernel properly rejects non-gpu domains in
relocs.

Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2011-12-02 18:41:34 +01:00