]> git.ipfire.org Git - thirdparty/git.git/commit - t/t7103-reset-bare.sh
tests: change some 'test $(git) = "x"' to test_cmp
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>
Mon, 7 Mar 2022 12:48:52 +0000 (13:48 +0100)
committerJunio C Hamano <gitster@pobox.com>
Mon, 7 Mar 2022 21:27:39 +0000 (13:27 -0800)
commitc4d1d526312a2dbe39c7997cb5a08cfce12f2427
tree933d3ae40a18bf154a36d58d0276c288c188676e
parent715d08a9e51251ad8290b181b6ac3b9e1f9719d7
tests: change some 'test $(git) = "x"' to test_cmp

Change some of the patterns in the test suite where we were hiding the
exit code from "git" by invoking it in a sub-shell within a "test"
expression to use temporary files and test_cmp instead.

These are not all the occurrences of this anti-pattern, but these in
particular hid issues where LSAN was dying, and I'd thus marked these
tests as passing under the linux-leaks CI job in past commits with
"TEST_PASSES_SANITIZE_LEAK=true". Let's deal with that by either
removing that marking, or skipping specific tests under
!SANITIZE_LEAK.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t0002-gitfile.sh
t/t2200-add-update.sh
t/t4128-apply-root.sh
t/t7103-reset-bare.sh