From: Nguyễn Thái Ngọc Duy Date: Sat, 21 Sep 2013 13:58:00 GMT Subject: [PATCH 14/17] t5302: disable sealth corruption tests when run with --packv4 Message-ID: <1379771883-10278-15-git-send-email-pclouds@gmail.com> In-Reply-To: <1379771883-10278-1-git-send-email-pclouds@gmail.com> These tests assume .pack v2 format and won't work with v4. New tests may be needed to do the same thing with v4 format. Signed-off-by: Nguyễn Thái Ngọc Duy --- t/t5302-pack-index.sh | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/t/t5302-pack-index.sh b/t/t5302-pack-index.sh index fe82025..2f99cd1 100755 --- a/t/t5302-pack-index.sh +++ b/t/t5302-pack-index.sh @@ -140,7 +140,7 @@ index_obj_offset() ( read offs extra && echo "$offs" ) } -test_expect_success \ +test_expect_success !PACKV4 \ '[index v1] 1) stream pack to repository' \ 'git index-pack --index-version=1 --stdin < "test-1-${pack1}.pack" && git prune-packed && @@ -148,7 +148,7 @@ test_expect_success \ cmp "test-1-${pack1}.pack" ".git/objects/pack/pack-${pack1}.pack" && cmp "test-1-${pack1}.idx" ".git/objects/pack/pack-${pack1}.idx"' -test_expect_success \ +test_expect_success !PACKV4 \ '[index v1] 2) create a stealth corruption in a delta base reference' \ '# This test assumes file_101 is a delta smaller than 16 bytes. # It should be against file_100 but we substitute its base for file_099 @@ -163,24 +163,24 @@ test_expect_success \ bs=1 count=20 conv=notrunc && git cat-file blob $sha1_101 > file_101_foo1' -test_expect_success \ +test_expect_success !PACKV4 \ '[index v1] 3) corrupted delta happily returned wrong data' \ 'test -f file_101_foo1 && ! cmp file_101 file_101_foo1' -test_expect_success \ +test_expect_success !PACKV4 \ '[index v1] 4) confirm that the pack is actually corrupted' \ 'test_must_fail git fsck --full $commit' -test_expect_success \ +test_expect_success !PACKV4 \ '[index v1] 5) pack-objects happily reuses corrupted data' \ 'pack4=$(git pack-objects test-4 file_101_foo2' -test_expect_success \ +test_expect_success !PACKV4 \ '[index v2] 3) corrupted delta happily returned wrong data' \ 'test -f file_101_foo2 && ! cmp file_101 file_101_foo2' -test_expect_success \ +test_expect_success !PACKV4 \ '[index v2] 4) confirm that the pack is actually corrupted' \ 'test_must_fail git fsck --full $commit' -test_expect_success \ +test_expect_success !PACKV4 \ '[index v2] 5) pack-objects refuses to reuse corrupted data' \ 'test_must_fail git pack-objects test-5