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

Petr Vorel pvorel@suse.cz
Wed Aug 5 17:48:46 CEST 2026


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,
> +};


More information about the ltp mailing list