tests/hangman: Be lenient towards a non-existent sysfs error state

As /sys/class/drm/cardX/error is a new interface for 3.11, we need to be
quiet when it does not exist or else we upset the automated tests.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=66533
This commit is contained in:
Chris Wilson
2013-07-03 08:00:13 +01:00
parent ae452e327a
commit e50ae9596c
2 changed files with 18 additions and 18 deletions
+2 -6
View File
@@ -33,15 +33,11 @@ if [ -d /sys/class/drm ] ; then
sysfs_path=/sys/class/drm
fi
i915_sfs_path=x
i915_sfs_path=
for dir in `ls $sysfs_path` ; do
if [ -f $sysfs_path/$dir/error ] ; then
i915_sfs_path=$sysfs_path/$dir
break
fi
done
if [ $i915_sfs_path = "x" ] ; then
echo " i915 sysfs path not found."
fi
# sysfs may not exist as the 'error' is a new interface in 3.11