summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJani Nikula <jani.nikula@intel.com>2016-10-13 12:16:20 +0300
committerJani Nikula <jani.nikula@intel.com>2016-10-14 16:06:44 +0300
commit790b896898aeacc7c8325ca386599867af6e8fdc (patch)
treeaa8d19bb720b6b3b02f89549a9f930cd960a2c46 /tests
parent230df2dc2ac60e30b76612ee6f1429f165323472 (diff)
tests: add more checks for finding the debugfs in script based tests
While at it, make debugfs_path point at the debugfs root, not dri. This'll be handy in future work. Reviewed-by: Petri Latvala <petri.latvala@intel.com> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Diffstat (limited to 'tests')
-rwxr-xr-xtests/drm_lib.sh16
1 files changed, 10 insertions, 6 deletions
diff --git a/tests/drm_lib.sh b/tests/drm_lib.sh
index 1abc1580..df8ed7e7 100755
--- a/tests/drm_lib.sh
+++ b/tests/drm_lib.sh
@@ -41,18 +41,22 @@ do_or_die() {
$@ > /dev/null 2>&1 || (echo "FAIL: $@ ($?)" && exit $IGT_EXIT_FAILURE)
}
-if [ -d /debug/dri ] ; then
- debugfs_path=/debug/dri
+if [ -d /sys/kernel/debug ]; then
+ debugfs_path=/sys/kernel/debug
+elif [ -d /debug ]; then
+ debugfs_path=/debug
+else
+ skip "debugfs not found"
fi
-if [ -d /sys/kernel/debug/dri ] ; then
- debugfs_path=/sys/kernel/debug/dri
+if [ ! -d $debugfs_path/dri ]; then
+ skip "dri debugfs not found"
fi
i915_dfs_path=x
for minor in `seq 0 16`; do
- if [ -f $debugfs_path/$minor/i915_error_state ] ; then
- i915_dfs_path=$debugfs_path/$minor
+ if [ -f $debugfs_path/dri/$minor/i915_error_state ] ; then
+ i915_dfs_path=$debugfs_path/dri/$minor
break
fi
done