From: Nicolas Pitre Date: Thu, 04 Feb 2010 03:48:26 GMT Subject: [PATCH 1/3] fix multiple issues with t5300 Message-ID: <1265255308-20514-1-git-send-email-nico@fluxnic.net> First of all, trying to run 'git verify-pack' on packs produced by the tests using pack.packSizeLimit always failed. After lots of digging and head scratching, it turns out that the preceeding test simulating a SHA1 collision did leave the repository quite confused, impacting subsequent tests. So let's move that destructive test last, and add tests to run verify-pack on the output from those packSizeLimit tests to catch such goofage. Finally, group those packSizeLimit tests together. Signed-off-by: Nicolas Pitre --- t/t5300-pack-object.sh | 54 ++++++++++++++++++++++++++++++----------------- 1 files changed, 34 insertions(+), 20 deletions(-) diff --git a/t/t5300-pack-object.sh b/t/t5300-pack-object.sh index e2aa254..ac81114 100755 --- a/t/t5300-pack-object.sh +++ b/t/t5300-pack-object.sh @@ -280,26 +280,8 @@ test_expect_success \ :' -test_expect_success \ - 'fake a SHA1 hash collision' \ - 'test -f .git/objects/c8/2de19312b6c3695c0c18f70709a6c535682a67 && - cp -f .git/objects/9d/235ed07cd19811a6ceb342de82f190e49c9f68 \ - .git/objects/c8/2de19312b6c3695c0c18f70709a6c535682a67' - -test_expect_success \ - 'make sure index-pack detects the SHA1 collision' \ - 'test_must_fail git index-pack -o bad.idx test-3.pack 2>msg && - grep "SHA1 COLLISION FOUND" msg' - -test_expect_success \ - 'honor pack.packSizeLimit' \ - 'git config pack.packSizeLimit 200 && - packname_4=$(git pack-objects test-4 msg && + grep "SHA1 COLLISION FOUND" msg' + test_done -- 1.7.0.rc1.149.g0b0b7