[PATCH intel-gpu-tools 3/3] drm-lib: Skip test when not running on i915

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Daniel Stone <daniels@xxxxxxxxxxxxx>

Since drm_lib.sh tries to access the i915 debugfs path, skip the test if
we find that we have GPUs in debugfs, but none of them are i915.

Signed-off-by: Daniel Stone <daniels@xxxxxxxxxxxxx>
---
 tests/drm_lib.sh | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/tests/drm_lib.sh b/tests/drm_lib.sh
index c50664c..c35287c 100755
--- a/tests/drm_lib.sh
+++ b/tests/drm_lib.sh
@@ -46,14 +46,23 @@ if [ -d /sys/kernel/debug/dri ] ; then
 fi
 
 i915_dfs_path=x
+found_any=0
 for minor in `seq 0 16`; do
 	if [ -f $debugfs_path/$minor/i915_error_state ] ; then
 		i915_dfs_path=$debugfs_path/$minor
 		break
 	fi
+	if [ -f $debugfs_path/$minor/name ] ; then
+		found_any=1
+	fi
 done
 
 if [ $i915_dfs_path = "x" ] ; then
+	# Found DRM devices in debugfs but not i915; skip the test.
+	if [ $found_any = 1 ]; then
+		exit 77
+	fi
+
 	die " i915 debugfs path not found."
 fi
 
-- 
2.3.5

_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/intel-gfx





[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux