From: Ben Widawsky <ben@bwidawsk.net>
To: Intel GFX <intel-gfx@lists.freedesktop.org>
Cc: Ben Widawsky <ben@bwidawsk.net>
Subject: [PATCH 2/2] tests: Basic tools tester
Date: Thu, 11 Jul 2013 11:53:07 -0700 [thread overview]
Message-ID: <1373568787-3145-2-git-send-email-ben@bwidawsk.net> (raw)
In-Reply-To: <1373568787-3145-1-git-send-email-ben@bwidawsk.net>
v2: Remove the reg write test because it breaks pre gen5
Add the llc size param test
Requested-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
---
tests/Makefile.am | 1 +
tests/drm_lib.sh | 4 ++++
tests/tools_test | 21 +++++++++++++++++++++
3 files changed, 26 insertions(+)
create mode 100755 tests/tools_test
diff --git a/tests/Makefile.am b/tests/Makefile.am
index a422899..ccc97b8 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -115,6 +115,7 @@ TESTS_scripts_M = \
TESTS_scripts = \
test_rte_check \
+ tools_test \
debugfs_reader \
debugfs_emon_crash \
sysfs_l3_parity \
diff --git a/tests/drm_lib.sh b/tests/drm_lib.sh
index 5ca815b..5975b58 100755
--- a/tests/drm_lib.sh
+++ b/tests/drm_lib.sh
@@ -4,6 +4,10 @@ die() {
exit 1
}
+do_or_die() {
+ $@ > /dev/null 2>&1 || (echo "FAIL: $@ ($?)" && exit -1)
+}
+
if [ -d /debug/dri ] ; then
debugfs_path=/debug/dri
fi
diff --git a/tests/tools_test b/tests/tools_test
new file mode 100755
index 0000000..17f7822
--- /dev/null
+++ b/tests/tools_test
@@ -0,0 +1,21 @@
+#!/bin/bash
+# Test some of the most critical tools we have accidentally broken before.
+# TODO: Possibly make tests parse output
+
+whoami | grep -q root || ( echo ERROR: not running as root; exit 1 )
+
+SOURCE_DIR="$( dirname "${BASH_SOURCE[0]}" )"
+. $SOURCE_DIR/drm_lib.sh
+
+# ARB_MODE has existed for many gens. It differs per gen, but should be safe to
+# read regardless
+do_or_die "$SOURCE_DIR/../tools/intel_reg_read 0x4030"
+
+do_or_die "$SOURCE_DIR/../tools/intel_reg_dumper"
+
+do_or_die "$SOURCE_DIR/../tools/intel_get_llc_size"
+
+# TODO: Add more tests
+
+exit 0
+
--
1.8.3.2
next prev parent reply other threads:[~2013-07-11 18:49 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-10 2:58 [PATCH] drm/i915: Expose LLC size to user space Ben Widawsky
2013-07-10 2:58 ` [PATCH] intel_get_llc_size: Small tool to query LLC size Ben Widawsky
2013-07-10 6:34 ` Daniel Vetter
2013-07-10 16:58 ` Ben Widawsky
2013-07-10 17:15 ` Daniel Vetter
2013-07-10 17:24 ` Ben Widawsky
2013-07-10 17:45 ` Daniel Vetter
2013-07-10 8:59 ` [PATCH] drm/i915: Expose LLC size to user space Chris Wilson
2013-07-10 16:40 ` Ben Widawsky
2013-07-10 17:11 ` Ben Widawsky
2013-07-10 17:40 ` Chris Wilson
2013-07-10 17:46 ` Ben Widawsky
2013-07-10 18:00 ` Chris Wilson
2013-07-10 18:44 ` Ben Widawsky
2013-07-10 17:00 ` Bell, Bryan J
2013-07-11 0:16 ` Chad Versace
2013-07-11 5:06 ` Ben Widawsky
2013-07-11 18:52 ` [PATCH] [v2] " Ben Widawsky
2013-07-11 18:53 ` [PATCH 1/2] intel_get_llc_size: Small tool to query LLC size Ben Widawsky
2013-07-11 18:53 ` Ben Widawsky [this message]
2013-07-12 17:39 ` Chad Versace
2013-07-12 17:49 ` Ben Widawsky
2013-07-11 20:46 ` [PATCH] [v2] drm/i915: Expose LLC size to user space Chris Wilson
2013-07-12 17:38 ` Chad Versace
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=1373568787-3145-2-git-send-email-ben@bwidawsk.net \
--to=ben@bwidawsk.net \
--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