[PATCH 00/10] leak test: add "check" test mode, mark leak-free tests

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

 



Since release_revisions() we've had much fewer widespread leaks in the
test suite, so I think it's time to mark even more tests as running in
the linux-leaks CI job. The 9/10 here does that.

But before that we introduce a "GIT_TEST_PASSING_SANITIZE_LEAK=check"
leak mode, this uses test-lib.sh --invert-exit-code feature added here
to fail tests whose TEST_PASSES_SANITIZE_LEAK=true marking isn't
current.

I've been using this series for a while to help in submitting all the
other leak fixes I've been sending in. It's very useful to run the
"check" with "git rebase -x", i.e. to atomically mark tests as
leak-free as we fix leaks.

In adding "check" I needed to add a new
GIT_TEST_SANITIZE_LEAK_LOG=true setting, and integrate it with
"check". I.e. we have many cases where we lose exit codes from git, or
otherwise don't notice an abort, 08/10 here discusses why that is.

When "check" and "GIT_TEST_SANITIZE_LEAK_LOG=true" are combined we'll
take into account leaks that we log to decide whether to pass the
tests.

Writing out the leak logs is also very useful to analyze our remaining
leaks. I've got a local script that scrapes the logs, and emits a
sorted list of which leaks provide the best bang-for-the-buck in terms
of getting more tests passing. That's not being submitted here, but I
can follow-up and send that in if there's interest.

Ævar Arnfjörð Bjarmason (10):
  test-lib.sh: use $1, not $@ in test_known_broken_{ok,failure}_
  test-lib.sh: don't set GIT_EXIT_OK before calling test_atexit_handler
  test-lib.sh: fix GIT_EXIT_OK logic errors, use BAIL_OUT
  test-lib.sh: add a --invert-exit-code switch
  t/README: reword the "GIT_TEST_PASSING_SANITIZE_LEAK" description
  test-lib: add a SANITIZE=leak logging mode
  test-lib.sh: add a GIT_TEST_PASSING_SANITIZE_LEAK=check mode
  test-lib: have the "check" mode for SANITIZE=leak consider leak logs
  leak tests: mark passing SANITIZE=leak tests as leak-free
  log tests: don't use "exit 1" outside a sub-shell

 t/README                            |  36 +++++-
 t/t0000-basic.sh                    |  72 +++++++++++
 t/t0027-auto-crlf.sh                |   1 +
 t/t0032-reftable-unittest.sh        |   1 +
 t/t0033-safe-directory.sh           |   1 +
 t/t0050-filesystem.sh               |   1 +
 t/t0095-bloom.sh                    |   2 +
 t/t1405-main-ref-store.sh           |   1 +
 t/t1407-worktree-ref-store.sh       |   1 +
 t/t1418-reflog-exists.sh            |   1 +
 t/t1701-racy-split-index.sh         |   1 +
 t/t2006-checkout-index-basic.sh     |   1 +
 t/t2023-checkout-m.sh               |   1 +
 t/t2205-add-worktree-config.sh      |   1 +
 t/t3012-ls-files-dedup.sh           |   1 +
 t/t4017-diff-retval.sh              |   1 +
 t/t4051-diff-function-context.sh    |   1 +
 t/t4057-diff-combined-paths.sh      |   1 +
 t/t4114-apply-typechange.sh         |   1 +
 t/t4205-log-pretty-formats.sh       |   2 +-
 t/t4301-merge-tree-write-tree.sh    |   1 +
 t/t5315-pack-objects-compression.sh |   1 +
 t/t5351-unpack-large-objects.sh     |   1 +
 t/t5402-post-merge-hook.sh          |   1 +
 t/t5503-tagfollow.sh                |   1 +
 t/t6404-recursive-merge.sh          |   1 +
 t/t6405-merge-symlinks.sh           |   1 +
 t/t6407-merge-binary.sh             |   1 -
 t/t6408-merge-up-to-date.sh         |   1 +
 t/t6411-merge-filemode.sh           |   1 +
 t/t6413-merge-crlf.sh               |   1 +
 t/t6415-merge-dir-to-symlink.sh     |   1 +
 t/t6425-merge-rename-delete.sh      |   1 +
 t/t6431-merge-criscross.sh          |   1 +
 t/t7060-wtstatus.sh                 |   1 +
 t/t7062-wtstatus-ignorecase.sh      |   1 +
 t/t7110-reset-merge.sh              |   1 +
 t/t7111-reset-table.sh              |   1 +
 t/t7609-mergetool--lib.sh           |   1 +
 t/t9100-git-svn-basic.sh            |   1 -
 t/t9700-perl-git.sh                 |   6 +
 t/t9901-git-web--browse.sh          |   1 +
 t/test-lib.sh                       | 187 ++++++++++++++++++++++++----
 43 files changed, 310 insertions(+), 32 deletions(-)

-- 
2.37.1.1062.g385eac7fccf




[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