11 Commits

Author SHA1 Message Date
Daniel Vetter
ad0f081f2b Revert "tests/gem_concurrent_blit: Fix segmentation fault"
This reverts commit 912a7d855600aadb937517ec5bab26bfd9b8953d.

Now fixed for real!

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-08-26 20:55:54 +02:00
Daniel Vetter
912a7d8556 tests/gem_concurrent_blit: Fix segmentation fault
Apparently the simple changes introduced in

commit 78865847f9fae7e590960f9836f2ec8b611a190e
Author:     Daniel Vetter <daniel.vetter@ffwll.ch>
AuthorDate: Mon Aug 19 07:23:49 2013 +0200
Commit:     Daniel Vetter <daniel.vetter@ffwll.ch>
CommitDate: Mon Aug 19 08:09:25 2013 +0200

    lib/drmtest: skip fixtures after an igt_skip

pushed the stack space requirement for run_modes over some magic limit
(I guess where the strack grow logic starts to fail, but I didn't
check). Fix this by moving the data into .bss.

Also add some asserts to check that fixtures aren't abused while at
it (i.e. the useful parts of my debug printf/assert craze).

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=68299
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-08-20 06:42:10 +02:00
Chris Wilson
0d320fdced gem_concurrent_blit: Purge the child bufmgr's cache
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=68169
2013-08-16 12:23:17 +01:00
Chris Wilson
1b17cb9d04 gem_concurrent_blit: Fix the leak from the children.
As the children use the parent's fd, the kernel only has a single filp
for everyone. Therefore we cannot rely on the process termination
reaping the buffers we allocate for the children.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=68169
2013-08-16 11:26:00 +01:00
Chris Wilson
1ca607b458 gem_concurrent_blit: Share total num_buffers between all children
Apparently not all machines have more than 4GiB of RAM available.
Spoilsports.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=68169
2013-08-16 09:52:43 +01:00
Daniel Vetter
2dbd998429 tests: Introduce igt_fixture
Just a tiny wrapper to protect global test setup/teardown code when
just listing subtests. Rolling this out over all tests with subtests
should allow us to generate the testlist with piglit as an
unpriviledged user on a non-intel system.

The aim here is to make our QA team happy who currently suffers from
this. Even more so for the prime tests since you need a system with
intel _and_ nouveau gpus to just be able to list tests.

Exemplary conversion with gem_concurrent_blt.c

Fixture is the same name other test suites like googletest use for
setup/teardown code used by multiple tests.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-08-14 17:04:56 +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
ec283d6a52 tests/gem_concurrent_blt: extract run wrappers
Functional programming ftw!

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-08-14 15:18:37 +02:00
Daniel Vetter
9a4957a1b3 tests/gem_concurrent_blt: use the test helpers in the forked tests
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-08-14 15:10:52 +02:00
Daniel Vetter
5a598c9b2e tests/gem_concurrent_blt: refactor basic run modes a bit
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-08-14 15:08:05 +02:00
Daniel Vetter
43779e37b5 tests: merge gem_*_concurrent_blt together
Too much copy&pasting isn't good.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-08-14 14:50:50 +02:00