summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Widawsky <ben@bwidawsk.net>2012-04-03 23:02:59 -0700
committerDaniel Vetter <daniel.vetter@ffwll.ch>2012-04-04 11:13:06 +0200
commitaf275bd52197cb41e6beb83dc496a50666b48814 (patch)
tree6c293c85aacfd6b33a023c86e057fffd4ae15987
parentbb86947638b7471c4e3da5dd32b756b0c7d504ae (diff)
tests: add wedging tests
Used to check that i915_error_state works. Unfortunately this kills the gpu because wedging is permanent. Base on a patch by Ben Widawsky. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
-rw-r--r--tests/Makefile.am2
-rwxr-xr-xtests/debugfs_wedged10
2 files changed, 11 insertions, 1 deletions
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 6544ec7f..647cc32b 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -88,7 +88,7 @@ HANG = \
$(NULL)
EXTRA_PROGRAMS = $(TESTS_progs) $(HANG)
-EXTRA_DIST = $(TESTS_scripts) check_drm_clients
+EXTRA_DIST = $(TESTS_scripts) drm_lib.sh check_drm_clients debugfs_wedged
CLEANFILES = $(EXTRA_PROGRAMS)
AM_CFLAGS = $(DRM_CFLAGS) $(CWARNFLAGS) \
diff --git a/tests/debugfs_wedged b/tests/debugfs_wedged
new file mode 100755
index 00000000..80a32f61
--- /dev/null
+++ b/tests/debugfs_wedged
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+SOURCE_DIR="$( dirname "${BASH_SOURCE[0]}" )"
+. $SOURCE_DIR/drm_lib.sh
+
+# Testcase: wedge the hw to check the error_state reading
+#
+# Unfortunately wedged is permanent, so this test is not run by default
+echo 1 > ${i915_path}/i915_wedged
+cat $i915_path/i915_error_state > /dev/null 2>&1