[LTP] [PATCH v1] fanotify14: fix anonymous pipe testcases

Amir Goldstein amir73il@gmail.com
Mon Mar 11 17:08:53 CET 2024


On Mon, Mar 11, 2024 at 4:53 PM Mete Durlu <meted@linux.ibm.com> wrote:
>
> On 3/8/24 14:39, Amir Goldstein wrote:
> > On Fri, Mar 8, 2024 at 2:43 PM Mete Durlu <meted@linux.ibm.com> wrote:
> >>
> >> When SElinux is configured (comes out of the box on most distros) and
> >> is configured to enforcing (the default configuration), tests related
> >> to anonymous pipes return EACCES instead of the expected errno EINVAL.
> >> Fix the failures caused by the above condition by checking the SElinux
> >> configuration and adjusting the errno accordingly.
> >
> > Hi Mete,
> >
> > Isn't the outcome of the test dependent on the SEpolicy rules?
> > Not only if it is enforced?
> >
> > Sorry I have very little experience with SELinux.
> >
>
> Hi Amir,
>
> I don't have SElinux experience either, on my proposed patch I only
> considered the default behavior but you are right different SElinux
> configurations may lead to different outcomes. I skimmed over SElinux
> wiki a little and now I think trying to verify the SElinux policy would
> be too cumbersome. Instead I propose two different solutions.
>
> 1. We can skip the anonymous pipe test cases when SElinux is in
>     enforcing state.
>
> or
>
> 2. We can accept both EACESS and EINVAL as valid errnos when SElinux is
>     in enforcing state.
>
> Personally option 2 sounds better to me since we would get more coverage
> that way. If either way sounds good I can send a v2 right away. How does
> that sound?

option 2 sounds good to me.

Thanks,
Amir.


More information about the ltp mailing list