[LTP] [PATCH] keyctl02: make use of .max_runtime

Cyril Hrubis chrubis@suse.cz
Fri Nov 18 14:39:40 CET 2022


Hi!
> --- a/testcases/kernel/syscalls/keyctl/keyctl02.c
> +++ b/testcases/kernel/syscalls/keyctl/keyctl02.c
> @@ -81,6 +81,11 @@ static void do_test(void)
>  		SAFE_PTHREAD_JOIN(pth[1], NULL);
>  		SAFE_PTHREAD_JOIN(pth[2], NULL);
>  		SAFE_PTHREAD_JOIN(pth[3], NULL);
> +
> +		if (!tst_remaining_runtime()) {
> +			tst_res(TINFO, "Runtime exhausted, exiting at %i looping times", i);
                                                              ^
							      maybe it
							      would be
							      better:
							      "exiting after %i loops"
> +			break;
> +		}
>  	}

Other than that:

Reviewed-by: Cyril Hrubis <chrubis@suse.cz>

-- 
Cyril Hrubis
chrubis@suse.cz


More information about the ltp mailing list