[LTP] [PATCH v2 04/16] API/cgroup: Implement tst_cgroup_load_config()
Richard Palethorpe
rpalethorpe@suse.de
Mon Jan 24 13:05:19 CET 2022
Hello Luke,
Luke Nowakowski-Krijger <luke.nowakowskikrijger@canonical.com> writes:
> Implement tst_cgroup_load_config which consumes the state given by
> tst_cgroup_print_config() to update the internal test state to reflect
> the given config.
>
> This allows for programs using the cgroup C API to load and reload
> state, allowing functionality such as calling tst_cgroup_require and
> tst_cgroup_cleanup to function properly between programs or between
> invocations of a binary using the C API.
I'm afraid I have to say this looks way more complicated than it needs
to be. We control the input format after all.
If you can make each line the same format then it may be possible to
just use a single scanf on each line. Note that it's only possible to
have ~14 controllers, so we can even afford to repeat the root info on
each line.
--
Thank you,
Richard.
More information about the ltp
mailing list