зеркало из https://github.com/microsoft/git.git
Merge branch 'ab/mark-leak-free-tests'
Bunch of tests are marked as "passing leak check". * ab/mark-leak-free-tests: leak tests: mark some misc tests as passing with SANITIZE=leak leak tests: mark various "generic" tests as passing with SANITIZE=leak leak tests: mark some read-tree tests as passing with SANITIZE=leak leak tests: mark some ls-files tests as passing with SANITIZE=leak leak tests: mark all checkout-index tests as passing with SANITIZE=leak leak tests: mark all trace2 tests as passing with SANITIZE=leak leak tests: mark all ls-tree tests as passing with SANITIZE=leak leak tests: run various "test-tool" tests in t00*.sh SANITIZE=leak leak tests: run various built-in tests in t00*.sh SANITIZE=leak
This commit is contained in:
Коммит
5a4f8381b6
|
@ -2,6 +2,7 @@
|
|||
|
||||
test_description='git init'
|
||||
|
||||
TEST_PASSES_SANITIZE_LEAK=true
|
||||
. ./test-lib.sh
|
||||
|
||||
check_config () {
|
||||
|
|
|
@ -7,6 +7,7 @@ Verify that plumbing commands work when .git is a file
|
|||
GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
|
||||
export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
|
||||
|
||||
TEST_PASSES_SANITIZE_LEAK=true
|
||||
. ./test-lib.sh
|
||||
|
||||
objpath() {
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
test_description=gitattributes
|
||||
|
||||
TEST_PASSES_SANITIZE_LEAK=true
|
||||
. ./test-lib.sh
|
||||
|
||||
attr_check_basic () {
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
#!/bin/sh
|
||||
|
||||
test_description='signals work as we expect'
|
||||
|
||||
TEST_PASSES_SANITIZE_LEAK=true
|
||||
. ./test-lib.sh
|
||||
|
||||
cat >expect <<EOF
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
#!/bin/sh
|
||||
|
||||
test_description='basic sanity checks for git var'
|
||||
|
||||
TEST_PASSES_SANITIZE_LEAK=true
|
||||
. ./test-lib.sh
|
||||
|
||||
test_expect_success 'get GIT_AUTHOR_IDENT' '
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
test_description=check-ignore
|
||||
|
||||
TEST_PASSES_SANITIZE_LEAK=true
|
||||
. ./test-lib.sh
|
||||
|
||||
init_vars () {
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
test_description='racy GIT'
|
||||
|
||||
TEST_PASSES_SANITIZE_LEAK=true
|
||||
. ./test-lib.sh
|
||||
|
||||
# This test can give false success if your machine is sufficiently
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
#!/bin/sh
|
||||
|
||||
test_description='test sha1 collision detection'
|
||||
|
||||
TEST_PASSES_SANITIZE_LEAK=true
|
||||
. ./test-lib.sh
|
||||
TEST_DATA="$TEST_DIRECTORY/t0013"
|
||||
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
test_description='ignore CR in CRLF sequence while computing similiarity'
|
||||
|
||||
TEST_PASSES_SANITIZE_LEAK=true
|
||||
. ./test-lib.sh
|
||||
|
||||
test_expect_success setup '
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
test_description='respect crlf in git archive'
|
||||
|
||||
TEST_PASSES_SANITIZE_LEAK=true
|
||||
. ./test-lib.sh
|
||||
|
||||
test_expect_success setup '
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
test_description='CRLF renormalization'
|
||||
|
||||
TEST_PASSES_SANITIZE_LEAK=true
|
||||
. ./test-lib.sh
|
||||
|
||||
test_expect_success setup '
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
test_description='CRLF conversion'
|
||||
|
||||
TEST_PASSES_SANITIZE_LEAK=true
|
||||
. ./test-lib.sh
|
||||
|
||||
has_cr() {
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
test_description='test the Windows-only core.unsetenvvars setting'
|
||||
|
||||
TEST_PASSES_SANITIZE_LEAK=true
|
||||
. ./test-lib.sh
|
||||
|
||||
if ! test_have_prereq MINGW
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
test_description='simple command server'
|
||||
|
||||
TEST_PASSES_SANITIZE_LEAK=true
|
||||
. ./test-lib.sh
|
||||
|
||||
test-tool simple-ipc SUPPORTS_SIMPLE_IPC || {
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
test_description='update-index and add refuse to add beyond symlinks'
|
||||
|
||||
TEST_PASSES_SANITIZE_LEAK=true
|
||||
. ./test-lib.sh
|
||||
|
||||
test_expect_success SYMLINKS setup '
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
|
||||
test_description='Test run command'
|
||||
|
||||
TEST_PASSES_SANITIZE_LEAK=true
|
||||
. ./test-lib.sh
|
||||
|
||||
cat >hello-script <<-EOF
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
test_description='Test strcmp_offset functionality'
|
||||
|
||||
TEST_PASSES_SANITIZE_LEAK=true
|
||||
. ./test-lib.sh
|
||||
|
||||
while read s1 s2 expect
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
test_description='Test the dir-iterator functionality'
|
||||
|
||||
TEST_PASSES_SANITIZE_LEAK=true
|
||||
. ./test-lib.sh
|
||||
|
||||
test_expect_success 'setup' '
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
test_description='Test parse_pathspec_file()'
|
||||
|
||||
TEST_PASSES_SANITIZE_LEAK=true
|
||||
. ./test-lib.sh
|
||||
|
||||
test_expect_success 'one item from stdin' '
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
#!/bin/sh
|
||||
|
||||
test_description='test trace2 facility (normal target)'
|
||||
|
||||
TEST_PASSES_SANITIZE_LEAK=true
|
||||
. ./test-lib.sh
|
||||
|
||||
# Turn off any inherited trace2 settings for this test.
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
#!/bin/sh
|
||||
|
||||
test_description='test trace2 facility (perf target)'
|
||||
|
||||
TEST_PASSES_SANITIZE_LEAK=true
|
||||
. ./test-lib.sh
|
||||
|
||||
# Turn off any inherited trace2 settings for this test.
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
#!/bin/sh
|
||||
|
||||
test_description='test trace2 facility'
|
||||
|
||||
TEST_PASSES_SANITIZE_LEAK=true
|
||||
. ./test-lib.sh
|
||||
|
||||
# Turn off any inherited trace2 settings for this test.
|
||||
|
|
|
@ -71,6 +71,8 @@ In addition:
|
|||
DF: a special case, where A makes a directory and B makes a file.
|
||||
|
||||
'
|
||||
|
||||
TEST_PASSES_SANITIZE_LEAK=true
|
||||
. ./test-lib.sh
|
||||
. "$TEST_DIRECTORY"/lib-read-tree.sh
|
||||
. "$TEST_DIRECTORY"/lib-read-tree-m-3way.sh
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
test_description='git read-tree --prefix test.
|
||||
'
|
||||
|
||||
TEST_PASSES_SANITIZE_LEAK=true
|
||||
. ./test-lib.sh
|
||||
|
||||
test_expect_success setup '
|
||||
|
|
|
@ -5,6 +5,7 @@ test_description='test read-tree into a fresh index file'
|
|||
GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
|
||||
export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
|
||||
|
||||
TEST_PASSES_SANITIZE_LEAK=true
|
||||
. ./test-lib.sh
|
||||
|
||||
test_expect_success setup '
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
test_description='git mktree'
|
||||
|
||||
TEST_PASSES_SANITIZE_LEAK=true
|
||||
. ./test-lib.sh
|
||||
|
||||
test_expect_success setup '
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
test_description='read-tree D/F conflict corner cases'
|
||||
|
||||
TEST_PASSES_SANITIZE_LEAK=true
|
||||
. ./test-lib.sh
|
||||
. "$TEST_DIRECTORY"/lib-read-tree.sh
|
||||
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
#!/bin/sh
|
||||
|
||||
test_description='check that read-tree rejects confusing paths'
|
||||
|
||||
TEST_PASSES_SANITIZE_LEAK=true
|
||||
. ./test-lib.sh
|
||||
|
||||
test_expect_success 'create base tree' '
|
||||
|
|
|
@ -12,6 +12,7 @@ Also make sure that command line parser understands the normal
|
|||
"flags first and then non flag arguments" command line.
|
||||
'
|
||||
|
||||
TEST_PASSES_SANITIZE_LEAK=true
|
||||
. ./test-lib.sh
|
||||
|
||||
cat >expected <<EOF
|
||||
|
|
|
@ -4,6 +4,7 @@ test_description='Test handling of ref names that check-ref-format rejects'
|
|||
GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
|
||||
export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
|
||||
|
||||
TEST_PASSES_SANITIZE_LEAK=true
|
||||
. ./test-lib.sh
|
||||
|
||||
test_expect_success setup '
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
#!/bin/sh
|
||||
|
||||
test_description='test GIT_CEILING_DIRECTORIES'
|
||||
|
||||
TEST_PASSES_SANITIZE_LEAK=true
|
||||
. ./test-lib.sh
|
||||
|
||||
test_prefix() {
|
||||
|
|
|
@ -43,6 +43,7 @@ A few rules for repo setup:
|
|||
# This test heavily relies on the standard error of nested function calls.
|
||||
test_untraceable=UnfortunatelyYes
|
||||
|
||||
TEST_PASSES_SANITIZE_LEAK=true
|
||||
. ./test-lib.sh
|
||||
|
||||
here=$(pwd)
|
||||
|
|
|
@ -8,6 +8,7 @@ test_description='git checkout-index -u test.
|
|||
With -u flag, git checkout-index internally runs the equivalent of
|
||||
git update-index --refresh on the checked out entry.'
|
||||
|
||||
TEST_PASSES_SANITIZE_LEAK=true
|
||||
. ./test-lib.sh
|
||||
|
||||
test_expect_success \
|
||||
|
|
|
@ -10,6 +10,7 @@ also verifies that such leading path may contain symlinks, unlike
|
|||
the GIT controlled paths.
|
||||
'
|
||||
|
||||
TEST_PASSES_SANITIZE_LEAK=true
|
||||
. ./test-lib.sh
|
||||
|
||||
test_expect_success 'setup' '
|
||||
|
|
|
@ -8,6 +8,7 @@ test_description='git checkout-index --temp test.
|
|||
With --temp flag, git checkout-index writes to temporary merge files
|
||||
rather than the tracked path.'
|
||||
|
||||
TEST_PASSES_SANITIZE_LEAK=true
|
||||
. ./test-lib.sh
|
||||
|
||||
test_expect_success 'setup' '
|
||||
|
|
|
@ -8,6 +8,7 @@ test_description='git checkout-index on filesystem w/o symlinks test.
|
|||
This tests that git checkout-index creates a symbolic link as a plain
|
||||
file if core.symlinks is false.'
|
||||
|
||||
TEST_PASSES_SANITIZE_LEAK=true
|
||||
. ./test-lib.sh
|
||||
|
||||
test_expect_success \
|
||||
|
|
|
@ -12,6 +12,7 @@ into the subdir while keeping the worktree location,
|
|||
and tries commits from the top and the subdir, checking
|
||||
that the commit-hook still gets called.'
|
||||
|
||||
TEST_PASSES_SANITIZE_LEAK=true
|
||||
. ./test-lib.sh
|
||||
|
||||
COMMIT_FILE="$(pwd)/output"
|
||||
|
|
|
@ -11,6 +11,7 @@ The tests in this file exercise parallel checkout's collision detection code in
|
|||
both these mechanics.
|
||||
"
|
||||
|
||||
TEST_PASSES_SANITIZE_LEAK=true
|
||||
. ./test-lib.sh
|
||||
. "$TEST_DIRECTORY/lib-parallel-checkout.sh"
|
||||
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
test_description='cd_to_toplevel'
|
||||
|
||||
TEST_PASSES_SANITIZE_LEAK=true
|
||||
. ./test-lib.sh
|
||||
|
||||
EXEC_PATH="$(git --exec-path)"
|
||||
|
|
|
@ -15,6 +15,8 @@ filesystem.
|
|||
path3/file3 - a file in a directory
|
||||
path4 - an empty directory
|
||||
'
|
||||
|
||||
TEST_PASSES_SANITIZE_LEAK=true
|
||||
. ./test-lib.sh
|
||||
|
||||
test_expect_success 'setup ' '
|
||||
|
|
|
@ -12,6 +12,8 @@ filesystem.
|
|||
-foo - a file with a funny name.
|
||||
-- - another file with a funny name.
|
||||
'
|
||||
|
||||
TEST_PASSES_SANITIZE_LEAK=true
|
||||
. ./test-lib.sh
|
||||
|
||||
test_expect_success \
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
#!/bin/sh
|
||||
|
||||
test_description='ls-files --exclude does not affect index files'
|
||||
|
||||
TEST_PASSES_SANITIZE_LEAK=true
|
||||
. ./test-lib.sh
|
||||
|
||||
test_expect_success 'create repo with file' '
|
||||
|
|
|
@ -6,6 +6,7 @@ This test runs git ls-files with various unusual or malformed
|
|||
command-line arguments.
|
||||
'
|
||||
|
||||
TEST_PASSES_SANITIZE_LEAK=true
|
||||
. ./test-lib.sh
|
||||
|
||||
test_expect_success 'ls-files in empty repository' '
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
#!/bin/sh
|
||||
|
||||
test_description='overly long paths'
|
||||
|
||||
TEST_PASSES_SANITIZE_LEAK=true
|
||||
. ./test-lib.sh
|
||||
|
||||
test_expect_success setup '
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
test_description='Test the lazy init name hash with various folder structures'
|
||||
|
||||
TEST_PASSES_SANITIZE_LEAK=true
|
||||
. ./test-lib.sh
|
||||
|
||||
if test 1 -eq $(test-tool online-cpus)
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
test_description='wildmatch tests'
|
||||
|
||||
TEST_PASSES_SANITIZE_LEAK=true
|
||||
. ./test-lib.sh
|
||||
|
||||
# Disable expensive chain-lint tests; all of the tests in this script
|
||||
|
|
|
@ -16,6 +16,8 @@ This test runs git ls-tree with the following in a tree.
|
|||
The new path restriction code should do the right thing for path2 and
|
||||
path2/baz. Also path0/ should snow nothing.
|
||||
'
|
||||
|
||||
TEST_PASSES_SANITIZE_LEAK=true
|
||||
. ./test-lib.sh
|
||||
|
||||
test_expect_success \
|
||||
|
|
|
@ -19,6 +19,8 @@ This test runs git ls-tree with the following in a tree.
|
|||
Test the handling of multiple directories which have matching file
|
||||
entries. Also test odd filename and missing entries handling.
|
||||
'
|
||||
|
||||
TEST_PASSES_SANITIZE_LEAK=true
|
||||
. ./test-lib.sh
|
||||
|
||||
test_expect_success 'setup' '
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
test_description='ls-tree with(out) globs'
|
||||
|
||||
TEST_PASSES_SANITIZE_LEAK=true
|
||||
. ./test-lib.sh
|
||||
|
||||
test_expect_success 'setup' '
|
||||
|
|
|
@ -7,6 +7,7 @@ Miscellaneous tests for git ls-tree.
|
|||
|
||||
'
|
||||
|
||||
TEST_PASSES_SANITIZE_LEAK=true
|
||||
. ./test-lib.sh
|
||||
|
||||
test_expect_success 'setup' '
|
||||
|
|
|
@ -4,6 +4,7 @@ test_description='basic branch output coloring'
|
|||
GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
|
||||
export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
|
||||
|
||||
TEST_PASSES_SANITIZE_LEAK=true
|
||||
. ./test-lib.sh
|
||||
|
||||
test_expect_success 'set up some sample branches' '
|
||||
|
|
|
@ -4,6 +4,7 @@ test_description='tests for the peel_ref optimization of packed-refs'
|
|||
GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
|
||||
export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
|
||||
|
||||
TEST_PASSES_SANITIZE_LEAK=true
|
||||
. ./test-lib.sh
|
||||
|
||||
test_expect_success 'create annotated tag in refs/tags' '
|
||||
|
|
|
@ -9,6 +9,7 @@ This test tries pathnames with funny characters in the working
|
|||
tree, index, and tree objects.
|
||||
'
|
||||
|
||||
TEST_PASSES_SANITIZE_LEAK=true
|
||||
. ./test-lib.sh
|
||||
|
||||
HT=' '
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
test_description='rm --pathspec-from-file'
|
||||
|
||||
TEST_PASSES_SANITIZE_LEAK=true
|
||||
. ./test-lib.sh
|
||||
|
||||
test_tick
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
|
||||
test_description='quoted output'
|
||||
|
||||
TEST_PASSES_SANITIZE_LEAK=true
|
||||
. ./test-lib.sh
|
||||
|
||||
FN='濱野'
|
||||
|
|
|
@ -6,6 +6,8 @@
|
|||
test_description='Test diff raw-output.
|
||||
|
||||
'
|
||||
|
||||
TEST_PASSES_SANITIZE_LEAK=true
|
||||
. ./test-lib.sh
|
||||
|
||||
. "$TEST_DIRECTORY"/lib-read-tree-m-3way.sh
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
test_description='Quoting paths in diff output.
|
||||
'
|
||||
|
||||
TEST_PASSES_SANITIZE_LEAK=true
|
||||
. ./test-lib.sh
|
||||
|
||||
P0='pathname'
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
test_description='diff whitespace error detection'
|
||||
|
||||
TEST_PASSES_SANITIZE_LEAK=true
|
||||
. ./test-lib.sh
|
||||
|
||||
test_expect_success setup '
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
test_description='diff hunk header truncation'
|
||||
|
||||
TEST_PASSES_SANITIZE_LEAK=true
|
||||
. ./test-lib.sh
|
||||
|
||||
N='日本語'
|
||||
|
|
|
@ -4,6 +4,8 @@
|
|||
#
|
||||
|
||||
test_description='Test diff/status color escape codes'
|
||||
|
||||
TEST_PASSES_SANITIZE_LEAK=true
|
||||
. ./test-lib.sh
|
||||
|
||||
ESC=$(printf '\033')
|
||||
|
|
|
@ -4,6 +4,8 @@
|
|||
#
|
||||
|
||||
test_description='git merge-tree'
|
||||
|
||||
TEST_PASSES_SANITIZE_LEAK=true
|
||||
. ./test-lib.sh
|
||||
|
||||
test_expect_success setup '
|
||||
|
|
|
@ -4,6 +4,7 @@ test_description='various Windows-only path tests'
|
|||
GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
|
||||
export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
|
||||
|
||||
TEST_PASSES_SANITIZE_LEAK=true
|
||||
. ./test-lib.sh
|
||||
|
||||
if test_have_prereq CYGWIN
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
#!/bin/sh
|
||||
|
||||
test_description='handling of alternates in environment variables'
|
||||
|
||||
TEST_PASSES_SANITIZE_LEAK=true
|
||||
. ./test-lib.sh
|
||||
|
||||
check_obj () {
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
#!/bin/sh
|
||||
|
||||
test_description='corner cases in ident strings'
|
||||
|
||||
TEST_PASSES_SANITIZE_LEAK=true
|
||||
. ./test-lib.sh
|
||||
|
||||
# confirm that we do not segfault _and_ that we do not say "(null)", as
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
test_description='grep icase on non-English locales'
|
||||
|
||||
TEST_PASSES_SANITIZE_LEAK=true
|
||||
. ./lib-gettext.sh
|
||||
|
||||
test_expect_success GETTEXT_ISO_LOCALE 'setup' '
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
test_description='git grep with a binary pattern files'
|
||||
|
||||
TEST_PASSES_SANITIZE_LEAK=true
|
||||
. ./lib-gettext.sh
|
||||
|
||||
nul_match_internal () {
|
||||
|
|
Загрузка…
Ссылка в новой задаче