acls01.at 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. # Process this file with autom4te to create testsuite. -*- Autotest -*-
  2. #
  3. # Test suite for GNU tar.
  4. # Copyright (C) 2011 Free Software Foundation, Inc.
  5. #
  6. # This program is free software; you can redistribute it and/or modify
  7. # it under the terms of the GNU General Public License as published by
  8. # the Free Software Foundation; either version 3, or (at your option)
  9. # any later version.
  10. #
  11. # This program is distributed in the hope that it will be useful,
  12. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. # GNU General Public License for more details.
  15. #
  16. # You should have received a copy of the GNU General Public License
  17. # along with this program. If not, see <http://www.gnu.org/licenses/>.
  18. #
  19. # Test description:
  20. #
  21. # This is basic test for acl support.
  22. AT_SETUP([acls: basic functionality])
  23. AT_KEYWORDS([xattrs acls acls01])
  24. AT_TAR_CHECK([
  25. AT_XATTRS_UTILS_PREREQ
  26. AT_ACLS_PREREQ
  27. mkdir dir
  28. genfile --file dir/file
  29. MYNAME=$( id -un )
  30. setfacl -m u:$MYNAME:--x dir/file
  31. setfacl -m u:$MYNAME:--x dir
  32. getfattr -h -m. -d dir dir/file > before
  33. tar --acls -cf archive.tar dir
  34. rm -rf dir
  35. tar --acls -xf archive.tar
  36. getfattr -h -m. -d dir dir/file > after
  37. diff before after
  38. test "$?" = 0
  39. ],
  40. [0],
  41. [])
  42. AT_CLEANUP