From 17afdd7401b2190b5fd80631448309151a28bb88 Mon Sep 17 00:00:00 2001 From: "Ziqian SUN (Zamir)" Date: Thu, 21 Dec 2017 15:39:22 +0800 Subject: [PATCH] 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. Resolves: RHEL-8903 Signed-off-by: Ziqian SUN (Zamir) --- tests/sanity/runtest.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tests/sanity/runtest.sh b/tests/sanity/runtest.sh index 5afac5d..14bb3ac 100755 --- a/tests/sanity/runtest.sh +++ b/tests/sanity/runtest.sh @@ -114,6 +114,15 @@ rlJournalStart RunKmod $TESTS rlPhaseEnd + if ! (lsmod | grep gre) + then + wparam="gre" + elif ! (lsmod | grep uwb) + then + wparam="uwb" + else + wparam="atm" + fi rlPhaseStartTest "Modprobe with wrong parameter" rlRun -l "modprobe $wparam BADPARAM=this_should_fail" 0-1 rlRun -l "dmesg | grep -i 'Unknown parameter' | grep 'BADPARAM' | grep '$wparam'"