f85d022c8b
1. Fix sanity tests. 2. Add libkmod to test ``` gcc -o test-libkmod test-libkmod.c -lkmod -lcmocka ./runtest.sh :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: TEST PROTOCOL :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: Package : kmod-devel Installed : kmod-devel-25-2.fc28.x86_64 beakerlib RPM : beakerlib-1.17-13.fc28.noarch Test version : 1.0 Test started : 2018-06-21 20:07:27 IST Test finished : Test duration : Test name : /CoreOS/libkmod Distro : Fedora release 28 (Twenty Eight) Hostname : Zeus Architecture : x86_64 CPUs : 8 x Intel(R) Core(TM) i7-6820HQ CPU @ 2.70GHz RAM size : 31542 MB HDD size : 452.94 GB :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: Setup :: Setup :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: [ 20:07:27 ] :: [ PASS ] :: File /usr/lib/modules/4.16.15-300.fc28.x86_64/kernel/net/ipv4/ipip.ko.xz should exist :: [ 20:07:27 ] :: [ BEGIN ] :: Running 'cp test-libkmod /usr/bin/' :: [ 20:07:27 ] :: [ PASS ] :: Command 'cp test-libkmod /usr/bin/' (Expected 0, got 0) :: [ 20:07:27 ] :: [ PASS ] :: Command 'cp test-libkmod /usr/bin/' (Expected 0, got 0) :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: Duration: 0s :: Duration: 0s :: Assertions: 3 good, 0 bad :: Assertions: 3 good, 0 bad :: RESULT: PASS :: RESULT: PASS :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: Test :: Test :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: [ 20:07:27 ] :: [ LOG ] :: Starting libkmod tests ... :: [ 20:07:27 ] :: [ LOG ] :: Starting libkmod tests ... :: [ 20:07:27 ] :: [ BEGIN ] :: Running '/usr/bin/test-libkmod' [==========] Running 2 test(s). [ RUN ] test_load_module [ OK ] test_load_module [ RUN ] test_remove_module [ OK ] test_remove_module [==========] 2 test(s) run. [ PASSED ] 2 test(s). :: [ 20:07:27 ] :: [ PASS ] :: Command '/usr/bin/test-libkmod' (Expected 0, got 0) :: [ 20:07:27 ] :: [ PASS ] :: Command '/usr/bin/test-libkmod' (Expected 0, got 0) :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: Duration: 0s :: Duration: 0s :: Assertions: 1 good, 0 bad ``` SANITY: ``` ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: kmod_load_insmod :: kmod_load_insmod :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: [ 20:07:26 ] :: [ BEGIN ] :: Running 'insmod /usr/lib/modules/4.16.15-300.fc28.x86_64///kernel/net/ipv4/udp_tunnel.ko.xz' :: [ 20:07:26 ] :: [ PASS ] :: Command 'insmod /usr/lib/modules/4.16.15-300.fc28.x86_64///kernel/net/ipv4/udp_tunnel.ko.xz' (Expected 0, got 0) :: [ 20:07:26 ] :: [ PASS ] :: Command 'insmod /usr/lib/modules/4.16.15-300.fc28.x86_64///kernel/net/ipv4/udp_tunnel.ko.xz' (Expected 0, got 0) :: [ 20:07:26 ] :: [ BEGIN ] :: Running 'lsmod | grep udp_tunnel' udp_tunnel 16384 0 :: [ 20:07:26 ] :: [ PASS ] :: Command 'lsmod | grep udp_tunnel' (Expected 0, got 0) :: [ 20:07:26 ] :: [ PASS ] :: Command 'lsmod | grep udp_tunnel' (Expected 0, got 0) :: [ 20:07:26 ] :: [ BEGIN ] :: Running 'rmmod udp_tunnel' :: [ 20:07:26 ] :: [ PASS ] :: Command 'rmmod udp_tunnel' (Expected 0, got 0) :: [ 20:07:26 ] :: [ PASS ] :: Command 'rmmod udp_tunnel' (Expected 0, got 0) :: [ 20:07:26 ] :: [ BEGIN ] :: Running 'lsmod | grep udp_tunnel' :: [ 20:07:26 ] :: [ PASS ] :: Command 'lsmod | grep udp_tunnel' (Expected 1-255, got 1) :: [ 20:07:26 ] :: [ PASS ] :: Command 'lsmod | grep udp_tunnel' (Expected 1-255, got 1) :: [ 20:07:26 ] :: [ BEGIN ] :: Running 'insmod /usr/lib/modules/4.16.15-300.fc28.x86_64///kernel/net/wireless/lib80211.ko.xz' :: [ 20:07:26 ] :: [ PASS ] :: Command 'insmod /usr/lib/modules/4.16.15-300.fc28.x86_64///kernel/net/wireless/lib80211.ko.xz' (Expected 0, got 0) :: [ 20:07:26 ] :: [ PASS ] :: Command 'insmod /usr/lib/modules/4.16.15-300.fc28.x86_64///kernel/net/wireless/lib80211.ko.xz' (Expected 0, got 0) :: [ 20:07:26 ] :: [ BEGIN ] :: Running 'lsmod | grep lib80211' lib80211 16384 0 :: [ 20:07:26 ] :: [ PASS ] :: Command 'lsmod | grep lib80211' (Expected 0, got 0) :: [ 20:07:26 ] :: [ PASS ] :: Command 'lsmod | grep lib80211' (Expected 0, got 0) :: [ 20:07:26 ] :: [ BEGIN ] :: Running 'rmmod lib80211' :: [ 20:07:26 ] :: [ PASS ] :: Command 'rmmod lib80211' (Expected 0, got 0) :: [ 20:07:26 ] :: [ PASS ] :: Command 'rmmod lib80211' (Expected 0, got 0) :: [ 20:07:26 ] :: [ PASS ] :: Command 'rmmod lib80211' (Expected 0, got 0) :: [ 20:07:26 ] :: [ PASS ] :: Command 'rmmod lib80211' (Expected 0, got 0) :: [ 20:07:26 ] :: [ BEGIN ] :: Running 'lsmod | grep lib80211' :: [ 20:07:26 ] :: [ PASS ] :: Command 'lsmod | grep lib80211' (Expected 1-255, got 1) :: [ 20:07:26 ] :: [ PASS ] :: Command 'lsmod | grep lib80211' (Expected 1-255, got 1) :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: Duration: 0s :: Duration: 0s :: Assertions: 8 good, 0 bad :: Assertions: 8 good, 0 bad :: RESULT: PASS :: RESULT: PASS :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: kmod_load_modprobe :: kmod_load_modprobe :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: [ 20:07:26 ] :: [ BEGIN ] :: Running 'modprobe tun' :: [ 20:07:26 ] :: [ PASS ] :: Command 'modprobe tun' (Expected 0, got 0) :: [ 20:07:26 ] :: [ PASS ] :: Command 'modprobe tun' (Expected 0, got 0) :: [ 20:07:26 ] :: [ BEGIN ] :: Running 'modprobe -r tun' :: [ 20:07:26 ] :: [ PASS ] :: Command 'modprobe -r tun' (Expected 0, got 0) :: [ 20:07:26 ] :: [ PASS ] :: Command 'modprobe -r tun' (Expected 0, got 0) :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: Duration: 0s :: Duration: 0s :: Assertions: 2 good, 0 bad :: Assertions: 2 good, 0 bad :: RESULT: PASS :: RESULT: PASS :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: kmod_modinfo :: kmod_modinfo :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: [ 20:07:26 ] :: [ BEGIN ] :: Running 'modinfo -l udp_tunnel' GPL :: [ 20:07:26 ] :: [ PASS ] :: Command 'modinfo -l udp_tunnel' (Expected 0, got 0) :: [ 20:07:26 ] :: [ PASS ] :: Command 'modinfo -l udp_tunnel' (Expected 0, got 0) :: [ 20:07:26 ] :: [ BEGIN ] :: Running 'modinfo -l lib80211' GPL :: [ 20:07:26 ] :: [ PASS ] :: Command 'modinfo -l lib80211' (Expected 0, got 0) :: [ 20:07:26 ] :: [ PASS ] :: Command 'modinfo -l lib80211' (Expected 0, got 0) :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: Duration: 0s :: Duration: 0s :: Assertions: 2 good, 0 bad :: Assertions: 2 good, 0 bad :: RESULT: PASS :: RESULT: PASS :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: Duration: 0s :: Duration: 0s :: Assertions: 12 good, 0 bad :: Assertions: 12 good, 0 bad :: RESULT: PASS :: RESULT: PASS gre 16384 0 uwb 90112 0 :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: Modprobe with wrong parameter :: Modprobe with wrong parameter :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: [ 20:07:26 ] :: [ BEGIN ] :: Running 'modprobe atm BADPARAM=this_should_fail' :: [ 20:07:26 ] :: [ LOG ] :: Output of 'modprobe atm BADPARAM=this_should_fail': :: [ 20:07:26 ] :: [ LOG ] :: Output of 'modprobe atm BADPARAM=this_should_fail': :: [ 20:07:26 ] :: [ LOG ] :: --------------- OUTPUT START --------------- :: [ 20:07:26 ] :: [ LOG ] :: --------------- OUTPUT START --------------- :: [ 20:07:26 ] :: [ LOG ] :: --------------- OUTPUT END --------------- :: [ 20:07:26 ] :: [ LOG ] :: --------------- OUTPUT END --------------- :: [ 20:07:26 ] :: [ PASS ] :: Command 'modprobe atm BADPARAM=this_should_fail' (Expected 0-1, got 0) :: [ 20:07:26 ] :: [ PASS ] :: Command 'modprobe atm BADPARAM=this_should_fail' (Expected 0-1, got 0) :: [ 20:07:26 ] :: [ BEGIN ] :: Running 'dmesg | grep -i 'Unknown parameter' | grep 'BADPARAM' | grep 'atm'' [17881.492103] atm: unknown parameter 'BADPARAM' ignored :: [ 20:07:26 ] :: [ LOG ] :: Output of 'dmesg | grep -i 'Unknown parameter' | grep 'BADPARAM' | grep 'atm'': :: [ 20:07:26 ] :: [ LOG ] :: Output of 'dmesg | grep -i 'Unknown parameter' | grep 'BADPARAM' | grep 'atm'': :: [ 20:07:26 ] :: [ LOG ] :: --------------- OUTPUT START --------------- :: [ 20:07:26 ] :: [ LOG ] :: --------------- OUTPUT START --------------- :: [ 20:07:26 ] :: [ LOG ] :: [17881.492103] atm: unknown parameter 'BADPARAM' ignored :: [ 20:07:26 ] :: [ LOG ] :: [17881.492103] atm: unknown parameter 'BADPARAM' ignored :: [ 20:07:26 ] :: [ LOG ] :: --------------- OUTPUT END --------------- :: [ 20:07:26 ] :: [ LOG ] :: --------------- OUTPUT END --------------- :: [ 20:07:26 ] :: [ PASS ] :: Command 'dmesg | grep -i 'Unknown parameter' | grep 'BADPARAM' | grep 'atm'' (Expected 0, got 0) :: [ 20:07:26 ] :: [ PASS ] :: Command 'dmesg | grep -i 'Unknown parameter' | grep 'BADPARAM' | grep 'atm'' (Expected 0, got 0) :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: Duration: 0s :: Duration: 0s :: Assertions: 2 good, 0 bad :: Assertions: 2 good, 0 bad :: RESULT: PASS :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: Test :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: kmod_load_insmod :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: [ 20:07:26 ] :: [ PASS ] :: Command 'insmod /usr/lib/modules/4.16.15-300.fc28.x86_64///kernel/net/ipv4/udp_tunnel.ko.xz' (Expected 0, got 0) :: [ 20:07:26 ] :: [ PASS ] :: Command 'lsmod | grep udp_tunnel' (Expected 0, got 0) :: [ 20:07:26 ] :: [ PASS ] :: Command 'rmmod udp_tunnel' (Expected 0, got 0) :: [ 20:07:26 ] :: [ PASS ] :: Command 'lsmod | grep udp_tunnel' (Expected 1-255, got 1) :: [ 20:07:26 ] :: [ PASS ] :: Command 'insmod /usr/lib/modules/4.16.15-300.fc28.x86_64///kernel/net/wireless/lib80211.ko.xz' (Expected 0, got 0) :: [ 20:07:26 ] :: [ PASS ] :: Command 'lsmod | grep lib80211' (Expected 0, got 0) :: [ 20:07:26 ] :: [ PASS ] :: Command 'rmmod lib80211' (Expected 0, got 0) :: [ 20:07:26 ] :: [ PASS ] :: Command 'lsmod | grep lib80211' (Expected 1-255, got 1) :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: Duration: 0s :: Assertions: 8 good, 0 bad :: RESULT: PASS :: [ 20:07:26 ] :: [ PASS ] :: Command 'modprobe tun' (Expected 0, got 0) :: [ 20:07:26 ] :: [ PASS ] :: Command 'modprobe -r tun' (Expected 0, got 0) :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: Duration: 0s :: Assertions: 2 good, 0 bad :: RESULT: PASS :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: kmod_modinfo :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: [ 20:07:26 ] :: [ PASS ] :: Command 'modinfo -l udp_tunnel' (Expected 0, got 0) :: [ 20:07:26 ] :: [ PASS ] :: Command 'modinfo -l lib80211' (Expected 0, got 0) :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: Duration: 0s :: Assertions: 2 good, 0 bad :: RESULT: PASS :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: Duration: 0s :: Assertions: 12 good, 0 bad :: RESULT: PASS :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: Modprobe with wrong parameter :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: [ 20:07:26 ] :: [ LOG ] :: Output of 'modprobe atm BADPARAM=this_should_fail': :: [ 20:07:26 ] :: [ LOG ] :: --------------- OUTPUT START --------------- :: [ 20:07:26 ] :: [ LOG ] :: --------------- OUTPUT END --------------- :: [ 20:07:26 ] :: [ PASS ] :: Command 'modprobe atm BADPARAM=this_should_fail' (Expected 0-1, got 0) :: [ 20:07:26 ] :: [ LOG ] :: Output of 'dmesg | grep -i 'Unknown parameter' | grep 'BADPARAM' | grep 'atm'': :: [ 20:07:26 ] :: [ LOG ] :: --------------- OUTPUT START --------------- :: [ 20:07:26 ] :: [ LOG ] :: [17881.492103] atm: unknown parameter 'BADPARAM' ignored :: [ 20:07:26 ] :: [ LOG ] :: --------------- OUTPUT END --------------- :: [ 20:07:26 ] :: [ PASS ] :: Command 'dmesg | grep -i 'Unknown parameter' | grep 'BADPARAM' | grep 'atm'' (Expected 0, got 0) :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: ```
135 lines
3.9 KiB
Bash
Executable File
135 lines
3.9 KiB
Bash
Executable File
#!/bin/bash
|
|
# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
|
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
#
|
|
# runtest.sh of kmod/sanity
|
|
# Description: Checking the basic function of kmod
|
|
# Author: Shaohui Deng <shdeng@redhat.com>
|
|
# Author: Chunyu Hu <chuhu@redhat.com>
|
|
# Update: Ziqian SUN <zsun@redhat.com>
|
|
#
|
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
#
|
|
# Copyright (c) 2015 Red Hat, Inc.
|
|
#
|
|
# This program is free software: you can redistribute it and/or
|
|
# modify it under the terms of the GNU General Public License as
|
|
# published by the Free Software Foundation, either version 2 of
|
|
# the License, or (at your option) any later version.
|
|
#
|
|
# This program is distributed in the hope that it will be
|
|
# useful, but WITHOUT ANY WARRANTY; without even the implied
|
|
# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
|
# PURPOSE. See the GNU General Public License for more details.
|
|
#
|
|
# You should have received a copy of the GNU General Public License
|
|
# along with this program. If not, see http://www.gnu.org/licenses/.
|
|
#
|
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
# Include Beaker environment
|
|
. /usr/share/beakerlib/beakerlib.sh || exit 1
|
|
. lib.sh
|
|
|
|
PACKAGE="kmod"
|
|
if [ -z $TESTARGS ]; then
|
|
export TESTARGS=$(rpm -q --queryformat '%{version}-%{release}\n' -qf /boot/config-$(uname -r))
|
|
fi
|
|
name=kernel
|
|
version=$(echo $TESTARGS | awk 'BEGIN {FS="-"} {print $1 }')
|
|
release=$(echo $TESTARGS | awk 'BEGIN {FS="-"} {print $2 }')
|
|
DEBUG=0
|
|
result=FAIL
|
|
FAIL=0
|
|
PASS=0
|
|
arch=`uname -m`
|
|
|
|
export TESTS=${TESTS:-kmod_load_insmod kmod_load_modprobe kmod_modinfo}
|
|
|
|
# Functions
|
|
function kmod_load_insmod()
|
|
{
|
|
local m
|
|
for m in ${existed_unloaded}; do
|
|
#local m_name=$(basename ${m//.ko}) won't work for compressed kmod
|
|
local m_name=$(basename ${m} | sed "s/.ko//;s/.xz//;s/.gz//")
|
|
rlRun "insmod $mod_path/$m"
|
|
rlRun "lsmod | grep ${m_name}"
|
|
rlRun "rmmod ${m_name}"
|
|
rlRun "lsmod | grep ${m_name}" 1-255
|
|
done
|
|
}
|
|
|
|
function kmod_load_modprobe()
|
|
{
|
|
rlRun "modprobe tun"
|
|
rlRun "modprobe -r tun"
|
|
}
|
|
|
|
function kmod_modinfo()
|
|
{
|
|
for m in ${existed_unloaded}; do
|
|
local m_name=$(basename ${m} | sed "s/.ko//;s/.xz//;s/.gz//")
|
|
rlRun "modinfo -l $m_name"
|
|
done
|
|
}
|
|
|
|
RunKmod() {
|
|
local tests
|
|
for tests in $@; do
|
|
rlPhaseStartTest $tests
|
|
case $tests in
|
|
load_unload_kernel_modules)
|
|
load_unload_kernl_modules_func
|
|
;;
|
|
load_unload_compressed_kernel_modules)
|
|
load_unload_compressed_kernel_module_func
|
|
;;
|
|
*)
|
|
$tests
|
|
;;
|
|
esac
|
|
rlPhaseEnd
|
|
done
|
|
}
|
|
|
|
rlJournalStart
|
|
rlPhaseStartSetup
|
|
mod_list="/kernel/net/ipv4/udp_tunnel.ko /kernel/net/wireless/lib80211.ko /kernel/net/wireless/ath/ath9k/ath9k.ko /kernel/net/ipv4/udp_tunnel.ko.xz /kernel/net/wireless/lib80211.ko.xz /kernel/net/wireless/ath/ath9k/ath9k.ko.xz"
|
|
if [[ -L /lib && -d /lib ]]; then
|
|
mod_path=/usr/lib/modules/`uname -r`/
|
|
else
|
|
mod_path=/lib/modules/`uname -r`/
|
|
fi
|
|
existed_unloaded=""
|
|
local m
|
|
for m in ${mod_list}; do
|
|
test -f $mod_path/$m && existed_unloaded+="$m "
|
|
done
|
|
[ -z "$existed_unloaded" ] && rlDie "There is no right module path to use : $mod_list"
|
|
rlPhaseEnd
|
|
|
|
rlPhaseStartTest
|
|
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'"
|
|
rlPhaseEnd
|
|
|
|
rlPhaseStartCleanup
|
|
rlPhaseEnd
|
|
|
|
rlJournalPrintText
|
|
rlJournalEnd
|