tests: use igt_debugfs where possible

Signed-off-by: Thomas Wood <thomas.wood@intel.com>
This commit is contained in:
Thomas Wood
2014-11-03 13:48:51 +00:00
parent 4f689d52e7
commit c049c39f35
6 changed files with 17 additions and 56 deletions
+2 -7
View File
@@ -52,16 +52,11 @@ int fd;
static int get_object_count(void)
{
FILE *file;
int ret, scanned;
int device = drm_get_card();
char *path;
int scanned, ret;
igt_drop_caches_set(DROP_RETIRE);
ret = asprintf(&path, "/sys/kernel/debug/dri/%d/i915_gem_objects", device);
igt_assert(ret != -1);
file = fopen(path, "r");
file = igt_debugfs_fopen("i915_gem_objects", "r");
scanned = fscanf(file, "%i objects", &ret);
igt_assert(scanned == 1);