public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: Petr Vorel <pvorel@suse.cz>
To: Li Wang <liwang@redhat.com>
Cc: Mete Durlu <meted@linux.ibm.com>, ltp@lists.linux.it
Subject: Re: [LTP] [PATCH 1/2] lib: Add tst_selinux_enforcing()
Date: Wed, 20 Mar 2024 08:56:05 +0100	[thread overview]
Message-ID: <20240320075605.GA457754@pevik> (raw)
In-Reply-To: <CAEemH2eRspxMmD4LEQ-ospJES2BWAHLqhviX_1uSM=-eefnQug@mail.gmail.com>

Hi Li, all,

> Hi Petr,

> On Wed, Mar 20, 2024 at 2:32 PM Petr Vorel <pvorel@suse.cz> wrote:

> > Co-developed-by: Mete Durlu <meted@linux.ibm.com>
> > Signed-off-by: Petr Vorel <pvorel@suse.cz>


> This patch is doing the same work as security_getenforce() which provides
> by 'selinux/selinux.h', but it is still worth having it because we do not
> want ltp
> has many extra dependencies (e.g. libselinux-devel).

+1

> Reviewed-by: Li Wang <liwang@redhat.com>

Thanks!

> > ---
> > Hi,

> > @Li, Cyril:
> > 1) I guess we want to distinguish EACCES for SELinux enforcing, right?
> > If not, this commit would be dropped and second commit would just use

> >         const int exp_errs[] = {tc->expected_errno, EACCES};

> >         TST_EXP_FAIL_ARR(fanotify_mark(fanotify_fd, FAN_MARK_ADD |
> > tc->mark.flags,
> >                          tc->mask.flags, dirfd, path),
> >                          exp_errs);

> > 2) Some time ago I proposed to merge some lib/*.c files, not
> > just have so many files with single functions in the library. E.g.
> > lib/tst_fips.c, lib/tst_selinux.c, lib/tst_lockdown.c could be merged
> > into lib/tst_security.c. Or do we want to have these separate?


> I think the answer is Yes. There are more and more lib/*.c files with

I read "Yes" as to keep lib/tst_selinux.c, lib/tst_lockdown.c as separate.

I'm not sure myself (quite separate things, although they are all "security"),
what bothers me more are these tst_dir_is_empty.c, tst_path_has_mnt_flags.c
files.

> some trivial features, which bring troubles for reading/managing the
> library. It is necessary to archive and merge the same thing.


> > When I proposed this, I wanted to merge files, which have the same name
> > as the single function in the file (e.g. tst_dir_is_empty.c,
> > tst_path_has_mnt_flags.c), having them as single file does not help much
> > with searching for the content.


> +1

> And the most important is we need to give a good name for the
> achieved header file.

+1

Kind regards,
Petr

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

  reply	other threads:[~2024-03-20  7:56 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-20  6:32 [LTP] [PATCH 1/2] lib: Add tst_selinux_enforcing() Petr Vorel
2024-03-20  6:32 ` [LTP] [PATCH v3 2/2] fanotify14: fix anonymous pipe testcases Petr Vorel
2024-03-20  6:59   ` Amir Goldstein
2024-03-20  9:01   ` Mete Durlu
2024-03-20 12:11   ` Jan Kara
2024-03-20  7:31 ` [LTP] [PATCH 1/2] lib: Add tst_selinux_enforcing() Li Wang
2024-03-20  7:56   ` Petr Vorel [this message]
2024-03-20  8:04     ` Li Wang
2024-03-20  8:54       ` 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=20240320075605.GA457754@pevik \
    --to=pvorel@suse.cz \
    --cc=liwang@redhat.com \
    --cc=ltp@lists.linux.it \
    --cc=meted@linux.ibm.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