master - tests: fix pvcreate-operation-md test to properly clean up devs before their reuse
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=1ced5562cddb38b0eda1be1e1657b5eee2500f37 Commit: 1ced5562cddb38b0eda1be1e1657b5eee2500f37 Parent: 993c988895c2bdac1867b79ef1de5c14cdd4072d Author: Peter Rajnoha <[email protected]> AuthorDate: Fri Feb 13 14:53:26 2015 +0100 Committer: Peter Rajnoha <[email protected]> CommitterDate: Fri Feb 13 14:53:26 2015 +0100
tests: fix pvcreate-operation-md test to properly clean up devs before their reuse
pvcreate filters out devices with existing partitions defined on them, we need to properly clean up the devs before we reuse them.
--- test/shell/pvcreate-operation-md.sh | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-)
test/shell/pvcreate-operation-md.sh +5 -1
@@ -132,9 +132,13 @@ EOF fi fi +# make sure we're clean for another test +test -b "$mddev" && cleanup_md +dd if=/dev/zero of="$dev1" bs=512 count=1 +dd if=/dev/zero of="$dev2" bs=512 count=1 + # Test newer topology-aware alignment detection w/ --dataalignment override if kernel_at_least 2 6 33 ; then - cleanup_md pvcreate -f "$dev1" pvcreate -f "$dev2"