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>
This commit is contained in:
Imre Deak 2016-03-14 17:17:12 +02:00
parent 772393e806
commit f0d5874bd8

View File

@ -42,10 +42,15 @@ function reload() {
fi fi
modprobe i915 $* 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 modprobe snd_hda_intel
}
function finish_load() {
# does the device exist? # does the device exist?
if $SOURCE_DIR/gem_alive > /dev/null ; then if $SOURCE_DIR/gem_alive > /dev/null ; then
echo "module successfully loaded again" echo "module successfully loaded again"
@ -64,13 +69,16 @@ function reload() {
} }
reload || exit $? reload || exit $?
finish_load || exit $?
# Repeat the module reload trying to to generate faults # Repeat the module reload trying to to generate faults
fault=1 fault=1
for i in $(seq 0 31); do for i in $(seq 0 4); do
reload i915.fault_injection=$fault reload inject_load_failure=$fault
fault=$(($fault * 2)) fault=$(($fault * 2))
done done
reload reload || exit $?
finish_load
exit $? exit $?