From: Mika Kuoppala <mika.kuoppala@linux.intel.com>
To: intel-gfx@lists.freedesktop.org
Subject: [PATCH 2/3] tests: add i915_sfs_path
Date: Thu, 27 Jun 2013 16:54:43 +0300 [thread overview]
Message-ID: <1372341284-14132-2-git-send-email-mika.kuoppala@intel.com> (raw)
In-Reply-To: <1372341284-14132-1-git-send-email-mika.kuoppala@intel.com>
To access 'error_state' through sysfs.
Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
---
tests/drm_lib.sh | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/tests/drm_lib.sh b/tests/drm_lib.sh
index 7eaf34e..72da4ad 100755
--- a/tests/drm_lib.sh
+++ b/tests/drm_lib.sh
@@ -29,4 +29,19 @@ if [ `cat $i915_dfs_path/clients | wc -l` -gt "2" ] ; then
die "ERROR: other drm clients running"
fi
+if [ -d /sys/class/drm ] ; then
+ sysfs_path=/sys/class/drm
+fi
+
+i915_sfs_path=x
+for dir in `ls $sysfs_path` ; do
+ if [ -f $sysfs_path/$dir/error_state ] ; then
+ i915_sfs_path=$sysfs_path/$dir
+ break
+ fi
+done
+
+if [ $i915_sfs_path = "x" ] ; then
+ die " i915 sysfs path not found."
+fi
--
1.7.9.5
next prev parent reply other threads:[~2013-06-27 13:54 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-27 13:54 [PATCH 1/3] tests: rename debugfs base path to be more specific Mika Kuoppala
2013-06-27 13:54 ` Mika Kuoppala [this message]
2013-06-27 13:54 ` [PATCH 3/3] tests/ZZ_hangman: Test both error_state interfaces Mika Kuoppala
2013-06-27 17:23 ` Daniel Vetter
2013-06-28 11:35 ` Mika Kuoppala
2013-07-01 16:56 ` 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=1372341284-14132-2-git-send-email-mika.kuoppala@intel.com \
--to=mika.kuoppala@linux.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.