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 <jfor...@redhat.com>
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@lists.fedoraproject.org
https://lists.fedoraproject.org/admin/lists/kernel@lists.fedoraproject.org

Reply via email to