Commit fd7161d542 for ffmpeg
commit fd7161d542c9af73fd5e49c92725e33d6584420d
Author: Kacper Michajłow <kasper93@gmail.com>
Date: Sun Nov 1 06:26:24 2026 +0100
tests/fate-run.sh: fail a test when any command of a pipeline fails
A pipeline returns the status of its last command, so a test piping
ffmpeg into ffprobe or framecrc passed when ffmpeg failed after writing
its output, for example on a leak reported by LeakSanitizer. Enable
pipefail where the shell supports it.
Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
diff --git a/tests/fate-run.sh b/tests/fate-run.sh
index b23dc8d5ea..6322ddfacb 100755
--- a/tests/fate-run.sh
+++ b/tests/fate-run.sh
@@ -789,6 +789,9 @@ null(){
# must be kept verbatim
set -f
+# A pipeline fails when any of its commands fails, if the shell supports it
+(set -o pipefail) 2>/dev/null && set -o pipefail
+
exec 3>&2
eval $command >"$outfile" 2>$errfile
err=$?