[Intel-gfx] [PATCH i-g-t] lib/debugfs: Close dir before returning open debugs file

Chris Wilson chris at chris-wilson.co.uk
Fri Apr 7 08:54:55 UTC 2017


On Fri, Apr 07, 2017 at 11:34:34AM +0300, Ander Conselvan de Oliveira wrote:
> The function igt_debugfs_open() would not close the debugfs dir before
> returning. Tests that do a lot of pipe CRC comparaions, such as
> kms_cursor_crc,  would eventually fail.
> 
> (kms_cursor_crc:3853) igt-debugfs-CRITICAL: Test assertion failure function igt_pipe_crc_do_start, file igt_debugfs.c:387:
> (kms_cursor_crc:3853) igt-debugfs-CRITICAL: Failed assertion: err == 0
> (kms_cursor_crc:3853) igt-debugfs-CRITICAL: Last errno: 24, Too many open files
> (kms_cursor_crc:3853) igt-debugfs-CRITICAL: error: -24 != 0

Whoops. Also for any test that repeatedly opens a debugfs, please do
move the igt_debugfs_dir() into the caller so we can cache the lookup
inside the fd.

> 83884e97e187 ("Restore "lib: Open debugfs files for the given DRM device"")
> Cc: Chris Wilson <chris at chris-wilson.co.uk>
> Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira at intel.com>
Reviewed-by: Chris Wilson <chris at chris-wilson.co.uk>
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre


More information about the Intel-gfx mailing list