Skip to contentSkip to conversation

LVM2/test t-pvcreate-operation-md.sh

PATCH [email protected] 3 participants 4 messages Sep 13, 2009 – Jan 19, 2010

lore
Share & tools
lore
#0 lore raw

CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: mbroz at sourceware.org 2009-09-13 19:28:00

Modified files:
test : t-pvcreate-operation-md.sh

Log message:
Do not run mdadm tests if MD module is not loaded.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/test/t-pvcreate-operation-md.sh.diff?cvsroot=lvm2&r1=1.1&r2=1.2

test/t-pvcreate-operation-md.sh +1 -0
@@ -14,6 +14,7 @@
 which perl || exit 200
 which awk || exit 200
 which cut || exit 200
+test -f /proc/mdstat || exit 200
 
 . ./test-utils.sh
 
#1 lore raw
Quoted 17 lines · mbroz at sourceware.org

CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: mbroz at sourceware.org 2009-09-13 19:28:00

Modified files:
test : t-pvcreate-operation-md.sh

Log message:
Do not run mdadm tests if MD module is not loaded.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/test/t-pvcreate-operation-md.sh.diff?cvsroot=lvm2&r1=1.1&r2=1.2

test/t-pvcreate-operation-md.sh line 20

Quoted 7 lines
test/t-pvcreate-operation-md.sh +1 -0
@@ -14,6 +14,7 @@
 which perl || exit 200
 which awk || exit 200
 which cut || exit 200
+test -f /proc/mdstat || exit 200
 
 . ./test-utils.sh
 

We might try loading the raid0 module if it isn't loaded (grep for raid0 in /proc/mdstat)? And if that fails skip this test?

#2 lore raw
Quoted 2 lines · Mike Snitzer

We might try loading the raid0 module if it isn't loaded (grep for raid0 in /proc/mdstat)? And if that fails skip this test?

I have intentionally all modules unloaded (and do not want sometimes run md tests), raid0 is loaded automatically, if md_mod is loaded (then /proc/mdstat exists).

If md_mod is not there, test fails. For most systems it is loaded in initrd anyway.

That was just quick hack, I think there is problem in mdadm, because it created some device node even if md module is not present - but I have no time to debug it now.

Milan

#3 lore raw
Quoted 6 lines · Milan Broz
Quoted 2 lines · Mike Snitzer

We might try loading the raid0 module if it isn't loaded (grep for raid0 in /proc/mdstat)? And if that fails skip this test?

I have intentionally all modules unloaded (and do not want sometimes run md tests), raid0 is loaded automatically, if md_mod is loaded (then /proc/mdstat exists).

md-mod doesn't provide the raid0 personality; raid0 does. I've changed the test to attempt loading raid0 if it isn't loaded.

Quoted 4 lines

If md_mod is not there, test fails. For most systems it is loaded in initrd anyway.

That was just quick hack, I think there is problem in mdadm, because it created some device node even if md module is not present - but I have no time to debug it now.

I'd be interested to know if you still have problems with the test. If so we should get to the bottom of it (maybe require a minimum mdadm version?).

t-pvcreate-operation-md.sh does provide needed testing of LVM2's MD support so it shouldn't be skipped.

Mike