summaryrefslogtreecommitdiff
path: root/tests/gem_flink_race.c
AgeCommit message (Collapse)Author
2014-05-14tests: sprinkle igt loggingDaniel Vetter
All the cases that simply dump some debug information and couldn't be converted to some of the fancier macros. Some information output removed when it's redundant with the subtest status. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-05-07tests/gem_flink_race,prime_self_import: fix object countsMika Kuoppala
We need to add one drm_open_any() before getting the object counts as first call to drm_open_any() allocates file descriptors for exit handlers and thus is not symmetrical. The regression, assymmetric behaviour, was introduced in: commit 2f2c491cf3167befe7c79e4b17afb4f6284dfc84 Author: Mika Kuoppala <mika.kuoppala@intel.com> Date: Fri Mar 28 10:52:46 2014 +0200 lib/drmtest: don't dup quiescent fd Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=77867 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=77875 Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
2014-03-22lib: unnecessary header removal for drmtest.h, part 2Daniel Vetter
I've left unistd.h in it - it's not strictly required but most users of drmtest.h want it for the open helpers, and then you kinda need to close that file descriptor again ... Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-22lib: unnecessary header removal for drmtest.h, part 1Daniel Vetter
Brought a few missing headers to light in ioctl_wrappers.h, too. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-11-05gem_flink_race: Assure no pending requests before object countingOscar Mateo
Same thing that was done for prime_self_import. v2: Move igt_drop_caches_set() call inside get_object_count() to make it clearer why we want this. Signed-off-by: Oscar Mateo <oscar.mateo@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-11-01lib: add igt_main macroDaniel Vetter
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-08-19lib/drmtest: rip out drm_open_any_masterDaniel Vetter
It's unused. Also most of our tests failed to ask for the right type of drm fd anyway. So it's imo better to just let them fall over when they don't get master but want it, like they already do today. This also allows us to garbage-collect the master parameter to drm_get_card and associated code. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-08-14tests: use igt_exit() consistently with subtestsDaniel Vetter
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-13tests: s/assert/igt_assertDaniel Vetter
Just a wholesale rollout for now, we can refine later on. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-08-12s/drmtest_/igt_/Daniel Vetter
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-12s/drmtest_subtest_block/drmtest_subtest/Daniel Vetter
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-12lib/drmtest: Add drmtest_subtest_block macroDaniel Vetter
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-06tests/gem_flink_race: Kill duplicate drm_open_anyDaniel Vetter
Leak test that leaks ... Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-07-24tests/gem_flink_race: correct thread countDaniel Vetter
They all race against each another, no worker-slave relationship like in the other subtest. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-07-24tests/gem_flink_race: fix up scanf formatDaniel Vetter
Oops, failed to git add. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-07-24tests/gem_flink_race: actually make it somewhat usefulDaniel Vetter
- Enable subtest support. - Add a check for the same flink name in the racing threads, which is an issue one of my recent patches actually fixes. - Add the test I've actually wanted to write which races an flink against gem close (with no open in between). That one does indeed leak. - Readd the leak check, but note that this needs a fixed kernel. Otherwise the leak counter will be utter garbage. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-07-24Revert "tests/gem_flink_race: count leaked objects"Daniel Vetter
This reverts commit bd927662fcfb1443c5982fb04cc694f78e1c8d53. It's bogus. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-07-24tests/gem_flink_race: check for expected flink failure codeDaniel Vetter
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-07-24tests/gem_flink_race: count leaked objectsDaniel Vetter
And fail the test if the leak count is bigger than 0. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-07-24tests/gem_flink_race: kill debug printfDaniel Vetter
Oops. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-07-23tests: add gem_flink_raceDaniel Vetter
This exercises a race in the flink name descruction of the current drm gem core. When racing a gem close with a gem open the open can sneak in and cause the kernel to leak the flink name and its reference. This results in leaked gem objects that won't get reaped even at drm file close time. On my 2 core/4 threads snb machine this leaks on the order of 1k objects per second. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>