[VSP-Tests,2/7] tests: Provide copy test to validate 1xN streams
diff mbox series

Message ID 20181204155146.9726-3-kieran.bingham@ideasonboard.com
State New
Delegated to: Kieran Bingham
Headers show
Series
  • Reset controls and unloved patches
Related show

Commit Message

Kieran Bingham Dec. 4, 2018, 3:51 p.m. UTC
Validate that a 1xN stream can be read through the RPF and written
through the WPF.

The test framework does not currently support processing images where
the stride does not match the output width - so the testing is currently
limited to testing only the vertical direction in this aspect.

Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
---
 tests/vsp-unit-test-0025.sh | 45 +++++++++++++++++++++++++++++++++++++
 1 file changed, 45 insertions(+)
 create mode 100755 tests/vsp-unit-test-0025.sh

Comments

Laurent Pinchart Feb. 17, 2019, 2:47 a.m. UTC | #1
Hi Kieran,

Thank you for the patch.

On Tue, Dec 04, 2018 at 03:51:41PM +0000, Kieran Bingham wrote:
> Validate that a 1xN stream can be read through the RPF and written
> through the WPF.
> 
> The test framework does not currently support processing images where
> the stride does not match the output width - so the testing is currently
> limited to testing only the vertical direction in this aspect.
> 
> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
> ---
>  tests/vsp-unit-test-0025.sh | 45 +++++++++++++++++++++++++++++++++++++
>  1 file changed, 45 insertions(+)
>  create mode 100755 tests/vsp-unit-test-0025.sh
> 
> diff --git a/tests/vsp-unit-test-0025.sh b/tests/vsp-unit-test-0025.sh
> new file mode 100755
> index 000000000000..57a1fac6e369
> --- /dev/null
> +++ b/tests/vsp-unit-test-0025.sh
> @@ -0,0 +1,45 @@
> +#!/bin/sh
> +
> +#
> +# Test pipelines which have a single pixel dimension. Use a RPF -> WPF
> +# pipeline with identical input and output formats to generate our output.
> +#
> +
> +. ./vsp-lib.sh
> +
> +features="rpf.0 uds wpf.0"
> +formats="RGB24 ARGB32"
> +
> +# Input is directly copied to the output. No change in format or size.
> +test_copy() {
> +	local format=$1
> +	local insize=$2
> +
> +	test_start "copying $insize in $format"
> +
> +	pipe_configure rpf-wpf 0 0
> +	format_configure rpf-wpf 0 0 $format $insize $format
> +
> +	vsp_runner rpf.0 &
> +	vsp_runner wpf.0
> +
> +	local result=$(compare_frames)
> +
> +	test_complete $result
> +}
> +
> +test_main() {
> +	local format
> +
> +	for format in $formats ; do
> +		test_copy $format 1024x768
> +		test_copy $format 128x128
> +		test_copy $format 128x1

If the purpose is to test Nx1 and 1xN, do we need the first two
resolutions ? Shouldn't the test_start message describe the exact
purpose ?

> +
> +		# Skipped : Test framework does not yet support strides != width
> +		#test_copy $format 1x128
> +	done
> +}
> +
> +test_init $0 "$features"
> +test_run
Kieran Bingham Feb. 17, 2019, 8:43 p.m. UTC | #2
Hi Laurent,

On 17/02/2019 02:47, Laurent Pinchart wrote:
> Hi Kieran,
> 
> Thank you for the patch.
> 
> On Tue, Dec 04, 2018 at 03:51:41PM +0000, Kieran Bingham wrote:
>> Validate that a 1xN stream can be read through the RPF and written
>> through the WPF.
>>
>> The test framework does not currently support processing images where
>> the stride does not match the output width - so the testing is currently
>> limited to testing only the vertical direction in this aspect.
>>
>> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
>> ---
>>  tests/vsp-unit-test-0025.sh | 45 +++++++++++++++++++++++++++++++++++++
>>  1 file changed, 45 insertions(+)
>>  create mode 100755 tests/vsp-unit-test-0025.sh
>>
>> diff --git a/tests/vsp-unit-test-0025.sh b/tests/vsp-unit-test-0025.sh
>> new file mode 100755
>> index 000000000000..57a1fac6e369
>> --- /dev/null
>> +++ b/tests/vsp-unit-test-0025.sh
>> @@ -0,0 +1,45 @@
>> +#!/bin/sh
>> +
>> +#
>> +# Test pipelines which have a single pixel dimension. Use a RPF -> WPF
>> +# pipeline with identical input and output formats to generate our output.
>> +#
>> +
>> +. ./vsp-lib.sh
>> +
>> +features="rpf.0 uds wpf.0"
>> +formats="RGB24 ARGB32"
>> +
>> +# Input is directly copied to the output. No change in format or size.
>> +test_copy() {
>> +	local format=$1
>> +	local insize=$2
>> +
>> +	test_start "copying $insize in $format"
>> +
>> +	pipe_configure rpf-wpf 0 0
>> +	format_configure rpf-wpf 0 0 $format $insize $format
>> +
>> +	vsp_runner rpf.0 &
>> +	vsp_runner wpf.0
>> +
>> +	local result=$(compare_frames)
>> +
>> +	test_complete $result
>> +}
>> +
>> +test_main() {
>> +	local format
>> +
>> +	for format in $formats ; do
>> +		test_copy $format 1024x768
>> +		test_copy $format 128x128
>> +		test_copy $format 128x1
> 
> If the purpose is to test Nx1 and 1xN, do we need the first two
> resolutions ? Shouldn't the test_start message describe the exact
> purpose ?

Hrm ... It's been too long. I don't recall if the first two were a
copy/paste left-over or if they had more meaning.

They don't look like they have much meaning now though - so they can be
removed. I'm all for speeding up the full test-suite :-)


> 
>> +
>> +		# Skipped : Test framework does not yet support strides != width
>> +		#test_copy $format 1x128
>> +	done
>> +}
>> +
>> +test_init $0 "$features"
>> +test_run
>

Patch
diff mbox series

diff --git a/tests/vsp-unit-test-0025.sh b/tests/vsp-unit-test-0025.sh
new file mode 100755
index 000000000000..57a1fac6e369
--- /dev/null
+++ b/tests/vsp-unit-test-0025.sh
@@ -0,0 +1,45 @@ 
+#!/bin/sh
+
+#
+# Test pipelines which have a single pixel dimension. Use a RPF -> WPF
+# pipeline with identical input and output formats to generate our output.
+#
+
+. ./vsp-lib.sh
+
+features="rpf.0 uds wpf.0"
+formats="RGB24 ARGB32"
+
+# Input is directly copied to the output. No change in format or size.
+test_copy() {
+	local format=$1
+	local insize=$2
+
+	test_start "copying $insize in $format"
+
+	pipe_configure rpf-wpf 0 0
+	format_configure rpf-wpf 0 0 $format $insize $format
+
+	vsp_runner rpf.0 &
+	vsp_runner wpf.0
+
+	local result=$(compare_frames)
+
+	test_complete $result
+}
+
+test_main() {
+	local format
+
+	for format in $formats ; do
+		test_copy $format 1024x768
+		test_copy $format 128x128
+		test_copy $format 128x1
+
+		# Skipped : Test framework does not yet support strides != width
+		#test_copy $format 1x128
+	done
+}
+
+test_init $0 "$features"
+test_run