Re: [LTP] [PATCH v8] power_management: rewrite runpwtests04.sh in C

Petr Vorel <[email protected]>
Newsgroups it.linux.lists.ltp
Message-ID <20260805154846.GC649402@pevik>
Hi Jinseok Kim,

> +static void run(void)
> +{
> +	check_available_governors();
> +	check_current_driver();
> +	check_current_governor();
> +	check_current_governor_ro();
please instead of this and .test_all use a test struct, the way we use in
basically any test, see e.g.
testcases/kernel/syscalls/mbind/mbind01.c
testcases/kernel/syscalls/bind/bind01.c

then you'll use:
    .tcnt = ARRAY_SIZE(tcase),
    .test = do_test

Kind regards,
Petr

> +}
> +
> +static struct tst_test test = {
> +	.test_all = run,
> +	.needs_root = 1,
> +};

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.