tests: add test to read all debugfs files

Catches a bunch of forcewake warnings on snb+

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
This commit is contained in:
Daniel Vetter
2011-10-30 20:51:03 +01:00
parent 5b8bbc950d
commit f361664df0
2 changed files with 36 additions and 4 deletions
+27
View File
@@ -0,0 +1,27 @@
#!/bin/sh
if [ -d /debug/dri ] ; then
debugfs_path=/debug_dri
fi
if [ -d /sys/kernel/debug/dri ] ; then
debugfs_path=/sys/kernel/debug/dri
fi
i915_path=x
for dir in `ls $debugfs_path` ; do
if [ -f $debugfs_path/$dir/i915_error_state ] ; then
i915_path=$debugfs_path/$dir
break
fi
done
if [ $i915_path = "x" ] ; then
echo i915 debugfs path not found.
exit 1
fi
# read everything we can
cat $i915_path/* >& /dev/null
exit 0