From: Petr Vorel <pvorel@suse.cz>
To: Cyril Hrubis <chrubis@suse.cz>
Cc: Richard Palethorpe <rpalethorpe@suse.com>,
"ltp@lists.linux.it" <ltp@lists.linux.it>
Subject: Re: [LTP] [PATCH 1/1] lib: Skip tst_{disable, enable}_oom_protection() for non-root
Date: Wed, 22 Dec 2021 11:24:25 +0100 [thread overview]
Message-ID: <YcL82UGphHruor3+@pevik> (raw)
In-Reply-To: <YcL5XG6azJuGTys7@yuki>
Hi Cyril, all,
> Hi!
> > > >>> This is not working as expected in Github CI. I'm still looking at the
> > > >>> problem.
> > > https://github.com/wangli5665/ltp/runs/4602025797?check_suite_focus=true
> > > >> I tested local but it works well. I guess ci fails because of linux user
> > > >> namespace. Maybe we should require CAP_SYS_RESOURCE cap instead of using
> > > >> geteuid.
> > > > Good catch, verifying.
> > > You can refer to my ltp fork
> > > https://github.com/xuyang0410/ltp/commits/oom_kill_ci_fixes
> > +1
> > I was thinking of adding the permission but that's
> > might not be a good way for the namespace. Like your
> > method which only does check and return is better.
> Wouldn't it be actually easier just to catch the error from the actual
> write? The whole problem here is that we use SAFE_PRINTF() on something
> that may actualy fail and the failure shouldn't be fatal at all.
We use just FILE_PRINTF(), but we check the result and TWARN, which causes the
failure in CI.
I've sent v2, which checks CAP_SYS_ADMIN and CAP_SYS_RESOURCE,
but feel free just to bring simpler solution.
Kind regards,
Petr
--
Mailing list info: https://lists.linux.it/listinfo/ltp
next prev parent reply other threads:[~2021-12-22 10:24 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-21 19:35 [LTP] [PATCH 1/1] lib: Skip tst_{disable, enable}_oom_protection() for non-root Petr Vorel
2021-12-22 2:25 ` xuyang2018.jy
2021-12-22 3:32 ` Li Wang
2021-12-22 6:05 ` xuyang2018.jy
2021-12-22 8:14 ` Petr Vorel
2021-12-22 8:37 ` xuyang2018.jy
2021-12-22 9:48 ` Li Wang
2021-12-22 10:09 ` Cyril Hrubis
2021-12-22 10:24 ` Petr Vorel [this message]
2021-12-22 10:40 ` Cyril Hrubis
2021-12-22 10:48 ` Petr Vorel
2021-12-22 11:29 ` Li Wang
2021-12-22 11:32 ` Li Wang
2021-12-22 11:25 ` Li Wang
2021-12-22 10:38 ` Petr Vorel
2021-12-22 8:06 ` Petr Vorel
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=YcL82UGphHruor3+@pevik \
--to=pvorel@suse.cz \
--cc=chrubis@suse.cz \
--cc=ltp@lists.linux.it \
--cc=rpalethorpe@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox