Re: [PATCH v2 06/15] tests/exynos: introduce wait_for_user_input

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

 



On 16/02/15 13:46, Tobias Jakobi wrote:
> Currently getchar() is used to pause execution after each test.
> The user isn't informed if one is supposed to do anything for
> the tests to continue, so print a simple message to make this
> more clear.
> 
> Signed-off-by: Tobias Jakobi <tjakobi@xxxxxxxxxxxxxxxxxxxxx>
> ---
>  tests/exynos/exynos_fimg2d_test.c | 20 ++++++++++++++++----
>  1 file changed, 16 insertions(+), 4 deletions(-)
> 
> diff --git a/tests/exynos/exynos_fimg2d_test.c b/tests/exynos/exynos_fimg2d_test.c
> index 55d2970..446a6c6 100644
> --- a/tests/exynos/exynos_fimg2d_test.c
> +++ b/tests/exynos/exynos_fimg2d_test.c
> @@ -237,6 +237,18 @@ void *create_checkerboard_pattern(unsigned int num_tiles_x,
>  	return buf;
>  }
>  
> +static void wait_for_user_input(int last)
> +{
> +	printf("press <ENTER> to ");
> +
> +	if (last)
> +		printf("exit test application\n");
> +	else
> +		printf("skip to next test\n");
> +
If interested you can compact this as

	printf("press <ENTER> to %s\n", last ? "exit test application" :
	                                       "skip to next test");


Cheers
Emil
--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux SoC Development]     [Linux Rockchip Development]     [Linux USB Development]     [Video for Linux]     [Linux Audio Users]     [Linux SCSI]     [Yosemite News]

  Powered by Linux