[LTP] [PATCH 07/10] perf_event_open02: Add max_runtime

Cyril Hrubis chrubis@suse.cz
Wed Aug 31 12:07:45 CEST 2022


Hi!
> Signed-off-by: Martin Doucha <mdoucha@suse.cz>
> ---
>  testcases/kernel/syscalls/perf_event_open/perf_event_open02.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/testcases/kernel/syscalls/perf_event_open/perf_event_open02.c b/testcases/kernel/syscalls/perf_event_open/perf_event_open02.c
> index 618a27016..b96578369 100644
> --- a/testcases/kernel/syscalls/perf_event_open/perf_event_open02.c
> +++ b/testcases/kernel/syscalls/perf_event_open/perf_event_open02.c
> @@ -334,4 +334,5 @@ static struct tst_test test = {
>  	},
>  	.test_all = verify,
>  	.needs_root = 1,
> +	.max_runtime = 15
>  };

We do spend significant part of the runtime in the setup while we count
hardware counters so if we are going to add .setup_max_runtime this
should something as:

..
	.setup_max_runtime = 64,
	.max_runtime = 8,
...


Technically the maximal time the setup can run is MAX_CTRS * 2 but I do
not think that we will see hardware with more than 32 hardware counters
anytime soon if ever.

-- 
Cyril Hrubis
chrubis@suse.cz


More information about the ltp mailing list