From: Ben Widawsky <ben@bwidawsk.net>
To: intel-gfx@lists.freedesktop.org
Cc: Ben Widawsky <ben@bwidawsk.net>,
Ben Widawsky <benjamin.widawsky@intel.com>
Subject: [PATCH 2/2] tests: wedged + error_state read test
Date: Tue, 3 Apr 2012 23:02:59 -0700 [thread overview]
Message-ID: <1333519380-6756-3-git-send-email-ben@bwidawsk.net> (raw)
In-Reply-To: <1333519380-6756-1-git-send-email-ben@bwidawsk.net>
A bit quirky because wedged doesn't like being written to by normal users
Signed-off-by: Ben Widawsky <benjamin.widawsky@intel.com>
---
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
next prev parent reply other threads:[~2012-04-04 6:04 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-04 6:02 [PATCH 0/3]: test case + fix for debugfs regression Ben Widawsky
2012-04-04 6:02 ` [PATCH 1/2] tests: use common code for scripts Ben Widawsky
2012-04-04 6:02 ` Ben Widawsky [this message]
2012-04-04 10:48 ` [PATCH 2/2] tests: wedged + error_state read test Chris Wilson
2012-04-04 11:09 ` Daniel Vetter
2012-04-04 6:03 ` [PATCH] drm/i915: VCS is not the last ring Ben Widawsky
2012-04-04 10:44 ` Daniel Vetter
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1333519380-6756-3-git-send-email-ben@bwidawsk.net \
--to=ben@bwidawsk.net \
--cc=benjamin.widawsky@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox