mirror of
https://github.com/tiagovignatti/intel-gpu-tools.git
synced 2026-08-23 14:23:03 +00:00
tests: use igt_debugfs where possible
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user