tests: add wedging tests
authorBen Widawsky <ben@bwidawsk.net>
Wed, 4 Apr 2012 06:02:59 +0000 (23:02 -0700)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Wed, 4 Apr 2012 09:13:06 +0000 (11:13 +0200)
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>
tests/Makefile.am
tests/debugfs_wedged [new file with mode: 0755]

index 6544ec7..647cc32 100644 (file)
@@ -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 (executable)
index 0000000..80a32f6
--- /dev/null
@@ -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