* [PATCH] selinux-testsuite: don't break the system after running the cgroups_label tests
@ 2019-09-04 22:03 Paul Moore
2019-09-05 12:24 ` Stephen Smalley
0 siblings, 1 reply; 3+ messages in thread
From: Paul Moore @ 2019-09-04 22:03 UTC (permalink / raw)
To: selinux
From: Paul Moore <paul@paul-moore.com>
Commit be0ca8feeb9b ("selinux-testsuite: ensure the cgroups_label
tests works on old and new systems"), and perhaps an earlier related
commit, broke systems after the tests were run by operating on
/sys/fs/cgroup/unified directly and not a sub-directory. Fix this
by restoring the old (sub-directory) behavior.
Reported-by: Stephen Smalley <sds@tycho.nsa.gov>
Signed-off-by: Paul Moore <paul@paul-moore.com>
---
0 files changed
diff --git a/tests/cgroupfs_label/test b/tests/cgroupfs_label/test
index 13f0434..3accca0 100755
--- a/tests/cgroupfs_label/test
+++ b/tests/cgroupfs_label/test
@@ -6,8 +6,11 @@ BEGIN { plan tests => 2 }
my $ret;
# Older systems use /sys/fs/cgroup/unified, newer use /sys/fs/cgroup.
-my $dir = "/sys/fs/cgroup/unified";
-if ( !-d $dir ) {
+my $dir;
+if ( -d "/sys/fs/cgroup/unified" ) {
+ $dir = "/sys/fs/cgroup/unified/selinuxtest";
+}
+else {
$dir = "/sys/fs/cgroup/selinuxtest";
}
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] selinux-testsuite: don't break the system after running the cgroups_label tests
2019-09-04 22:03 [PATCH] selinux-testsuite: don't break the system after running the cgroups_label tests Paul Moore
@ 2019-09-05 12:24 ` Stephen Smalley
2019-09-05 20:23 ` Paul Moore
0 siblings, 1 reply; 3+ messages in thread
From: Stephen Smalley @ 2019-09-05 12:24 UTC (permalink / raw)
To: Paul Moore, selinux
On 9/4/19 6:03 PM, Paul Moore wrote:
> From: Paul Moore <paul@paul-moore.com>
>
> Commit be0ca8feeb9b ("selinux-testsuite: ensure the cgroups_label
> tests works on old and new systems"), and perhaps an earlier related
> commit, broke systems after the tests were run by operating on
> /sys/fs/cgroup/unified directly and not a sub-directory. Fix this
> by restoring the old (sub-directory) behavior.
>
> Reported-by: Stephen Smalley <sds@tycho.nsa.gov>
> Signed-off-by: Paul Moore <paul@paul-moore.com>
Tested-by: Stephen Smalley <sds@tycho.nsa.gov>
> ---
> 0 files changed
That's a little odd.
>
> diff --git a/tests/cgroupfs_label/test b/tests/cgroupfs_label/test
> index 13f0434..3accca0 100755
> --- a/tests/cgroupfs_label/test
> +++ b/tests/cgroupfs_label/test
> @@ -6,8 +6,11 @@ BEGIN { plan tests => 2 }
> my $ret;
>
> # Older systems use /sys/fs/cgroup/unified, newer use /sys/fs/cgroup.
> -my $dir = "/sys/fs/cgroup/unified";
> -if ( !-d $dir ) {
> +my $dir;
> +if ( -d "/sys/fs/cgroup/unified" ) {
> + $dir = "/sys/fs/cgroup/unified/selinuxtest";
> +}
> +else {
> $dir = "/sys/fs/cgroup/selinuxtest";
> }
>
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] selinux-testsuite: don't break the system after running the cgroups_label tests
2019-09-05 12:24 ` Stephen Smalley
@ 2019-09-05 20:23 ` Paul Moore
0 siblings, 0 replies; 3+ messages in thread
From: Paul Moore @ 2019-09-05 20:23 UTC (permalink / raw)
To: Stephen Smalley; +Cc: selinux
On Thu, Sep 5, 2019 at 8:24 AM Stephen Smalley <sds@tycho.nsa.gov> wrote:
> On 9/4/19 6:03 PM, Paul Moore wrote:
> > From: Paul Moore <paul@paul-moore.com>
> >
> > Commit be0ca8feeb9b ("selinux-testsuite: ensure the cgroups_label
> > tests works on old and new systems"), and perhaps an earlier related
> > commit, broke systems after the tests were run by operating on
> > /sys/fs/cgroup/unified directly and not a sub-directory. Fix this
> > by restoring the old (sub-directory) behavior.
> >
> > Reported-by: Stephen Smalley <sds@tycho.nsa.gov>
> > Signed-off-by: Paul Moore <paul@paul-moore.com>
>
> Tested-by: Stephen Smalley <sds@tycho.nsa.gov>
Merged, thanks.
> > ---
> > 0 files changed
>
> That's a little odd.
Huh, yes it is ... ? Not sure what happened here, but that part is
automatically generated by 'stg mail'. I don't see the same problem
(missing diffstat) on the other patch I sent last night, so I'm not
going to worry too much about it, but I'll keep an eye on it.
> > diff --git a/tests/cgroupfs_label/test b/tests/cgroupfs_label/test
> > index 13f0434..3accca0 100755
> > --- a/tests/cgroupfs_label/test
> > +++ b/tests/cgroupfs_label/test
> > @@ -6,8 +6,11 @@ BEGIN { plan tests => 2 }
> > my $ret;
> >
> > # Older systems use /sys/fs/cgroup/unified, newer use /sys/fs/cgroup.
> > -my $dir = "/sys/fs/cgroup/unified";
> > -if ( !-d $dir ) {
> > +my $dir;
> > +if ( -d "/sys/fs/cgroup/unified" ) {
> > + $dir = "/sys/fs/cgroup/unified/selinuxtest";
> > +}
> > +else {
> > $dir = "/sys/fs/cgroup/selinuxtest";
> > }
--
paul moore
www.paul-moore.com
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-09-05 20:24 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-04 22:03 [PATCH] selinux-testsuite: don't break the system after running the cgroups_label tests Paul Moore
2019-09-05 12:24 ` Stephen Smalley
2019-09-05 20:23 ` Paul Moore
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).