bug#8359: [PATCH] Unit tests: Properly detect whether SELinux is enabled or not.

2011-03-28 Thread Mathieu Bridon
The unit tests would run ls to see if the files had an SELinux context, and would assume SELinux is enabled if they did. This is not ideal, and can cause test failures in some environments: https://bugzilla.redhat.com/show_bug.cgi?id=573111#c26 The problem in the case of the above bug report

bug#8359: [PATCH] Unit tests: Properly detect whether SELinux is enabled or not.

2011-03-28 Thread Jim Meyering
Mathieu Bridon wrote: The unit tests would run ls to see if the files had an SELinux context, and would assume SELinux is enabled if they did. This is not ideal, and can cause test failures in some environments: https://bugzilla.redhat.com/show_bug.cgi?id=573111#c26 The problem in the

bug#8359: [PATCH] Unit tests: Properly detect whether SELinux is enabled or not.

2011-03-28 Thread Mathieu Bridon
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

bug#8359: [PATCH] Unit tests: Properly detect whether SELinux is enabled or not.

2011-03-28 Thread Jim Meyering
Mathieu Bridon wrote: 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

bug#8370: RFC: cp --no-preserve=contents

2011-03-28 Thread Eric Blake
cp --attributes-only is great for preserving all metadata attributes without corrupting contents, but what if I want to preserve only some of the metadata (for example, copying SELinux context but _not_ timestamps or content)? It seems like --attributes-only would be a great synonym for