Skip to content

cp: require preserve only certain attributes #4095

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed

Conversation

sssemil
Copy link
Contributor

@sssemil sssemil commented Oct 31, 2022

In GNU cp, there's a lot of special handling of errors based on using -a, -p, --preserve=all, --preserve=xattr,context etc. which is not handled properly at the moment. In this PR, an analogous behavior to that of require_preserve_xattr, require_preserve_context, and require_preserve flags in GNU cp code is implemented.

Somethings left todo are testing xattr permission denied case (outside of Android test), and also context permission denied case. One idea is making a simple user-space fuse FS with advanced xattr modification permission controls. I couldn't find any simple solution to this... Ideas? cc @tertsdiepraam @sylvestre

Closes #4079.

@sssemil sssemil force-pushed the test_cp_parents_2_dirs_android_fail_4079 branch from 580c42d to 71467ee Compare October 31, 2022 17:46
@sssemil sssemil force-pushed the test_cp_parents_2_dirs_android_fail_4079 branch from 71467ee to 2f52037 Compare October 31, 2022 18:10
@github-actions
Copy link

GNU testsuite comparison:

GNU test failed: tests/misc/timeout. tests/misc/timeout is passing on 'main'. Maybe you have to rebase?

@tertsdiepraam
Copy link
Member

Somethings left todo are testing xattr permission denied case (outside of Android test), and also context permission denied case. One idea is making a simple user-space fuse FS with advanced xattr modification permission controls.

I have to admit this is outside my area of expertise :) If we can build a solution like this in the test framework then that would be great!

@sssemil
Copy link
Contributor Author

sssemil commented Nov 1, 2022

@tertsdiepraam I pushed a version I made so far, code is not exactly clean, but just want to get it in the light for opinions and CI :)

@sssemil sssemil force-pushed the test_cp_parents_2_dirs_android_fail_4079 branch from 4ebc7ae to cbaef90 Compare November 1, 2022 13:56
@sssemil sssemil force-pushed the test_cp_parents_2_dirs_android_fail_4079 branch from 9ed1a0d to fc3b15b Compare November 1, 2022 14:27
@sssemil sssemil force-pushed the test_cp_parents_2_dirs_android_fail_4079 branch from fc3b15b to 50653e9 Compare November 1, 2022 14:38
@sssemil
Copy link
Contributor Author

sssemil commented Nov 1, 2022

Closing this PR, will continue in this one #4100 and this one #4099.

@sssemil sssemil closed this Nov 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

test_cp_parents_2_dirs fails on android
2 participants