]> sourceware.org Git - lvm2.git/commitdiff
The following tests in the testsuite have race conditions:
authorJonathan Earl Brassow <jbrassow@redhat.com>
Thu, 22 Apr 2010 15:39:40 +0000 (15:39 +0000)
committerJonathan Earl Brassow <jbrassow@redhat.com>
Thu, 22 Apr 2010 15:39:40 +0000 (15:39 +0000)
1) Test that the primary mirror image cannot be removed while
   the mirror set is sync'ing.
2) Test that you cannot start a second mirror up-convert while
   one is already in progress.

The trouble is that if the sync/conversion finishes before the
tests occur, the tests will fail by why of success where there
should have been failure.  This means the sync/conversion must
happen very quickly, but this is possible because the test
mirrors we are creating are so small.

In order to decrease the likelyhood of these test failing (or
more correctly, failing to test the right thing), I've increase
the size of the mirrors.  It will still be remotely possible that
the tests will fail (by way of failing to test the right thing).
If this continues to happen, more involved mechanisms will need
to be put in place.  (Perhaps these will still be created, but
this change should be a remedy until that time.)

test/t-lvconvert-mirror.sh
test/t-mirror-lvconvert.sh

index ed60cc2a5bbbfb54c11a48c153ba208b4edfd772..cb555ea2212d90c50218e1be9c67282d1db6739c 100644 (file)
@@ -10,7 +10,7 @@
 # Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 
 . ./test-utils.sh
-aux prepare_vg 5 80
+aux prepare_vg 5 200
 
 # convert from linear to 2-way mirror
 lvcreate -l2 -n $lv1 $vg $dev1
@@ -65,7 +65,7 @@ lvremove -ff $vg
 # Test pulling primary image before mirror in-sync (should fail)
 # Test pulling primary image after mirror in-sync (should work)
 # Test that the correct devices remain in the mirror
-lvcreate -l8 -m2 -n $lv1 $vg $dev1 $dev2 $dev4 $dev3:0-1
+lvcreate -l20 -m2 -n $lv1 $vg $dev1 $dev2 $dev4 $dev3:0
 # FIXME:
 #  This is somewhat timing dependent - sync /could/ finish before
 #  we get a chance to have this command fail
index 2df1931556a36c986007ab4f6725a1f06e0f0a77..e6782dd49a1dccaa428b5d69d85d6f53eda391e6 100755 (executable)
@@ -112,7 +112,7 @@ check_no_tmplvs_()
   ! grep tmp out
 }
 
-aux prepare_vg 5
+aux prepare_vg 5 200
 
 # ---------------------------------------------------------------------
 # Common environment setup/cleanup for each sub testcases
@@ -155,7 +155,7 @@ check_and_cleanup_lvs_
 # add 1 mirror
 prepare_lvs_
 lvs -a -o+devices $vg
-lvcreate -l5 -m1 -n $lv1 $vg $dev1 $dev2 $dev3:0
+lvcreate -l15 -m1 -n $lv1 $vg $dev1 $dev2 $dev3:0
 lvs -a -o+devices $vg
 check_mirror_count_ $vg/$lv1 2
 check_mirror_log_ $vg/$lv1
This page took 0.02959 seconds and 5 git commands to generate.