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

Andrea Cervesato via ltp <[email protected]>
Newsgroups gmane.linux.ltp
Message-ID <[email protected]>
Hi Jinseok,

I can't understand the utility of this test honestly. We are
checking if an obsolete ABI [1] such as
/sys/devices/system/cpu/cpuidle/current_governor_ro is actually
readable. That's ok, it's still there at least. Also, we are not
checking the return value or if the file is not writable.

We also have other ABI [2] to test.

Said so, it would be better to _at least_ verify read/write and
return value of `enough` ABI inside /sys/devices/system/cpu/cpuidle/
which are not subject to drivers behaviours. In particular:

- available_governors (ro) — lists registered idle governors
- current_driver (ro) — shows the active cpuidle driver name
- current_governor (rw) — shows/sets the active idle governor
- current_governor_ro (ro) — read-only view of current governor

> +static void setup(void)
> +{
> +	if (access(CPUIDLE_PATH, R_OK))
> +		tst_brk(TCONF, "%s is not available", CPUIDLE_PATH);

Instead of this check we should use .save_restore with TST_SR_TCONF.

[1] https://www.kernel.org/doc/html/latest/admin-guide/abi-obsolete-files.html#abi-file-obsolete-sysfs-cpuidle
[2] https://www.kernel.org/doc/html/latest/admin-guide/abi-testing.html#abi-sys-devices-system-cpu-cpuidle-available-governors


Regards,
--
Andrea Cervesato
SUSE QE Automation Engineer Linux
[email protected]

-- 
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.