From: Ævar Arnfjörð Bjarmason Date: Mon, 7 Mar 2022 12:49:06 +0000 (+0100) Subject: rev-list simplify tests: don't ignore "git" exit code X-Git-Tag: v2.36.0-rc0~60^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a6ecc256c34c42a8b9f1790d9bfb5ea8f6309022;p=thirdparty%2Fgit.git rev-list simplify tests: don't ignore "git" exit code Change a fragile test pattern introduced in 65347030590 (Topo-sort before --simplify-merges, 2008-08-03) to check the exit code of both "git name-rev" and "git log". This test as a whole would fail under SANITIZE=leak, but we'd pass several "failing" tests due to hiding these exit codes before we'd spot git dying with abort(). Now we'll instead spot all of the failures. Signed-off-by: Ævar Arnfjörð Bjarmason Signed-off-by: Junio C Hamano --- diff --git a/t/t6012-rev-list-simplify.sh b/t/t6012-rev-list-simplify.sh index 63fcccec32..de1e87f162 100755 --- a/t/t6012-rev-list-simplify.sh +++ b/t/t6012-rev-list-simplify.sh @@ -12,7 +12,9 @@ note () { } unnote () { - git name-rev --tags --annotate-stdin | sed -e "s|$OID_REGEX (tags/\([^)]*\)) |\1 |g" + test_when_finished "rm -f tmp" && + git name-rev --tags --annotate-stdin >tmp && + sed -e "s|$OID_REGEX (tags/\([^)]*\)) |\1 |g" actual && + git log --pretty="$FMT" --parents $param >out && + unnote >actual check expect && - git log --pretty="$FMT" --full-history E -- lost | - unnote >actual && + git log --pretty="$FMT" --full-history E -- lost >out && + unnote >actual check