GNU bug report logs -
#8359
[PATCH] Unit tests: Properly detect whether SELinux is enabled or not.
Previous Next
Full log
Message #11 received at 8359 <at> debbugs.gnu.org (full text, mbox):
On Mon, 2011-03-28 at 09:54 +0200, Jim Meyering wrote:
> Mathieu Bridon wrote:
[... snip ...]
> > A better way to test if SELinux is enabled is to search for the SELinux
> > filesystem (see the above bug report). This is what this commit does.
>
> Thank you for the diagnosis and patch.
> However, I can't use that as-is, since removing the existing test would
> mistakenly enable guaranteed-to-fail tests that are run from a file system
> that does not support SELinux on a system for which it is enabled.
Right, I didn't think about this case. :-/
> Hmm... actually, I now have mixed feelings about this change.
> Having SELinux enabled for id --context is conceptually a very
> different thing from having an SELinux-enabled file system.
> Now, I'm thinking that your new condition should guard only the id-context
> test, rather than causing us to skip all FS-context-requiring tests.
> In your environment, does any test other than id-context fail without
> this patch?
Yes, 3 tests are failing:
- misc/id-context
- id/no-context
- install/install-C-selinux
The three are skipped (which is expected) after applying the patch I
submitted. I didn't try with your version of the patch, but looking at
it I think it's safe to assume they would be skipped as well.
--
Mathieu
This bug report was last modified 14 years and 64 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.