]> git.ipfire.org Git - thirdparty/git.git/blame - t/t3008-ls-files-lazy-init-name-hash.sh
path.c: don't call the match function without value in trie_find()
[thirdparty/git.git] / t / t3008-ls-files-lazy-init-name-hash.sh
CommitLineData
2a1bd45b
KW
1#!/bin/sh
2
3test_description='Test the lazy init name hash with various folder structures'
4
5. ./test-lib.sh
6
c033cc15 7if test 1 -eq $($GIT_BUILD_DIR/t/helper/test-tool online-cpus)
845eec2b
KW
8then
9 skip_all='skipping lazy-init tests, single cpu'
10 test_done
11fi
12
13LAZY_THREAD_COST=2000
14
2a1bd45b
KW
15test_expect_success 'no buffer overflow in lazy_init_name_hash' '
16 (
3ea67379
ES
17 test_seq $LAZY_THREAD_COST | sed "s/^/a_/" &&
18 echo b/b/b &&
19 test_seq $LAZY_THREAD_COST | sed "s/^/c_/" &&
20 test_seq 50 | sed "s/^/d_/" | tr "\n" "/" && echo d
2a1bd45b 21 ) |
845eec2b 22 sed "s/^/100644 $EMPTY_BLOB /" |
2a1bd45b 23 git update-index --index-info &&
64eb82fe 24 test-tool lazy-init-name-hash -m
2a1bd45b
KW
25'
26
27test_done