[FFmpeg-devel] [PATCH v3 3/3] tests/fate/source-check: Check for AVERROR codes without error strings

Andrew Sayers ffmpeg-devel at pileofstuff.org
Thu Jul 18 13:46:49 EEST 2024


---
 tests/fate/source-check.sh | 8 ++++++++
 tests/ref/fate/source      | 1 +
 2 files changed, 9 insertions(+)

diff --git a/tests/fate/source-check.sh b/tests/fate/source-check.sh
index 4d7e175784..71f01cbdec 100755
--- a/tests/fate/source-check.sh
+++ b/tests/fate/source-check.sh
@@ -45,4 +45,12 @@ git grep -E 'av_clip *\(.*, *(-2 *, *1|-4 *, *3|-8 *, *7|-16 *, *15|-32 *, *31|-
 ' *, *33554431|-67108864 *, *67108863|-134217728 *, *134217727|-268435456 *, *'\
 '268435455|-536870912 *, *536870911|-1073741824 *, *1073741823) *\)'| grep -v fate/source
 
+echo "AVERROR_xxx constants with no associated error string:"
+git show HEAD:libavutil/error.c \
+    | sed -ne 's/.*AVERROR_\([^ ]*\).*/\1/p' libavutil/error.h \
+    | while read ERROR
+      do git grep -q "$ERROR" libavutil/error.c \
+         || echo "Please add ERROR_TAG($ERROR)"
+      done
+
 exit 0
diff --git a/tests/ref/fate/source b/tests/ref/fate/source
index 1703b36c02..b84cc88a6e 100644
--- a/tests/ref/fate/source
+++ b/tests/ref/fate/source
@@ -28,3 +28,4 @@ libavcodec/bitstream_template.h
 tools/decode_simple.h
 Use of av_clip() where av_clip_uintp2() could be used:
 Use of av_clip() where av_clip_intp2() could be used:
+AVERROR_xxx constants with no associated error string:
-- 
2.45.2



More information about the ffmpeg-devel mailing list