From: Andrea Cervesato via ltp <ltp@lists.linux.it>
To: "Jinseok Kim" <always.starving0@gmail.com>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [PATCH v5] power_management: rewrite runpwtests04.sh in C
Date: Mon, 15 Jun 2026 08:21:45 +0000 [thread overview]
Message-ID: <6a2fb61a.53cb9477.13cf23.546d@mx.google.com> (raw)
In-Reply-To: <20260612171415.988-1-always.starving0@gmail.com>
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
andrea.cervesato@suse.com
--
Mailing list info: https://lists.linux.it/listinfo/ltp
prev parent reply other threads:[~2026-06-15 8:22 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-12 17:13 [LTP] [PATCH v5] power_management: rewrite runpwtests04.sh in C Jinseok Kim
2026-06-12 19:09 ` [LTP] " linuxtestproject.agent
2026-06-15 8:21 ` Andrea Cervesato via ltp [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=6a2fb61a.53cb9477.13cf23.546d@mx.google.com \
--to=ltp@lists.linux.it \
--cc=always.starving0@gmail.com \
--cc=andrea.cervesato@suse.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.