Skip to contentSkip to conversation

Miscellaneous fixes

PATCH In review Laurent Pinchart 2 participants 5 messages Mar 17 – Mar 24

lore
Share & tools
lore
#0 lore raw

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
#1 lore raw

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
index 85f3fdef69d1..2cabb9b96cde 100755
@@ -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
Reviewed-by on v1 1/2
#2 lore raw

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_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.

An easy one.

Quoted 22 lines
---
 scripts/vsp-lib.sh | 2 --
 1 file changed, 2 deletions(-)
scripts/vsp-lib.sh +0 -2
index 85f3fdef69d1..2cabb9b96cde 100755
@@ -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
#3 lore raw

PATCH 2/2 vsp-lib: Support newer versions of ImageMagick

In reply to Laurent Pinchart

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.

---
 scripts/vsp-lib.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
scripts/vsp-lib.sh +1 -1
index 2cabb9b96cde..c8f21c60741c 100755
@@ -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
Reviewed-by on v1 2/2
#4 lore raw

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
---
 scripts/vsp-lib.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
scripts/vsp-lib.sh +1 -1
index 2cabb9b96cde..c8f21c60741c 100755
@@ -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