[FFmpeg-devel] [PATCH v3 15/17] tests/checkasm: add checkasm tests for swscale ops
Martin Storsjö
martin at martin.st
Tue May 27 11:25:37 EEST 2025
On Tue, 27 May 2025, Niklas Haas wrote:
> From: Niklas Haas <git at haasn.dev>
>
> Because of the lack of an external ABI on low-level kernels, we cannot
> directly test internal functions. Instead, we construct a minimal op chain
> consisting of a read, the op to be tested, and a write.
>
> The bigger complication arises from the fact that the backend may generate
> arbitrary internal state that needs to be passed back to the implementation,
> which means we cannot directly call `func_ref` on the generated chain. To get
> around this, always compile the op chain twice - once using the backend to be
> tested, and once using the reference C backend.
>
> The actual entry point may also just be a shared wrapper, so we need to
> be very careful to run checkasm_check_func() on a pseudo-pointer that will
> actually be unique for each combination of backend and active CPU flags.
> ---
> tests/checkasm/Makefile | 8 +-
> tests/checkasm/checkasm.c | 1 +
> tests/checkasm/checkasm.h | 1 +
> tests/checkasm/sw_ops.c | 776 ++++++++++++++++++++++++++++++++++++++
> 4 files changed, 785 insertions(+), 1 deletion(-)
> create mode 100644 tests/checkasm/sw_ops.c
When adding a new checkasm test group like this, add it to
tests/fate/checkasm.mak too, otherwise it is missed by "make fate" and
"make fate-checkasm", which run all the individual test groups separately.
// Martin
More information about the ffmpeg-devel
mailing list