diff options
author | Thomas Wood <thomas.wood@intel.com> | 2014-11-03 13:48:51 +0000 |
---|---|---|
committer | Thomas Wood <thomas.wood@intel.com> | 2014-11-06 13:25:03 +0000 |
commit | c049c39f357295ecfc4d0795b5b3b1e35b04ac58 (patch) | |
tree | b67e1b8b4f7208c76e0f8adc7f6e6df00457fef2 /tests/prime_self_import.c | |
parent | 4f689d52e7e6a511fb0de21ccc0b938d57ce6f41 (diff) |
tests: use igt_debugfs where possible
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
Diffstat (limited to 'tests/prime_self_import.c')
-rw-r--r-- | tests/prime_self_import.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/tests/prime_self_import.c b/tests/prime_self_import.c index 470917a5..3e482b79 100644 --- a/tests/prime_self_import.c +++ b/tests/prime_self_import.c @@ -216,15 +216,10 @@ static int get_object_count(void) { FILE *file; int ret, scanned; - int device = drm_get_card(); - char *path; 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); |