All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Nguyễn Thái Ngọc Duy" <pclouds@gmail.com>
To: Nicolas Pitre <nico@fluxnic.net>
Cc: git@vger.kernel.org, "Nguyễn Thái Ngọc Duy" <pclouds@gmail.com>
Subject: [PATCH 14/17] t5302: disable sealth corruption tests when run with --packv4
Date: Sat, 21 Sep 2013 20:58:00 +0700	[thread overview]
Message-ID: <1379771883-10278-15-git-send-email-pclouds@gmail.com> (raw)
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 <pclouds@gmail.com>
---
 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 <obj-list) &&
      test -f "test-4-${pack1}.pack"'
 
-test_expect_success \
+test_expect_success !PACKV4 \
     '[index v1] 6) newly created pack is BAD !' \
     'test_must_fail git verify-pack -v "test-4-${pack1}.pack"'
 
-test_expect_success \
+test_expect_success !PACKV4 \
     '[index v2] 1) stream pack to repository' \
     'rm -f .git/objects/pack/* &&
      git index-pack --index-version=2 --stdin < "test-1-${pack1}.pack" &&
@@ -189,7 +189,7 @@ test_expect_success \
      cmp "test-1-${pack1}.pack" ".git/objects/pack/pack-${pack1}.pack" &&
      cmp "test-2-${pack1}.idx"  ".git/objects/pack/pack-${pack1}.idx"'
 
-test_expect_success \
+test_expect_success !PACKV4 \
     '[index v2] 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
@@ -204,20 +204,20 @@ test_expect_success \
         bs=1 count=20 conv=notrunc &&
      git cat-file blob $sha1_101 > 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 <obj-list &&
      test_must_fail git pack-objects --no-reuse-object test-6 <obj-list'
 
-test_expect_success \
+test_expect_success !PACKV4 \
     '[index v2] 6) verify-pack detects CRC mismatch' \
     'rm -f .git/objects/pack/* &&
      git index-pack --index-version=2 --stdin < "test-1-${pack1}.pack" &&
-- 
1.8.2.83.gc99314b

  parent reply	other threads:[~2013-09-21 13:56 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-21 13:57 [PATCH 00/17] np/pack-v4 updates Nguyễn Thái Ngọc Duy
2013-09-21 13:57 ` [PATCH 01/17] fixup! index-pack: record all delta bases in v4 (tree and ref-delta) Nguyễn Thái Ngọc Duy
2013-09-21 13:57 ` [PATCH 02/17] fixup! packv4-parse.c: add tree offset caching Nguyễn Thái Ngọc Duy
2013-09-21 13:57 ` [PATCH 03/17] fixup! pack-objects: support writing pack v4 Nguyễn Thái Ngọc Duy
2013-09-21 13:57 ` [PATCH 04/17] fixup! pack-objects: recognize v4 as pack source Nguyễn Thái Ngọc Duy
2013-09-21 13:57 ` [PATCH 05/17] fixup! index-pack: support completing thin packs v4 Nguyễn Thái Ngọc Duy
2013-09-21 13:57 ` [PATCH 06/17] fixup! pack v4: move packv4-create.c to libgit.a Nguyễn Thái Ngọc Duy
2013-09-21 13:57 ` [PATCH 07/17] fixup! index-pack, pack-objects: allow creating .idx v2 with .pack v4 Nguyễn Thái Ngọc Duy
2013-09-22  1:39   ` Nicolas Pitre
2013-09-21 13:57 ` [PATCH 08/17] fixup! pack v4: code to obtain a SHA1 from a sha1ref Nguyễn Thái Ngọc Duy
2013-09-21 13:57 ` [PATCH 09/17] fixup! pack-objects: add --version to specify written pack version Nguyễn Thái Ngọc Duy
2013-09-21 13:57 ` [PATCH 10/17] test-lib.sh: add --packv4 for running the tests with pack v4 as default Nguyễn Thái Ngọc Duy
2013-09-21 13:57 ` [PATCH 11/17] packv4-parse: accept ref-delta as base of pv4-tree Nguyễn Thái Ngọc Duy
2013-09-21 13:57 ` [PATCH 12/17] pack-objects: do not add type OBJ_NONE to objects[] in pack v4 Nguyễn Thái Ngọc Duy
2013-09-21 13:57 ` [PATCH 13/17] index-pack: encode appended trees using v4 format " Nguyễn Thái Ngọc Duy
2013-09-21 13:58 ` Nguyễn Thái Ngọc Duy [this message]
2013-09-22  2:13   ` [PATCH 14/17] t5302: disable sealth corruption tests when run with --packv4 Eric Sunshine
2013-09-21 13:58 ` [PATCH 15/17] t5300: avoid testing ofs-delta " Nguyễn Thái Ngọc Duy
2013-09-21 16:46   ` Nicolas Pitre
2013-09-22  1:48     ` Duy Nguyen
2013-09-22  2:13       ` Nicolas Pitre
2013-09-21 13:58 ` [PATCH 16/17] pack-objects: disable pack size limit feature on pack v4 Nguyễn Thái Ngọc Duy
2013-09-21 13:58 ` [PATCH 17/17] t5303: adapt the tests to run with --packv4 Nguyễn Thái Ngọc Duy
2013-09-21 16:07 ` [PATCH 00/17] np/pack-v4 updates Nicolas Pitre
2013-10-15 21:45   ` Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1379771883-10278-15-git-send-email-pclouds@gmail.com \
    --to=pclouds@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=nico@fluxnic.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.