[PATCH v2] t1404: mark directory/file conflict tests with REFFILES

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Han-Wen Nienhuys <hanwen@xxxxxxxxxx>

The files backend uses file system locking on individual refs, which means a
directory/file conflict can prevent locks being taken. For example, in a repo
with just the ref "foo", an update

    (DELETE "foo") + (ADD "foo/bar")

cannot be executed in the files backend, as one cannot take a lock on foo/bar.

The current reftable proof-of-concept integration supports these tranactions, as
the result is a repo with just "foo/bar", which has no directory/file conflict.

Signed-off-by: Han-Wen Nienhuys <hanwen@xxxxxxxxxx>
---
    t1404: mark directory/file conflict tests with REFFILES
    
    The files backend uses file system locking on individual refs, which
    means a directory/file conflict can prevent locks being taken. For
    example, in a repo with just the ref "foo", an update
    
    (DELETE "foo") + (ADD "foo/bar")
    
    
    cannot be executed in the files backend, as one cannot take a lock on
    foo/bar.
    
    The result is a repo with just "foo/bar", which has no directory/file
    conflict, and this is a valid transaction in reftable.
    
    Signed-off-by: Han-Wen Nienhuys hanwen@xxxxxxxxxx

Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-git-1148%2Fhanwen%2Ft1404-v2
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-git-1148/hanwen/t1404-v2
Pull-Request: https://github.com/git/git/pull/1148

Range-diff vs v1:

 1:  55d200a6a83 ! 1:  59e9ea188f5 t1404: mark directory/file conflict tests with REFFILES
     @@ Commit message
      
          cannot be executed in the files backend, as one cannot take a lock on foo/bar.
      
     -    The result is a repo with just "foo/bar", which has no directory/file conflict,
     -    and this is a valid transaction in reftable.
     +    The current reftable proof-of-concept integration supports these tranactions, as
     +    the result is a repo with just "foo/bar", which has no directory/file conflict.
      
          Signed-off-by: Han-Wen Nienhuys <hanwen@xxxxxxxxxx>
      
     @@ t/t1404-update-ref-errors.sh: test_expect_success REFFILES 'empty directory shou
       '
       
      -test_expect_success 'D/F conflict prevents add long + delete short' '
     -+test_expect_success REFFILES  'D/F conflict prevents add long + delete short' '
     ++test_expect_success REFFILES 'D/F conflict prevents add long + delete short' '
       	df_test refs/df-al-ds --add-del foo/bar foo
       '
       
     @@ t/t1404-update-ref-errors.sh: test_expect_success REFFILES 'empty directory shou
       '
       
      -test_expect_success 'D/F conflict prevents delete long + add short' '
     -+test_expect_success REFFILES  'D/F conflict prevents delete long + add short' '
     ++test_expect_success REFFILES 'D/F conflict prevents delete long + add short' '
       	df_test refs/df-dl-as --del-add foo/bar foo
       '
       
     @@ t/t1404-update-ref-errors.sh: test_expect_success REFFILES 'empty directory shou
       '
       
      -test_expect_success 'D/F conflict prevents indirect add long + indirect delete short' '
     -+test_expect_success REFFILES 'D/F conflict prevents indirect add long + delete short' '
     -+	df_test refs/df-ial-ds --sym-add --add-del foo/bar foo
     -+'
     -+
     -+test_expect_success REFFILES 'D/F conflict prevents indirect add long + delete short' '
     -+	df_test refs/df-ial-ds --sym-add --add-del foo/bar foo
     -+'
     -+
      +test_expect_success REFFILES 'D/F conflict prevents indirect add long + indirect delete short' '
       	df_test refs/df-ial-ids --sym-add --sym-del --add-del foo/bar foo
       '


 t/t1404-update-ref-errors.sh | 32 ++++++++++++++++----------------
 1 file changed, 16 insertions(+), 16 deletions(-)

diff --git a/t/t1404-update-ref-errors.sh b/t/t1404-update-ref-errors.sh
index b729c1f4803..13c2b43bbae 100755
--- a/t/t1404-update-ref-errors.sh
+++ b/t/t1404-update-ref-errors.sh
@@ -261,69 +261,69 @@ test_expect_success REFFILES 'empty directory should not fool 1-arg delete' '
 	git update-ref --stdin
 '
 
