]> arthur.barton.de Git - bup.git/commitdiff
Add tests around the bloom ruin and check options
authorBrandon Low <lostlogic@lostlogicx.com>
Thu, 17 Feb 2011 04:09:47 +0000 (20:09 -0800)
committerAvery Pennarun <apenwarr@gmail.com>
Thu, 17 Feb 2011 09:09:54 +0000 (01:09 -0800)
This generally improves our test coverage of bloom filter behavior and
more specifically makes sure that check and ruin do something.

Signed-off-by: Brandon Low <lostlogic@lostlogicx.com>
t/test.sh

index 878dbb568cd670f8f471c2062ef956ae8afec330..c9474f064ee666d27535fd2844b2a8cf415cfa4e 100755 (executable)
--- a/t/test.sh
+++ b/t/test.sh
@@ -160,6 +160,17 @@ WVFAIL diff tags2t.tmp tags2tf.tmp
 wc -c t/testfile1 t/testfile2
 wc -l tags1.tmp tags2.tmp
 
+WVSTART "bloom"
+WVPASS bup bloom -c $(ls -1 $BUP_DIR/objects/pack/*.idx|head -n1)
+rm $BUP_DIR/objects/pack/bup.bloom
+WVPASS bup bloom -k 4
+WVPASS bup bloom -c $(ls -1 $BUP_DIR/objects/pack/*.idx|head -n1)
+WVPASS bup bloom -d buptest.tmp/objects/pack --ruin --force
+WVFAIL bup bloom -c $(ls -1 $BUP_DIR/objects/pack/*.idx|head -n1)
+WVPASS bup bloom --force -k 5
+WVPASS bup bloom -c $(ls -1 $BUP_DIR/objects/pack/*.idx|head -n1)
+
+WVSTART "memtest"
 WVPASS bup memtest -c1 -n100
 WVPASS bup memtest -c1 -n100 --existing