On Thu, Aug 07, 2014 at 02:30:38PM -0700, Matthew Atwood wrote:
> From: Matt Atwood <[email protected]>
> 
> 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
_______________________________________________
Piglit mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/piglit

Reply via email to