diff options
author | Pádraig Brady <P@draigBrady.com> | 2010-04-13 12:49:05 +0100 |
---|---|---|
committer | Pádraig Brady <P@draigBrady.com> | 2010-04-13 13:09:50 +0100 |
commit | 584e38d8b3199924ce24f9fa075d27d0d82a2a8b (patch) | |
tree | 218644d5a074554ed256617a5cbd3b8c1854868f /tests/cp/cp-mv-enotsup-xattr | |
parent | c420cfef77b9173a754806dc49deacabb436044f (diff) | |
download | coreutils-584e38d8b3199924ce24f9fa075d27d0d82a2a8b.tar.xz |
cp: treat selinux warnings consistently
* src/copy.c (copy_reg): Suppress SELinux ENOTSUP warnings consistently
between the destination being present or not. Previously we did
not suppress ENOTSUP messages when the destination was present.
(copy_internal): Use the same ENOTSUP supression method as
copy_reg() even though the issue was not seen in this case.
* tests/cp/cp-a-selinux: Add a test case for the issue and
group the other test cases in the file more coherently.
* tests/cp/cp-mv-enotsup-xattr: Do the same check for xattr
warnings, even though they did not have the issue.
Diffstat (limited to 'tests/cp/cp-mv-enotsup-xattr')
-rwxr-xr-x | tests/cp/cp-mv-enotsup-xattr | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/cp/cp-mv-enotsup-xattr b/tests/cp/cp-mv-enotsup-xattr index 0239abbde..7e7b6456f 100755 --- a/tests/cp/cp-mv-enotsup-xattr +++ b/tests/cp/cp-mv-enotsup-xattr @@ -77,7 +77,12 @@ test -s err && fail=1 # there must be no stderr output rm -f err noxattr/a -# This should pass without diagnostics +# This should pass without diagnostics (new file) +cp --preserve=all xattr/a noxattr/ 2>err || fail=1 +test -s noxattr/a || fail=1 # destination file must not be empty +test -s err && fail=1 # there must be no stderr output + +# This should pass without diagnostics (existing file) cp --preserve=all xattr/a noxattr/ 2>err || fail=1 test -s noxattr/a || fail=1 # destination file must not be empty test -s err && fail=1 # there must be no stderr output |