Miscellaneous fixes
cover Miscellaneous fixes
Hello,
This small series fixes two issues with the vsp-tests. Patch 1/2 is a small cleanup, while patch 2/2 fixes tests with newer versions of ImageMagick.
Laurent Pinchart (2):
vsp-lib: Drop unused variable
vsp-lib: Support newer versions of ImageMagick
scripts/vsp-lib.sh | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
base-commit: f1327dc9a2cfaf3577ca30334e161e5e35ef5651
Signature · 3 lines
Regards, Laurent Pinchart
PATCH 1/2 vsp-lib: Drop unused variable
The vsp_runner variable is set to point to the vsp-runner.sh script, which has been removed in commit 306c53b308c2 ("vsp-lib: Replace vsp-runner script with a function from vsp-lib"). The variable is unused, drop it.
--- scripts/vsp-lib.sh | 2 -- 1 file changed, 2 deletions(-)
scripts/vsp-lib.sh +0 -2
@@ -1105,8 +1105,6 @@ test_init() { # Reset any rotation or flipping controls vsp1_reset_controls wpf.0 - - vsp_runner=./vsp-runner.sh } test_start() {
Signature · 3 lines
Regards, Laurent Pinchart
Re: [vsp-tests] [PATCH 1/2] vsp-lib: Drop unused variable
Quoting Laurent Pinchart (2026-03-17 20:04:12)
Quoted 6 lines
The
vsp_runnervariable is set to point to thevsp-runner.shscript, which has been removed in commit306c53b308c2("vsp-lib: Replace vsp-runner script with a function from vsp-lib"). The variable is unused, drop it.Signed-off-by Laurent Pinchart <[email protected]>
An easy one.
Quoted 22 lines
--- scripts/vsp-lib.sh | 2 -- 1 file changed, 2 deletions(-)scripts/vsp-lib.sh +0
-2@@ -1105,8 +1105,6 @@ test_init() { # Reset any rotation or flipping controls vsp1_reset_controls wpf.0 - - vsp_runner=./vsp-runner.sh } test_start() {Signature · 3 lines
Regards, Laurent Pinchart
PATCH 2/2 vsp-lib: Support newer versions of ImageMagick
In reply to Laurent PinchartThe ImageMagick compare tool has changed the output format of the absolute error metric. It now prints, in addition to the absolute error, the error divided by the number of pixels. This causes failures in the output parsing code. Fix it.
A careful reader could notice that the script divides the absolute error by the number of pixels, essentially duplicating the calculation done by ImageMagick. We could instead use the scaled value output by the compare tool, but we would lose support for older versions of ImageMagick.
--- scripts/vsp-lib.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
scripts/vsp-lib.sh +1 -1
@@ -264,7 +264,7 @@ compare_frame_fuzzy() { raw2rgbpnm -f $fmt -s $size $img_a $ppm_a > /dev/null raw2rgbpnm -f $fmt -s $size $img_b $ppm_b > /dev/null - local ae=$(compare -metric ae $ppm_a $ppm_b /dev/null 2>&1) + local ae=$(compare -metric ae $ppm_a $ppm_b /dev/null 2>&1 | sed 's/ (.*//') local mae=$(compare -metric mae $ppm_a $ppm_b /dev/null 2>&1 | sed 's/.*(\(.*\))/\1/') rm $ppm_a
Signature · 3 lines
Regards, Laurent Pinchart
Re: [vsp-tests] [PATCH 2/2] vsp-lib: Support newer versions of ImageMagick
Quoting Laurent Pinchart (2026-03-17 20:04:13)
Quoted 10 lines
The ImageMagick compare tool has changed the output format of the absolute error metric. It now prints, in addition to the absolute error, the error divided by the number of pixels. This causes failures in the output parsing code. Fix it.
A careful reader could notice that the script divides the absolute error by the number of pixels, essentially duplicating the calculation done by ImageMagick. We could instead use the scaled value output by the compare tool, but we would lose support for older versions of ImageMagick.
Quoted 23 lines
Signed-off-by Laurent Pinchart <[email protected]>--- scripts/vsp-lib.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)scripts/vsp-lib.sh +1
-1@@ -264,7 +264,7 @@ compare_frame_fuzzy() { raw2rgbpnm -f $fmt -s $size $img_a $ppm_a > /dev/null raw2rgbpnm -f $fmt -s $size $img_b $ppm_b > /dev/null - local ae=$(compare -metric ae $ppm_a $ppm_b /dev/null 2>&1) + local ae=$(compare -metric ae $ppm_a $ppm_b /dev/null 2>&1 | sed 's/ (.*//') local mae=$(compare -metric mae $ppm_a $ppm_b /dev/null 2>&1 | sed 's/.*(\(.*\))/\1/') rm $ppm_aSignature · 3 lines
Regards, Laurent Pinchart