Add default value for test param wparam

In this commit, value for $wparam is added by trying which of our chosen
module is not in use.

Signed-off-by: Ziqian SUN (Zamir) <zsun@redhat.com>
This commit is contained in:
Ziqian SUN (Zamir) 2017-12-21 15:39:22 +08:00
parent 4553a18b2c
commit a471736377

View File

@ -114,6 +114,15 @@ rlJournalStart
RunKmod $TESTS RunKmod $TESTS
rlPhaseEnd rlPhaseEnd
if ! (lsmod | grep gre)
then
wparam="gre"
elif ! (lsmod | grep uwb)
then
wparam="uwb"
else
wparam="atm"
fi
rlPhaseStartTest "Modprobe with wrong parameter" rlPhaseStartTest "Modprobe with wrong parameter"
rlRun -l "modprobe $wparam BADPARAM=this_should_fail" 0-1 rlRun -l "modprobe $wparam BADPARAM=this_should_fail" 0-1
rlRun -l "dmesg | grep -i 'Unknown parameter' | grep 'BADPARAM' | grep '$wparam'" rlRun -l "dmesg | grep -i 'Unknown parameter' | grep 'BADPARAM' | grep '$wparam'"