]> git.ipfire.org Git - thirdparty/mdadm.git/commitdiff
test/00names: use appropriate mdadm.conf
authorNeilBrown <neilb@suse.de>
Mon, 24 Jun 2013 05:44:36 +0000 (15:44 +1000)
committerNeilBrown <neilb@suse.de>
Mon, 24 Jun 2013 05:48:40 +0000 (15:48 +1000)
Using non-numeric names needs an mdadm.conf setting,
so make sure we have one.

Signed-off-by: NeilBrown <neilb@suse.de>
mdadm.c
tests/00names

diff --git a/mdadm.c b/mdadm.c
index 3324a9b2db8d6b1fbec247ec7e334dc5d1e633fb..14005b3e25a70860f4bbbb695feb2a5282467e36 100644 (file)
--- a/mdadm.c
+++ b/mdadm.c
@@ -827,6 +827,7 @@ int main(int argc, char *argv[])
                case O(MISC, ConfigFile):
                case O(MONITOR,'c'):
                case O(MONITOR,ConfigFile):
+               case O(CREATE,ConfigFile):
                        if (configfile) {
                                pr_err("configfile cannot be set twice.  "
                                        "Second value is %s.\n", optarg);
index c6630e2bdd2cea4ce3eaab184d7d0f659fec5757..7a066d8fb2b76bf92c4c32e7007847b144d7cd1b 100644 (file)
@@ -1,10 +1,12 @@
 set -x -e
 
 # create arrays with non-numeric names
+conf=$targetdir/mdadm.conf
+echo "CREATE names=yes" > $conf
 
 for i in linear raid0 raid1 raid4 raid5 raid6
 do
-  mdadm -CR /dev/md/$i -l $i -n 4 $dev4 $dev3 $dev2 $dev1
+  mdadm -CR --config $conf /dev/md/$i -l $i -n 4 $dev4 $dev3 $dev2 $dev1
   check $i
   [ -d /sys/class/block/md_$i/md ]
   mdadm -S md_$i