8 Commits

Author SHA1 Message Date
Daniel Vetter
071e9ca1ca lib: add igt_main macro
In the past new testcases with subtest often forgot to add the call to
igt_exit at the end of their main() function. That is now caught with
a bit more obnoxious asserts, but it's still a nuissance.

This little igt_main macro takes care of that (and also of calling the
subtest machinery initialization code correctly).

If no one objects I'll roll this out for all the simple cases (i.e.
those tests that don't have additional argv parsing on top of the
subtest machinery).

v2: Roll it out across the board.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-11-01 21:10:59 +01:00
Daniel Vetter
867b1a51a6 tests/gem_reloc_overflow: New subtest for overflowing buffer_count
Luckily everything seems to be fine.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-09-19 11:01:14 +02:00
Daniel Vetter
bf6f166035 tests/gem_reloc_overflow: Extract reloc_tests
I'll be adding more stuff soon ;-)

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-09-19 10:20:46 +02:00
Daniel Vetter
b3dadedd2e tests/gem_reloc_overflow: Add more checks
For reloc offsets and batch start/len. Doesn't quite fit into the test
subject at hand here, but meh.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-09-04 15:27:14 +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
225a91bc54 lib/drmtest: include sys/mman.h from drmtest.h
We need it for mmapping to get at PROT_READ|WRITE anyway.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-09-03 10:38:29 +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
Kees Cook
c3bfd738c7 tests: add gem_reloc_overflow to check wrapping
This adds a test to make sure that the execbuffer validation routine is
checking for invalid addresses, single entry overflow, and multi-entry
wrapping overflow.

Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-03-22 12:19:58 +01:00