From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ben Widawsky Subject: [PATCH 2/2] tests: wedged + error_state read test Date: Tue, 3 Apr 2012 23:02:59 -0700 Message-ID: <1333519380-6756-3-git-send-email-ben@bwidawsk.net> References: <1333519380-6756-1-git-send-email-ben@bwidawsk.net> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from cloud01.chad-versace.us (184-106-247-128.static.cloud-ips.com [184.106.247.128]) by gabe.freedesktop.org (Postfix) with ESMTP id 4464FA0204 for ; Tue, 3 Apr 2012 23:04:30 -0700 (PDT) In-Reply-To: <1333519380-6756-1-git-send-email-ben@bwidawsk.net> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org Errors-To: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org To: intel-gfx@lists.freedesktop.org Cc: Ben Widawsky , Ben Widawsky List-Id: intel-gfx@lists.freedesktop.org A bit quirky because wedged doesn't like being written to by normal users Signed-off-by: Ben Widawsky --- tests/Makefile.am | 3 ++- tests/ZZ_check_error_state | 9 +++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) create mode 100755 tests/ZZ_check_error_state diff --git a/tests/Makefile.am b/tests/Makefile.am index 6544ec7..4cb1093 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -65,6 +65,7 @@ TESTS_scripts = \ debugfs_emon_crash \ sysfs_edid_timing \ ZZ_check_dmesg \ + ZZ_check_error_state \ $(NULL) kernel_tests = \ @@ -88,7 +89,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 CLEANFILES = $(EXTRA_PROGRAMS) AM_CFLAGS = $(DRM_CFLAGS) $(CWARNFLAGS) \ diff --git a/tests/ZZ_check_error_state b/tests/ZZ_check_error_state new file mode 100755 index 0000000..48992ed --- /dev/null +++ b/tests/ZZ_check_error_state @@ -0,0 +1,9 @@ +#!/bin/sh + +. ./drm_lib.sh + +# To run this from make test we have to use sudo. That is unfortunate +#[[ `id -u` -eq "0" ]] || die "You must be root" +#[[ `echo 1 > ${i915_path}/i915_wedged` ]] || die "Couldn't write to ${i915_path}/i915_wedged" +[[ `echo 1 | sudo tee ${i915_path}/i915_wedged` ]] || die "Couldn't write to ${i915_path}/i915_wedged" +cat $i915_path/i915_error_state > /dev/null 2>&1 -- 1.7.9.5