From f0d5874bd824b4b452607e055fc86b38a399acf8 Mon Sep 17 00:00:00 2001 From: Imre Deak Date: Mon, 14 Mar 2016 17:17:12 +0200 Subject: [PATCH] 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 --- tests/drv_module_reload_basic | 16 ++++++++++++---- 1 file 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 $?