Re: [PATCH v2] tests: Provide {un,}bind testing

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Kieran,

Thank you for the patch.

On Wed, Sep 16, 2020 at 03:18:15PM +0100, Kieran Bingham wrote:
> Perform unbind-bind testing of the VSP devices to validate
> successful removal of the drivers.

This unbinds all VSP instances, including the ones used by the DU and
not exposed through V4L2. What happens to the display ?

> Signed-off-by: Kieran Bingham <kieran.bingham@xxxxxxxxxxxxxxxx>
> Reviewed-by: Laurent Pinchart <laurent.pinchart@xxxxxxxxxxxxxxxx>
> ---
> 
> v2:
>  - Semi-colons removed
>  - duplicated tests removed.
> 
> This is the updated patch, I intend to push to master.
> 
> --
> Kieran
> 
> 
>  tests/vsp-unit-test-0026.sh | 55 +++++++++++++++++++++++++++++++++++++
>  1 file changed, 55 insertions(+)
>  create mode 100755 tests/vsp-unit-test-0026.sh
> 
> diff --git a/tests/vsp-unit-test-0026.sh b/tests/vsp-unit-test-0026.sh
> new file mode 100755
> index 000000000000..0e013cec881b
> --- /dev/null
> +++ b/tests/vsp-unit-test-0026.sh
> @@ -0,0 +1,55 @@
> +#!/bin/sh
> +
> +#
> +# Test unbinding and binding all VSP1 devices, performing a simple
> +# copy test to validate the hardware afterwards.
> +#
> +
> +. ./vsp-lib.sh
> +
> +features="rpf.0 wpf.0"
> +
> +vsp1_driver=/sys/bus/platform/drivers/vsp1
> +vsps=$(cd /sys/bus/platform/devices/; ls | grep vsp)
> +
> +unbind_vsp() {
> +	echo $1 > $vsp1_driver/unbind
> +}
> +
> +bind_vsp() {
> +	echo $1 > $vsp1_driver/bind
> +}
> +
> +# Input is directly copied to the output. No change in format or size.
> +test_copy() {
> +	local format=$1
> +	local insize=$2
> +
> +	test_start "simple hardware validation after unbind/bind cycles"
> +
> +	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
> +
> +	# Unbind and rebind VSPs individually
> +	for v in $vsps; do
> +		unbind_vsp $v
> +		bind_vsp $v
> +	done
> +
> +	# Perform a simple copy test to validate HW is alive
> +	test_copy RGB24 128x128
> +}
> +
> +test_init $0 "$features"
> +test_run

-- 
Regards,

Laurent Pinchart



[Index of Archives]     [Linux Samsung SOC]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux