]> arthur.barton.de Git - bup.git/commitdiff
test.sh: don't try non-quick fsck on damaged repositories.
authorAvery Pennarun <apenwarr@gmail.com>
Mon, 8 Feb 2010 18:49:17 +0000 (13:49 -0500)
committerAvery Pennarun <apenwarr@gmail.com>
Mon, 8 Feb 2010 18:49:17 +0000 (13:49 -0500)
It turns out that older versions of git (1.5.x or so) have a git-verify-pack
that goes into an endless loop when it hits certain kinds of corruption, and
our test would trigger it almost every time.  Using --quick avoids calling
git-verify-pack, so it won't exhibit the problem.

Unfortunately this means a slightly less thorough test of non-quick
bup-fsck, but it'll have to do.  Better than failing tests nonstop, anyway.

Reported by Eduardo Kienetz.

t/test.sh

index 7c5cd31a952c7df8747bc9118fb5e5ddb048123c..0f512a33c9d22c4739130ed6e8e7b2417519335f 100755 (executable)
--- a/t/test.sh
+++ b/t/test.sh
@@ -123,6 +123,7 @@ WVSTART "save/git-fsck"
 
 WVSTART "fsck"
 WVPASS bup fsck
+WVPASS bup fsck --quick
 if bup fsck --par2-ok; then
     WVSTART "fsck (par2)"
 else
@@ -131,14 +132,14 @@ fi
 WVPASS bup fsck -g
 WVPASS bup fsck -r
 WVPASS bup damage $BUP_DIR/objects/pack/*.pack -n10 -s1 -S0
-WVFAIL bup fsck
-WVFAIL bup fsck --disable-par2
+WVFAIL bup fsck --quick
+WVFAIL bup fsck --quick --disable-par2
 chmod u+w $BUP_DIR/objects/pack/*.idx
 WVPASS bup damage $BUP_DIR/objects/pack/*.idx -n10 -s1 -S0
-WVFAIL bup fsck -j4
+WVFAIL bup fsck --quick -j4
 WVPASS bup damage $BUP_DIR/objects/pack/*.pack -n10 -s1024 --percent 0.4 -S0
-WVFAIL bup fsck
-WVFAIL bup fsck -rvv -j99   # fails because repairs were needed
+WVFAIL bup fsck --quick
+WVFAIL bup fsck --quick -rvv -j99   # fails because repairs were needed
 if bup fsck --par2-ok; then
     WVPASS bup fsck -r # ok because of repairs from last time
     WVPASS bup damage $BUP_DIR/objects/pack/*.pack -n201 -s1 --equal -S0
@@ -146,5 +147,5 @@ if bup fsck --par2-ok; then
     WVFAIL bup fsck -rvv   # too many errors to be repairable
     WVFAIL bup fsck -r   # too many errors to be repairable
 else
-    WVFAIL bup fsck -r # still fails because par2 was missing
+    WVFAIL bup fsck --quick -r # still fails because par2 was missing
 fi