8 $@ > /dev/null 2>&1 || (echo "FAIL: $@ ($?)" && exit -1)
11 if [ -d /debug/dri ] ; then
12 debugfs_path=/debug/dri
15 if [ -d /sys/kernel/debug/dri ] ; then
16 debugfs_path=/sys/kernel/debug/dri
20 for minor in `seq 0 16`; do
21 if [ -f $debugfs_path/$minor/i915_error_state ] ; then
22 i915_dfs_path=$debugfs_path/$minor
27 if [ $i915_dfs_path = "x" ] ; then
28 die " i915 debugfs path not found."
31 # read everything we can
32 if [ `cat $i915_dfs_path/clients | wc -l` -gt "2" ] ; then
33 [ -n "$DRM_LIB_ALLOW_NO_MASTER" ] || \
34 die "ERROR: other drm clients running"
38 if [ -d /sys/class/drm ] ; then
39 sysfs_path=/sys/class/drm
40 if [ -f $sysfs_path/card$minor/error ] ; then
41 i915_sfs_path="$sysfs_path/card$minor"
44 # sysfs may not exist as the 'error' is a new interface in 3.11
46 function drmtest_skip_on_simulation()
48 [ -n "$INTEL_SIMULATION" ] && exit 77
51 drmtest_skip_on_simulation