[Piglit] [PATCH] tests/igt.py: debugfs subdir checky
Ben Widawsky
ben at bwidawsk.net
Thu Aug 7 15:58:24 PDT 2014
On Thu, Aug 07, 2014 at 02:30:38PM -0700, Matthew Atwood wrote:
> From: Matt Atwood <matthew.s.atwood at intel.com>
>
> Check if subdir variable is an actual subdirectory.
> ---
> tests/igt.py | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/tests/igt.py b/tests/igt.py
> index 58226a4..22250ce 100644
> --- a/tests/igt.py
> +++ b/tests/igt.py
> @@ -56,6 +56,8 @@ def checkEnvironment():
> print "Test Environment check: debugfs not mounted properly!"
> return False
> for subdir in os.listdir(debugfs_path):
> + if not os.path.isdir(os.path.join(debugfs_path, subdir)):
> + continue
> clients = open(os.path.join(debugfs_path, subdir, "clients"), 'r')
> lines = clients.readlines()
> if len(lines) > 2:
What is this fixing? The debugfs path is populated by the driver and I
am not aware of anything that isn't a directory being put there.
So, please add the reasoning for it to the commit message.
--
Ben Widawsky, Intel Open Source Technology Center
More information about the Piglit
mailing list