[Intel-gfx] [PATCH igt] drv_module_reload_basic: Add inject-fault option
Imre Deak
imre.deak at intel.com
Fri Mar 11 23:18:15 UTC 2016
Add an option to insert the module with fault injection enabled.
Requested by Chris.
CC: Chris Wilson <chris at chris-wilson.co.uk>
Signed-off-by: Imre Deak <imre.deak at 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
More information about the Intel-gfx
mailing list