]> git.ipfire.org Git - thirdparty/mdadm.git/blobdiff - test
Assemble: free resources in load_devices
[thirdparty/mdadm.git] / test
diff --git a/test b/test
index 4ddef382421f795470b73e4f1eb0ea468b2e0795..711a3c7a2076d100ad908543a8b4935fa6882f56 100755 (executable)
--- a/test
+++ b/test
@@ -5,7 +5,7 @@ mdadm=$PWD/mdadm
 targetdir="/var/tmp"
 logdir="$targetdir"
 config=/tmp/mdadm.conf
-testdir=
+testdir=$PWD/tests
 devlist=
 
 savelogs=0
@@ -82,11 +82,9 @@ do_test() {
        if [ -f "$_script" ]
        then
                rm -f $targetdir/stderr
-               # stop all arrays, just incase some script left an array active.
-               $mdadm -Ssq 2> /dev/null
-               mdadm --zero $devlist 2> /dev/null
                # this might have been reset: restore the default.
                echo 2000 > /proc/sys/dev/raid/speed_limit_max
+               do_clean
                # source script in a subshell, so it has access to our
                # namespace, but cannot change it.
                echo -ne "$_script... "
@@ -183,7 +181,7 @@ parse_args() {
                                TESTLIST=($(ls $testdir | grep "linear"))
                                ;;
                        raid1 )
-                               TESTLIST=($(ls $testdir | grep "[0-9][0-9]r1\|raid1" | grep -vi raid10))
+                               TESTLIST=($(ls $testdir | grep "[0-9][0-9]r1\|raid1" | grep -vi "r10\|raid10"))
                                ;;
                        raid456 )
                                TESTLIST=($(ls $testdir | grep "[0-9][0-9]r[4-6]\|raid[4-6]"))