PR #21030 opened by Ayose C. (ayosec) URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/21030 Patch URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/21030.patch
This pull-request is an alternative to #21008. The test `fate-filter-drawvg-video` is failing on Windows when `SRC_PATH` contains the character `:` ([example](https://fate.ffmpeg.org/report.cgi?time=20251126171129&slot=msys2-mingw64)). I tried to find a way to escape the value that could work in both systems (Unix/Windows), but the way `tests/fate-run.sh` moves the command-line arguments between functions (a mix of `eval`, `$*`, and `$@`) makes very difficult to work with characters that can be interpreted by the shell (like `\` or `'`). Instead of escaping the value, the solution implemented is to copy the `drawvg.lines` file to the `tests/data` directory (which already has temp files), so the value for `file` is a fixed string with no problematic characters. ### Testing I'm not familiar with Windows, so I don't know if this is the correct way to test it. 1. With MSYS2 3.6.4, GCC-MINGW 15.2. ```console $ pacman -Qe ... mingw-w64-x86_64-gcc 15.2.0-8 msys2-runtime 3.6.4-1 ``` 2. A copy of the `master` branch is in `/tmp/ffmpeg-drawvg`. FFmpeg is built in `/tmp/build0`: ```console $ gcc -dumpmachine x86_64-w64-mingw32 $ mkdir /tmp/build0 $ cd /tmp/build0 $ E:/msys64/tmp/ffmpeg-drawvg/configure --enable-cairo --disable-x86asm ... ``` 3. Before the patch in this pull-request I can reproduce [the same error](https://fate.ffmpeg.org/log.cgi?slot=msys2-mingw64&log=test&time=20251126171129#:~:text=tiltandshift%2D444%0ATEST-,filter%2Ddrawvg%2Dvideo,-%2D%2D%2D%20/d/a/FFmpeg): ```console $ make fate-filter-drawvg-video V=1 ... +++ tests/data/fate/filter-drawvg-video @@ -1 +1 @@ -drawvg-video caa7642950ab2fb1367bd28c287f31bd +drawvg-video ... [AVFilterGraph @ 00000214b5882940] No option name near '/msys64/tmp/ffmpeg-drawvg/tests/ref/lavf/drawvg.lines' [AVFilterGraph @ 00000214b5882940] Error parsing a filter description around: [AVFilterGraph @ 00000214b5882940] Error parsing filterchain 'scale,format=bgr0,drawvg=file=E:/msys64/tmp/ffmpeg-drawvg/tests/ref/lavf/drawvg.lines' around: ``` 4. After the patch: ```console $ make fate-filter-drawvg-video V=1 cp /tmp/ffmpeg-drawvg/tests/ref/lavf/drawvg.lines tests/data/fate/drawvg.lines TEST filter-drawvg-video /tmp/ffmpeg-drawvg/tests/fate-run.sh fate-filter-drawvg-video "" "" "/tmp/build0" 'video_filter scale,format=bgr0,drawvg=file=tests/data/fate/drawvg.lines' '' '' '' '1' '' '' '' '' '' '' '' '' '' '' /tmp/build0/ffmpeg.exe -nostdin -nostats -noauto_conversion_filters -cpuflags all -flags +bitexact -idct simple -sws_flags +accurate_rnd+bitexact -fflags +bitexact -threads 1 -f image2 -vcodec pgmyuv -hwaccel none -threads 1 -thread_type frame+slice -i /tmp/build0/tests/vsynth1/%02d.pgm -flags +bitexact -sws_flags +accurate_rnd+bitexact -fflags +bitexact -flags +bitexact -idct simple -sws_flags +accurate_rnd+bitexact -fflags +bitexact -threads 1 -dct fastint -vf scale,format=bgr0,drawvg=file=tests/data/fate/drawvg.lines -vcodec rawvideo -frames:v 5 -f nut md5: ``` Without `V=1`: ```console $ make fate-filter-drawvg-{interpreter,video} TEST filter-drawvg-interpreter TEST filter-drawvg-video $ echo $? 0 ``` >From fbe28941af52da893257168fee3196fd83be8885 Mon Sep 17 00:00:00 2001 From: Ayose <[email protected]> Date: Wed, 26 Nov 2025 22:00:39 +0000 Subject: [PATCH] tests/fate-filter-drawvg-video: copy drawvg.lines file to tests/data. If the SRC_PATH variable contains certain characters (like a `:`, which may happen when FATE is executed on Windows), the value for the `file` option is broken, so `make fate-filter-drawvg-video` always fails. The solution in this commit is to copy the `drawvg.lines` to the `tests/data` directory (which already has temp files), so the value for `file` is a fixed string with no problematic characters. Signed-off-by: Ayose <[email protected]> --- tests/fate/filter-video.mak | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/fate/filter-video.mak b/tests/fate/filter-video.mak index 3fe7f10476..087ba8d9cd 100644 --- a/tests/fate/filter-video.mak +++ b/tests/fate/filter-video.mak @@ -609,7 +609,10 @@ fate-filter-tiltandshift-410: CMD = framecrc -c:v pgmyuv -i $(SRC) -flags +bitex fate-filter-tiltandshift-422: CMD = framecrc -c:v pgmyuv -i $(SRC) -flags +bitexact -vf scale=sws_flags=+accurate_rnd+bitexact,format=yuv422p,tiltandshift fate-filter-tiltandshift-444: CMD = framecrc -c:v pgmyuv -i $(SRC) -flags +bitexact -vf scale=sws_flags=+accurate_rnd+bitexact,format=yuv444p,tiltandshift -DRAWVG_SCRIPT_LINES = $(SRC_PATH)/tests/ref/lavf/drawvg.lines +DRAWVG_SCRIPT_LINES = tests/data/fate/drawvg.lines +$(DRAWVG_SCRIPT_LINES): $(SRC_PATH)/tests/ref/lavf/drawvg.lines + $(M)cp $< $@ + FATE_FILTER_VSYNTH_VIDEO_FILTER-$(CONFIG_DRAWVG_FILTER) += fate-filter-drawvg-video fate-filter-drawvg-video: $(DRAWVG_SCRIPT_LINES) fate-filter-drawvg-video: CMD = video_filter scale,format=bgr0,drawvg=file=$(DRAWVG_SCRIPT_LINES) -- 2.49.1 _______________________________________________ ffmpeg-devel mailing list -- [email protected] To unsubscribe send an email to [email protected]
