]> git.ipfire.org Git - thirdparty/mdadm.git/blobdiff - test
sysfs: avoid possible data corruption in sys_load.
[thirdparty/mdadm.git] / test
diff --git a/test b/test
index 3029b69395e57bcc0dfcba63c18263857beca048..f83e28fcb9d846659009604744f9759b9b907859 100644 (file)
--- a/test
+++ b/test
@@ -21,6 +21,8 @@ fi
 
 # assume md0, md1, md2 exist in /dev
 md0=/dev/md0 md1=/dev/md1 md2=/dev/md2
+mdp0=/dev/md_d0
+mdp1=/dev/md_d1
 
 # We test mdadm on loop-back block devices.
 # dir for storing files should be settable by command line maybe
@@ -28,6 +30,8 @@ targetdir=/var/tmp
 size=20000
 # super0, round down to multiple of 64 and substract 64
 mdsize0=19904
+# super00 is nested, subtract 128
+mdsize00=19840
 # super1.0 round down to multiple of 2, subtract 8
 mdsize1=19992
 # subtract another 4 for bitmaps
@@ -167,6 +171,8 @@ do
   if [ -f "$script" ]
   then
    rm -f $targetdir/stderr
+   # stop all arrays, just incase some script left an array active.
+   mdadm -Ssq
    # source script in a subshell, so it has access to our
    # namespace, but cannot change it.
    if ( set -ex ; . $script )  2> $targetdir/log