[LTP] [PATCH v2] getrusage03: mlock all address space for process calling consume_mb
Li Wang
liwang@redhat.com
Thu Feb 17 07:59:19 CET 2022
On Wed, Feb 16, 2022 at 5:54 PM Cyril Hrubis <chrubis@suse.cz> wrote:
> Hi!
> > --- a/testcases/kernel/syscalls/getrusage/getrusage03.c
> > +++ b/testcases/kernel/syscalls/getrusage/getrusage03.c
> > @@ -193,4 +193,8 @@ static struct tst_test test = {
> > .setup = setup,
> > .test = run,
> > .tcnt = ARRAY_SIZE(testfunc_list),
> > + .caps = (struct tst_cap []) {
> > + TST_CAP(TST_CAP_REQ, CAP_IPC_LOCK),
> > + {}
> > + },
> > };
>
> I wonder if we should start to track the capabilities like this instead
> of the .needs_root approach. I guess that it may be useful to keep
> things granular in the future.
>
I think yes, Linux Capabilities makes it possible for specific privileges to
the test process, and avoid that .needs_root limited many tests scenario
to skip directly with non-root users. Especially beneficial for running LTP
in the docker with only part of root privileges for reasons like strict
security
verification.
--
Regards,
Li Wang
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linux.it/pipermail/ltp/attachments/20220217/4c771f19/attachment.htm>
More information about the ltp
mailing list