git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] t5300: improve SHA1 collision test

From
Nicolas Pitre <nico@cam.org>
Date
Sep 2, 2008, 14:22 UTC
Message-ID
<1220365342-21308-3-git-send-email-nico@cam.org>
In-Reply-To
<1220365342-21308-2-git-send-email-nico@cam.org>

Make sure the reason for the command failure is actually due to the detection of SHA1 collision.

Signed-off-by: Nicolas Pitre <nico@cam.org>
---
 t/t5300-pack-object.sh |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/t/t5300-pack-object.sh b/t/t5300-pack-object.sh
index 83abe5f..8a8b0f1 100755
--- a/t/t5300-pack-object.sh
+++ b/t/t5300-pack-object.sh
@@ -272,7 +272,8 @@ test_expect_success \
 
 test_expect_success \
     'make sure index-pack detects the SHA1 collision' \
-    'test_must_fail git-index-pack -o bad.idx test-3.pack'
+    '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' \
-- 
1.6.0.1.276.g59b81
Previous: Nicolas Pitre
Message 3 of 3 in “sha1write: don't copy full sized buffers”
  1. sha1write: don't copy full sized buffersNicolas Pitre, Sep 2, 2008
  2. pack-objects: don't include missing preferred base objectsNicolas Pitre, Sep 2, 2008
  3. t5300: improve SHA1 collision testNicolas Pitre, Sep 2, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.