tests/fate/libavutil: add FATE test for buffer

Test av_buffer_alloc, av_buffer_allocz, av_buffer_create with
custom free callback, AV_BUFFER_FLAG_READONLY, av_buffer_ref,
av_buffer_is_writable, av_buffer_get_ref_count,
av_buffer_make_writable, av_buffer_realloc (including from NULL),
av_buffer_replace (including with NULL), av_buffer_pool
init/get/uninit cycle, av_buffer_pool_init2 with custom alloc
and pool_free callbacks, av_buffer_pool_buffer_get_opaque, and
OOM paths via av_max_alloc.

Coverage for libavutil/buffer.c: 0.00% -> 90.19%

Remaining uncovered lines are mutex init failures and
secondary allocation failure paths.
This commit is contained in:
marcos ashton
2026-04-09 15:24:48 +01:00
committed by michaelni
parent 03931e8865
commit 2d9c8a9382
5 changed files with 315 additions and 0 deletions
+2
View File
@@ -232,7 +232,9 @@ doc/.* @GyanD
# tests
# =====
tests/checkasm/riscv/.* @Courmisch
libavutil/tests/buffer.* @MarcosAsh
tests/ref/.*drawvg.* @ayosec
tests/ref/fate/buffer @MarcosAsh
tests/ref/fate/sub-mcc.* @programmerjake
# Forgejo