summaryrefslogtreecommitdiff
path: root/tests/gem_flink_race.c
diff options
context:
space:
mode:
authorDaniel Vetter <daniel.vetter@ffwll.ch>2013-07-24 09:31:40 +0200
committerDaniel Vetter <daniel.vetter@ffwll.ch>2013-07-24 09:31:40 +0200
commitdfe942edec1a713568a19e15ce75e1ed01b9fb08 (patch)
treedf76bd635e93077cafd4428b9120fb22bce0705a /tests/gem_flink_race.c
parentaaeaca77208ef792dcb3fbf97c63e2c0303d7e5e (diff)
Revert "tests/gem_flink_race: count leaked objects"
This reverts commit bd927662fcfb1443c5982fb04cc694f78e1c8d53. It's bogus. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'tests/gem_flink_race.c')
-rw-r--r--tests/gem_flink_race.c28
1 files changed, 1 insertions, 27 deletions
diff --git a/tests/gem_flink_race.c b/tests/gem_flink_race.c
index eb144ab1..a8bbfd35 100644
--- a/tests/gem_flink_race.c
+++ b/tests/gem_flink_race.c
@@ -24,7 +24,6 @@
* Daniel Vetter <daniel.vetter@ffwll.ch>
*/
-#define _GNU_SOURCE
#include <sys/ioctl.h>
#include <stdlib.h>
#include <string.h>
@@ -32,7 +31,6 @@
#include <fcntl.h>
#include <unistd.h>
#include <pthread.h>
-#include <stdio.h>
#include "drmtest.h"
#include "i915_drm.h"
@@ -68,35 +66,15 @@ static void *thread_fn(void *p)
return (void *)0;
}
-static int get_object_count(const char *path)
-{
- FILE *file;
- int ret, scanned;
- file = fopen(path, "r");
-
- scanned = fscanf(file, "%i objects,", &ret);
- assert(scanned == 1);
-
- return ret;
-}
-
int main(int argc, char **argv)
{
int num_threads;
pthread_t *threads;
int r, i;
void *status;
- int device = drm_get_card(0);
- int old_object_count, new_object_count;
- char *path;
drmtest_skip_on_simulation();
- r = asprintf(&path, "/sys/kernel/debug/dri/%d/i915_gem_objects", device);
- assert(r != -1);
-
- old_object_count = get_object_count(path);
-
num_threads = sysconf(_SC_NPROCESSORS_ONLN) - 1;
if (!num_threads)
num_threads = 1;
@@ -133,9 +111,5 @@ int main(int argc, char **argv)
close(fd);
- new_object_count = get_object_count(path);
-
- printf("leaked %d objects\n", new_object_count - old_object_count);
-
- return new_object_count - old_object_count > 0 ? 1 : 0;
+ return 0;
}