diff options
author | Jim Meyering <meyering@redhat.com> | 2008-04-30 23:24:41 +0200 |
---|---|---|
committer | Jim Meyering <meyering@redhat.com> | 2008-04-30 23:29:22 +0200 |
commit | a892af0d48b47a445fda12a1e889f1a7f3cd5907 (patch) | |
tree | dc2810c5793135b85512b045c65994893495160f /tests/misc | |
parent | e3171c43ebad36ca0746bc625607f87269ff4e73 (diff) | |
download | coreutils-a892af0d48b47a445fda12a1e889f1a7f3cd5907.tar.xz |
tests: avoid a "make check-root" failure when mcstransd is running
* tests/misc/chcon: Skip this test if mcstransd seems to be running.
Diffstat (limited to 'tests/misc')
-rwxr-xr-x | tests/misc/chcon | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/misc/chcon b/tests/misc/chcon index 3a61c6925..74248a3e6 100755 --- a/tests/misc/chcon +++ b/tests/misc/chcon @@ -11,6 +11,16 @@ fi require_root_ require_selinux_ +# When mcstransd is running, you'll see only the 3-component +# version of file-system context strings. Detect that, +# and if it's running, skip this test. +ctx=$(stat --printf='%C\n' .) || framework_failure +case $ctx in + *:*:*:*) ;; # four components is ok + *) # anything else probably means mcstransd is running + skip_test_ "unexpected context '$ctx'; turn off mcstransd" ;; +esac + mkdir -p d/sub/s2 || framework_failure touch f g d/sub/1 d/sub/2 || framework_failure |