[kernel-tests] 27/73: Add module check utility

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is an automated email from the git hooks/post-receive script.

jforbes pushed a commit to branch master
in repository kernel-tests.

commit 1291c93aeacfa3c8e3253c12c1248672af59e02b
Author: Justin M. Forbes <jforbes@xxxxxxxxxx>
Date:   Sun Jan 20 11:22:24 2013 -0600

    Add module check utility
---
 utils/mod-check.sh | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/utils/mod-check.sh b/utils/mod-check.sh
index 727569f..f706ee0 100644
--- a/utils/mod-check.sh
+++ b/utils/mod-check.sh
@@ -1,5 +1,20 @@
 #!/bin/bash
 
+# This function will check to see if a module is loaded. It is usefule
+# for tests which require specific modules or hardware.  If a module
+# is not loaded, the result should typically be a skip, not a failure.
+# Example usage in your runtest.sh:
+#
+# source ../../utils/mod-check.sh
+# module=foobar
+# check_mod
+# has_mod=$?
+# 
+# if [ "$has_mod" -ne "0" ]; then
+#         exit 3
+# fi
+
+
 check_mod() {
 	if [ $(lsmod | grep -wc $module ) -eq 0 ]
 	then

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.
_______________________________________________
kernel mailing list
kernel@xxxxxxxxxxxxxxxxxxxxxxx
https://lists.fedoraproject.org/admin/lists/kernel@xxxxxxxxxxxxxxxxxxxxxxx




[Index of Archives]     [Fedora General Discussion]     [Older Fedora Users Archive]     [Fedora Advisory Board]     [Fedora Security]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Mentors]     [Fedora Package Announce]     [Fedora Package Review]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Coolkey]     [Yum Users]     [Tux]     [Yosemite News]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [USB]     [Asterisk PBX]

  Powered by Linux