summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--func/minion/modules/mount.py7
-rwxr-xr-xtest/test-it.sh22
2 files changed, 28 insertions, 1 deletions
diff --git a/func/minion/modules/mount.py b/func/minion/modules/mount.py
index 02463e4..01e4eab 100644
--- a/func/minion/modules/mount.py
+++ b/func/minion/modules/mount.py
@@ -14,7 +14,7 @@
## Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
##
-import sub_process, os.path
+import sub_process, os
from modules import func_module
@@ -53,6 +53,11 @@ class MountModule(func_module.FuncModule):
cmdline.append(options)
cmdline.append(device)
cmdline.append(dir)
+ if createdir:
+ try:
+ os.makedirs(dir)
+ except:
+ return False
cmd = sub_process.Popen(cmdline, executable="/bin/mount", stdout=sub_process.PIPE, shell=False)
if cmd.wait() == 0:
return True
diff --git a/test/test-it.sh b/test/test-it.sh
index 76c3cf2..b2c8f72 100755
--- a/test/test-it.sh
+++ b/test/test-it.sh
@@ -171,6 +171,25 @@ sign_the_certmaster_certs()
}
+
+pound_on_the_threads()
+{
+ msg "Trying to poke at the threads a bit"
+ THREAD_COUNT=5
+ for i in $MINION_CERTS
+ do
+ for Q in `seq 1 $THREAD_COUNT`
+ do
+ # background these so they run more or less in parallel to
+ # each minion
+ echo "test add $Q 6" for $i
+ func $i call test add "$Q" "6" &
+ done
+ done
+
+
+}
+
# just some random "poke at func and make sure it works stuff"
test_funcd()
{
@@ -186,6 +205,7 @@ test_funcd()
func $i call test add "23" "45"
done
+
}
@@ -231,6 +251,8 @@ sign_the_certmaster_certs
test_funcd
+pound_on_the_threads
+
stop_the_func
# see if funcd is running
# see if certmaster is installed