mirror of
https://github.com/git/git.git
synced 2026-03-30 11:30:07 +02:00
Merge branch 'ps/leakfixes-part-6'
More leakfixes. * ps/leakfixes-part-6: (22 commits) builtin/repack: fix leaking keep-pack list merge-ort: fix two leaks when handling directory rename modifications match-trees: fix leaking prefixes in `shift_tree()` builtin/fmt-merge-msg: fix leaking buffers builtin/grep: fix leaking object context builtin/pack-objects: plug leaking list of keep-packs builtin/repack: fix leaking line buffer when packing promisors negotiator/skipping: fix leaking commit entries shallow: fix leaking members of `struct shallow_info` shallow: free grafts when unregistering them object: clear grafts when clearing parsed object pool gpg-interface: fix misdesigned signing key interfaces send-pack: fix leaking push cert nonce remote: fix leak in reachability check of a remote-tracking ref remote: fix leaking tracking refs builtin/submodule--helper: fix leaking refs on push-check submodule: fix leaking fetch task data upload-pack: fix leaking child process data on reachability checks builtin/push: fix leaking refspec query result send-pack: fix leaking common object IDs ...
This commit is contained in:
3
t/README
3
t/README
@@ -386,6 +386,9 @@ GIT_TEST_PASSING_SANITIZE_LEAK=check when combined with "--immediate"
|
||||
will run to completion faster, and result in the same failing
|
||||
tests.
|
||||
|
||||
GIT_TEST_PASSING_SANITIZE_LEAK=check-failing behaves the same as "check",
|
||||
but skips all tests which are already marked as leak-free.
|
||||
|
||||
GIT_TEST_PROTOCOL_VERSION=<n>, when set, makes 'protocol.version'
|
||||
default to n.
|
||||
|
||||
|
||||
@@ -19,6 +19,7 @@ GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
|
||||
export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
|
||||
|
||||
TEST_CREATE_REPO_NO_TEMPLATE=1
|
||||
TEST_PASSES_SANITIZE_LEAK=true
|
||||
. ./test-lib.sh
|
||||
|
||||
D=$(pwd)
|
||||
|
||||
@@ -6,6 +6,7 @@ test_description='Recursive "git fetch" for submodules'
|
||||
GIT_TEST_FATAL_REGISTER_SUBMODULE_ODB=1
|
||||
export GIT_TEST_FATAL_REGISTER_SUBMODULE_ODB
|
||||
|
||||
TEST_PASSES_SANITIZE_LEAK=true
|
||||
. ./test-lib.sh
|
||||
|
||||
pwd=$(pwd)
|
||||
|
||||
@@ -8,6 +8,7 @@ export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
|
||||
GIT_TEST_FATAL_REGISTER_SUBMODULE_ODB=1
|
||||
export GIT_TEST_FATAL_REGISTER_SUBMODULE_ODB
|
||||
|
||||
TEST_PASSES_SANITIZE_LEAK=true
|
||||
. ./test-lib.sh
|
||||
|
||||
test_expect_success setup '
|
||||
|
||||
@@ -5,6 +5,7 @@ test_description='compare & swap push force/delete safety'
|
||||
GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
|
||||
export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
|
||||
|
||||
TEST_PASSES_SANITIZE_LEAK=true
|
||||
. ./test-lib.sh
|
||||
|
||||
setup_srcdst_basic () {
|
||||
|
||||
@@ -5,6 +5,7 @@ test_description='signed push'
|
||||
GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
|
||||
export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
|
||||
|
||||
TEST_PASSES_SANITIZE_LEAK=true
|
||||
. ./test-lib.sh
|
||||
. "$TEST_DIRECTORY"/lib-gpg.sh
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@ test_description='fetch/clone from a shallow clone'
|
||||
GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
|
||||
export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
|
||||
|
||||
TEST_PASSES_SANITIZE_LEAK=true
|
||||
. ./test-lib.sh
|
||||
|
||||
commit() {
|
||||
|
||||
@@ -5,6 +5,7 @@ test_description='push from/to a shallow clone'
|
||||
GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
|
||||
export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
|
||||
|
||||
TEST_PASSES_SANITIZE_LEAK=true
|
||||
. ./test-lib.sh
|
||||
|
||||
commit() {
|
||||
|
||||
@@ -5,6 +5,7 @@ test_description='fetch/push functionality using the HTTP protocol'
|
||||
GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
|
||||
export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
|
||||
|
||||
TEST_PASSES_SANITIZE_LEAK=true
|
||||
. ./test-lib.sh
|
||||
. "$TEST_DIRECTORY"/lib-httpd.sh
|
||||
start_httpd
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
#!/bin/sh
|
||||
|
||||
test_description='test skipping fetch negotiator'
|
||||
|
||||
TEST_PASSES_SANITIZE_LEAK=true
|
||||
. ./test-lib.sh
|
||||
|
||||
test_expect_success 'fetch.negotiationalgorithm config' '
|
||||
|
||||
@@ -5,6 +5,7 @@ test_description='git partial clone'
|
||||
GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
|
||||
export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
|
||||
|
||||
TEST_PASSES_SANITIZE_LEAK=true
|
||||
. ./test-lib.sh
|
||||
|
||||
# create a normal "src" repo where we can later create new commits.
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
test_description='test case exclude pathspec'
|
||||
|
||||
TEST_PASSES_SANITIZE_LEAK=true
|
||||
. ./test-lib.sh
|
||||
|
||||
test_expect_success 'setup' '
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
#!/bin/sh
|
||||
|
||||
test_description='test labels in pathspecs'
|
||||
|
||||
TEST_PASSES_SANITIZE_LEAK=true
|
||||
. ./test-lib.sh
|
||||
|
||||
test_expect_success 'setup a tree' '
|
||||
|
||||
@@ -8,6 +8,7 @@ test_description='fmt-merge-msg test'
|
||||
GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
|
||||
export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
|
||||
|
||||
TEST_PASSES_SANITIZE_LEAK=true
|
||||
. ./test-lib.sh
|
||||
. "$TEST_DIRECTORY/lib-gpg.sh"
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@ test_description='subtree merge strategy'
|
||||
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 '
|
||||
|
||||
@@ -25,6 +25,7 @@ test_description="recursive merge with directory renames"
|
||||
# underscore notation is to differentiate different
|
||||
# files that might be renamed into each other's paths.)
|
||||
|
||||
TEST_PASSES_SANITIZE_LEAK=true
|
||||
. ./test-lib.sh
|
||||
. "$TEST_DIRECTORY"/lib-merge.sh
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
test_description='basic git gc tests
|
||||
'
|
||||
|
||||
TEST_PASSES_SANITIZE_LEAK=true
|
||||
. ./test-lib.sh
|
||||
. "$TEST_DIRECTORY"/lib-terminal.sh
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
test_description='git repack --geometric works correctly'
|
||||
|
||||
TEST_PASSES_SANITIZE_LEAK=true
|
||||
. ./test-lib.sh
|
||||
|
||||
GIT_TEST_MULTI_PACK_INDEX=0
|
||||
|
||||
@@ -1558,8 +1558,16 @@ then
|
||||
passes_sanitize_leak=t
|
||||
fi
|
||||
|
||||
if test "$GIT_TEST_PASSING_SANITIZE_LEAK" = "check"
|
||||
if test "$GIT_TEST_PASSING_SANITIZE_LEAK" = "check" ||
|
||||
test "$GIT_TEST_PASSING_SANITIZE_LEAK" = "check-failing"
|
||||
then
|
||||
if test "$GIT_TEST_PASSING_SANITIZE_LEAK" = "check-failing" &&
|
||||
test -n "$passes_sanitize_leak"
|
||||
then
|
||||
skip_all="skipping leak-free $this_test under GIT_TEST_PASSING_SANITIZE_LEAK=check-failing"
|
||||
test_done
|
||||
fi
|
||||
|
||||
sanitize_leak_check=t
|
||||
if test -n "$invert_exit_code"
|
||||
then
|
||||
@@ -1597,6 +1605,7 @@ then
|
||||
export LSAN_OPTIONS
|
||||
|
||||
elif test "$GIT_TEST_PASSING_SANITIZE_LEAK" = "check" ||
|
||||
test "$GIT_TEST_PASSING_SANITIZE_LEAK" = "check-failing" ||
|
||||
test_bool_env GIT_TEST_PASSING_SANITIZE_LEAK false
|
||||
then
|
||||
BAIL_OUT_ENV_NEEDS_SANITIZE_LEAK "GIT_TEST_PASSING_SANITIZE_LEAK=true"
|
||||
|
||||
Reference in New Issue
Block a user