[igt-dev] [PATCH i-g-t v4 77/77] igt_core: add a line break at the end of some internal_assert

Kamil Konieczny kamil.konieczny at linux.intel.com
Wed Oct 5 08:42:18 UTC 2022


On 2022-10-05 at 09:45:46 +0200, Mauro Carvalho Chehab wrote:
> From: Mauro Carvalho Chehab <mchehab at kernel.org>
> 
> The logic which prints internal_assert expects a line break, as
> otherwise it would print things like:
> 
> 	must only be called outside of a subtestplease refer to lib/igt_core documentation
> 
> So, add a \n on a couple of places that it is missing it.
> 
> Signed-off-by: Mauro Carvalho Chehab <mchehab at kernel.org>

Reviewed-by: Kamil Konieczny <kamil.konieczny at linux.intel.com>

> ---
>  lib/igt_core.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/lib/igt_core.c b/lib/igt_core.c
> index dc6486c841f0..2aee0d0802fd 100644
> --- a/lib/igt_core.c
> +++ b/lib/igt_core.c
> @@ -627,7 +627,7 @@ uint64_t igt_nsec_elapsed(struct timespec *start)
>  void __igt_assert_in_outer_scope(void)
>  {
>  	internal_assert(!in_subtest,
> -			"must only be called outside of a subtest");
> +			"must only be called outside of a subtest\n");
>  }
>  
>  bool __igt_fixture(void)
> @@ -1688,7 +1688,7 @@ void igt_fail(int exitcode)
>  		exit_subtest("FAIL");
>  	} else {
>  		internal_assert(igt_can_fail(), "failing test is only allowed"
> -				" in fixtures, subtests and igt_simple_main");
> +				" in fixtures, subtests and igt_simple_main\n");
>  
>  		if (in_fixture) {
>  			skip_subtests_henceforth = FAIL;
> @@ -1755,7 +1755,7 @@ void igt_describe_f(const char *fmt, ...)
>  
>  	internal_assert(!in_subtest || _igt_dynamic_tests_executed < 0,
>  			"documenting dynamic subsubtests is impossible,"
> -			" document the subtest instead.");
> +			" document the subtest instead.\n");
>  
>  	if (!describe_subtests)
>  		return;
> -- 
> 2.37.3
> 


More information about the igt-dev mailing list