From: Imre Deak <imre.deak@intel.com>
To: intel-gfx@lists.freedesktop.org
Subject: [PATCH igt] drv_module_reload_basic: Add inject-fault option
Date: Sat, 12 Mar 2016 01:18:15 +0200 [thread overview]
Message-ID: <1457738295-4430-1-git-send-email-imre.deak@intel.com> (raw)
Add an option to insert the module with fault injection enabled.
Requested by Chris.
CC: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Imre Deak <imre.deak@intel.com>
---
tests/drv_module_reload_basic | 28 +++++++++++++++++++++++++++-
1 file changed, 27 insertions(+), 1 deletion(-)
diff --git a/tests/drv_module_reload_basic b/tests/drv_module_reload_basic
index ec1bae8..5e1260d 100755
--- a/tests/drv_module_reload_basic
+++ b/tests/drv_module_reload_basic
@@ -8,6 +8,32 @@
SOURCE_DIR="$( dirname "${BASH_SOURCE[0]}" )"
. $SOURCE_DIR/drm_lib.sh
+script_name=$(basename $0)
+
+function exit_with_usage
+{
+ echo "usage: $script_name [--inject-fault <fault mask>]"
+ exit -1
+}
+
+inject_fault_opt=
+
+while [ $# -gt 0 ]; do
+ case $1 in
+ --inject-fault)
+ if [ $# -lt 2 ]; then
+ exit_with_usage
+ fi
+ inject_fault_opt="inject_fault=$2"
+ shift
+ ;;
+ *)
+ exit_with_usage
+ ;;
+ esac
+ shift
+done
+
# no other drm service should be running, so we can just unbind
# we must kick away fbcon (but only fbcon)
@@ -38,7 +64,7 @@ else
echo module successfully unloaded
fi
-modprobe i915
+modprobe i915 $inject_fault_opt
echo 1 > /sys/class/vtconsole/vtcon1/bind
modprobe snd_hda_intel
--
2.5.0
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next reply other threads:[~2016-03-11 23:18 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-11 23:18 Imre Deak [this message]
2016-03-12 14:40 ` [PATCH v2] drv_module_reload_basic: Add inject-fault-* subtests Imre Deak
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=1457738295-4430-1-git-send-email-imre.deak@intel.com \
--to=imre.deak@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