On 9/4/19 6:03 PM, Paul Moore wrote:
From: Paul Moore <paul@xxxxxxxxxxxxxx>
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@xxxxxxxxxxxxx>
Signed-off-by: Paul Moore <paul@xxxxxxxxxxxxxx>
Tested-by: Stephen Smalley <sds@xxxxxxxxxxxxx>
---
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";
}