]> git.ipfire.org Git - thirdparty/git.git/blob - t/t3008-ls-files-lazy-init-name-hash.sh
Merge branch 'hn/reftable' into hn/reftable-coverity-fixes
[thirdparty/git.git] / t / t3008-ls-files-lazy-init-name-hash.sh
1 #!/bin/sh
2
3 test_description='Test the lazy init name hash with various folder structures'
4
5 TEST_PASSES_SANITIZE_LEAK=true
6 . ./test-lib.sh
7
8 if test 1 -eq $(test-tool online-cpus)
9 then
10 skip_all='skipping lazy-init tests, single cpu'
11 test_done
12 fi
13
14 LAZY_THREAD_COST=2000
15
16 test_expect_success 'no buffer overflow in lazy_init_name_hash' '
17 (
18 test_seq $LAZY_THREAD_COST | sed "s/^/a_/" &&
19 echo b/b/b &&
20 test_seq $LAZY_THREAD_COST | sed "s/^/c_/" &&
21 test_seq 50 | sed "s/^/d_/" | tr "\n" "/" && echo d
22 ) |
23 sed "s/^/100644 $EMPTY_BLOB /" |
24 git update-index --index-info &&
25 test-tool lazy-init-name-hash -m
26 '
27
28 test_done