]> sourceware.org Git - lvm2.git/commitdiff
- fix environment variable prefix to LVM (this is not GIT:-)
authorMilan Broz <mbroz@redhat.com>
Thu, 28 Aug 2008 10:07:34 +0000 (10:07 +0000)
committerMilan Broz <mbroz@redhat.com>
Thu, 28 Aug 2008 10:07:34 +0000 (10:07 +0000)
- add lvcreate rejects repeated invocation test
- fix pvs metadata test for partial failure test
- add pvchange reject --addtag to lvm1 pv test

(All fixes by Jaroslav Stava)

test/Makefile.in
test/t-lvcreate-usage.sh
test/t-pvchange-usage.sh
test/t-pvcreate-operation.sh

index b51ce75a7bc28677909adce4d87287a07a75a2a8..018c4e8dc5dcf2a43530d786b3e61a35fce0558f 100644 (file)
@@ -48,7 +48,7 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 
 $(T): init.sh
        @echo "*** $@ ***"; '$(SHELL_PATH_SQ)' \
-         $(TESTS_ENVIRONMENT) $@ $(GIT_TEST_OPTS)
+         $(TESTS_ENVIRONMENT) $@ $(LVM_TEST_OPTS)
 
 .bin-dir-stamp: lvm-wrapper
        rm -rf bin
index e6f5b52f082dc9921a03d13d608d32c7f0c0295d..4dd0b7dc416f46806ab9b521872c1c1775d00a04 100755 (executable)
@@ -36,6 +36,15 @@ test_expect_success \
 
 lv=lvcreate-usage-$$
 
+test_expect_success \
+  "lvcreate rejects repeated invocation (run 2 times)" '
+   lvcreate -n $lv -l 4 $vg && 
+   { lvcreate -n $lv -l 4 $vg;
+     status=$?; echo status=$status; test $status = 5 &&
+     lvremove -ff $vg/$lv
+   }
+'
+
 test_expect_success \
   'lvcreate rejects a negative stripe_size' \
   'lvcreate -L 64M -n $lv -i2 --stripesize -4 $vg 2>err;
index b5ce96057d59a8cd185ae705e9ca8e8f15001faf..717b200d7c130f63245a8194b58a7e82b090a4ad 100755 (executable)
@@ -50,7 +50,7 @@ test_expect_success \
 '
 
 test_expect_success \
-  "vgchange disable/enable allocation for pvs with metadatacopies = $mda" '
+  "vgchange disable/enable allocation for pvs with metadatacopies = $mda (bz452982)" '
    pvchange $d1 -x n &&
    check_pv_field_ $d1 pv_attr  --  &&
    pvchange $d1 -x y &&
@@ -77,10 +77,11 @@ test_expect_success \
   "pvchange rejects uuid change under an active lv" '
    lvcreate -l 16 -i 2 -n $lv --alloc anywhere $vg1 &&
    vg_validate_pvlv_counts_ $vg1 2 1 0 &&
-   pvchange -u $d1;
-   status=$?; echo status=$status; test $status = 5 &&
-   lvchange -an "$vg1"/"$lv" &&
-   pvchange -u $d1
+   { pvchange -u $d1;
+     status=$?; echo status=$status; test $status = 5 &&
+     lvchange -an "$vg1"/"$lv" &&
+     pvchange -u $d1
+   }
 '
 
 test_expect_success \
@@ -89,6 +90,14 @@ test_expect_success \
    vgremove $vg1
 '
 
+test_expect_success \
+  "pvchange reject --addtag to lvm1 pv" '
+   pvcreate -M1 $d1 &&
+   { pvchange $d1 --addtag test;
+     status=$?; echo status=$status; test $status != 0
+   }
+'
+
 test_done
 # Local Variables:
 # indent-tabs-mode: nil
index a746ae7f8f651a320cab59ecbf651bff11a2161c..1ad4e2290e4d01994e0f626ee18c739e9c2bc9a9 100755 (executable)
@@ -33,6 +33,14 @@ test_expect_success \
 
 for mdatype in 1 2
 do
+
+test_expect_success \
+  "pvcreate (lvm$mdatype) succeeds when run repeatedly (pv not in a vg)" '
+   pvcreate -M$mdatype $d1 &&
+   pvcreate -M$mdatype $d1 &&
+   pvremove -f $d1
+'
+
 test_expect_success \
   "pvcreate (lvm$mdatype) fails when PV belongs to VG" \
   'pvcreate -M$mdatype $d1 &&
@@ -63,7 +71,6 @@ test_expect_success \
 #   mdadm --stop /dev/md0 &&
 #   pvcreate -ff -y -M$mdatype $d1 $d2 &&
 #   pvremove -f $d1 $d2'
-
 done
 
 test_expect_success \
This page took 0.043546 seconds and 5 git commands to generate.