-test_expect_success 'D/F conflict prevents add long + delete short' '
+test_expect_success REFFILES 'D/F conflict prevents add long + delete short' '
 	df_test refs/df-al-ds --add-del foo/bar foo
 '
 
-test_expect_success 'D/F conflict prevents add short + delete long' '
+test_expect_success REFFILES 'D/F conflict prevents add short + delete long' '
 	df_test refs/df-as-dl --add-del foo foo/bar
 '
 
-test_expect_success 'D/F conflict prevents delete long + add short' '
+test_expect_success REFFILES 'D/F conflict prevents delete long + add short' '
 	df_test refs/df-dl-as --del-add foo/bar foo
 '
 
-test_expect_success 'D/F conflict prevents delete short + add long' '
+test_expect_success REFFILES 'D/F conflict prevents delete short + add long' '
 	df_test refs/df-ds-al --del-add foo foo/bar
 '
 
-test_expect_success 'D/F conflict prevents add long + delete short packed' '
+test_expect_success REFFILES 'D/F conflict prevents add long + delete short packed' '
 	df_test refs/df-al-dsp --pack --add-del foo/bar foo
 '
 
-test_expect_success 'D/F conflict prevents add short + delete long packed' '
+test_expect_success REFFILES 'D/F conflict prevents add short + delete long packed' '
 	df_test refs/df-as-dlp --pack --add-del foo foo/bar
 '
 
-test_expect_success 'D/F conflict prevents delete long packed + add short' '
+test_expect_success REFFILES 'D/F conflict prevents delete long packed + add short' '
 	df_test refs/df-dlp-as --pack --del-add foo/bar foo
 '
 
-test_expect_success 'D/F conflict prevents delete short packed + add long' '
+test_expect_success REFFILES 'D/F conflict prevents delete short packed + add long' '
 	df_test refs/df-dsp-al --pack --del-add foo foo/bar
 '
 
 # Try some combinations involving symbolic refs...
 
-test_expect_success 'D/F conflict prevents indirect add long + delete short' '
+test_expect_success REFFILES 'D/F conflict prevents indirect add long + delete short' '
 	df_test refs/df-ial-ds --sym-add --add-del foo/bar foo
 '
 
-test_expect_success 'D/F conflict prevents indirect add long + indirect delete short' '
+test_expect_success REFFILES 'D/F conflict prevents indirect add long + indirect delete short' '
 	df_test refs/df-ial-ids --sym-add --sym-del --add-del foo/bar foo
 '
 
-test_expect_success 'D/F conflict prevents indirect add short + indirect delete long' '
+test_expect_success REFFILES 'D/F conflict prevents indirect add short + indirect delete long' '
 	df_test refs/df-ias-idl --sym-add --sym-del --add-del foo foo/bar
 '
 
-test_expect_success 'D/F conflict prevents indirect delete long + indirect add short' '
+test_expect_success REFFILES 'D/F conflict prevents indirect delete long + indirect add short' '
 	df_test refs/df-idl-ias --sym-add --sym-del --del-add foo/bar foo
 '
 
-test_expect_success 'D/F conflict prevents indirect add long + delete short packed' '
+test_expect_success REFFILES 'D/F conflict prevents indirect add long + delete short packed' '
 	df_test refs/df-ial-dsp --sym-add --pack --add-del foo/bar foo
 '
 
-test_expect_success 'D/F conflict prevents indirect add long + indirect delete short packed' '
+test_expect_success REFFILES 'D/F conflict prevents indirect add long + indirect delete short packed' '
 	df_test refs/df-ial-idsp --sym-add --sym-del --pack --add-del foo/bar foo
 '
 
-test_expect_success 'D/F conflict prevents add long + indirect delete short packed' '
+test_expect_success REFFILES 'D/F conflict prevents add long + indirect delete short packed' '
 	df_test refs/df-al-idsp --sym-del --pack --add-del foo/bar foo
 '
 
-test_expect_success 'D/F conflict prevents indirect delete long packed + indirect add short' '
+test_expect_success REFFILES 'D/F conflict prevents indirect delete long packed + indirect add short' '
 	df_test refs/df-idlp-ias --sym-add --sym-del --pack --del-add foo/bar foo
 '
 

base-commit: 35151cf0720460a897cde9b8039af364743240e7
-- 
gitgitgadget



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux