diff options
author | Imre Deak <imre.deak@intel.com> | 2016-03-14 17:17:12 +0200 |
---|---|---|
committer | Imre Deak <imre.deak@intel.com> | 2016-03-14 17:44:55 +0200 |
commit | f0d5874bd824b4b452607e055fc86b38a399acf8 (patch) | |
tree | b696f9d7a87618c99dc032de9f9ebf92ddfec03c /tests | |
parent | 772393e806791c9af1c050262c92300c9565e823 (diff) |
drv_module_reload_basic: skip alive check after load failure injection
After loading the module with load failure injection enabled don't try
check the alive state. Also limit the number of failure points to
existing ones, to reduce the run time of the test.
v2:
- make VT binding/snd module loading part of reload and VT bind fail
silently (Chris)
Signed-off-by: Imre Deak <imre.deak@intel.com>
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/drv_module_reload_basic | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/tests/drv_module_reload_basic b/tests/drv_module_reload_basic index b2ef38e6..42c815cc 100755 --- a/tests/drv_module_reload_basic +++ b/tests/drv_module_reload_basic @@ -42,10 +42,15 @@ function reload() { fi modprobe i915 $* - echo 1 > /sys/class/vtconsole/vtcon1/bind + + if [ -f /sys/class/vtconsole/vtcon1/bind ]; then + echo 1 > /sys/class/vtconsole/vtcon1/bind + fi modprobe snd_hda_intel +} +function finish_load() { # does the device exist? if $SOURCE_DIR/gem_alive > /dev/null ; then echo "module successfully loaded again" @@ -64,13 +69,16 @@ function reload() { } reload || exit $? +finish_load || exit $? # Repeat the module reload trying to to generate faults fault=1 -for i in $(seq 0 31); do - reload i915.fault_injection=$fault +for i in $(seq 0 4); do + reload inject_load_failure=$fault fault=$(($fault * 2)) done -reload +reload || exit $? +finish_load + exit $? |