From 40396ebd368ea24e6bfea1c43ba0632efefae141 Mon Sep 17 00:00:00 2001 From: Richard Hansen Date: Mon, 3 Feb 2025 18:26:58 -0500 Subject: [PATCH] tap: include malformed output in error message to aid with debugging * lib/tap-driver.sh: If the line that should contain the test script's exit status is not an integer (which would indicate a bug with the driver, not the code under test), include the line in the error message to help with debugging. --- lib/tap-driver.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/tap-driver.sh b/lib/tap-driver.sh index d36ff7a00..a71c5eeb9 100755 --- a/lib/tap-driver.sh +++ b/lib/tap-driver.sh @@ -23,7 +23,7 @@ # bugs to or send patches to # . -scriptversion=2025-02-03.03; # UTC +scriptversion=2025-02-03.04; # UTC # Make unconditional expansion of undefined variables an error. This # helps a lot in preventing typo-related bugs. @@ -544,7 +544,7 @@ function get_test_exit_message(status) if (status == 0) return "" if (status !~ /^[1-9][0-9]*$/) - abort("getting exit status") + abort("getting exit status: not an integer: " status) if (status < 127) exit_details = "" else if (status == 127) -- 2.47.3