extrac07.at 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. # Process this file with autom4te to create testsuite. -*- Autotest -*-
  2. # Test suite for GNU tar.
  3. # Copyright (C) 2006, 2007 Free Software Foundation, Inc.
  4. # This program is free software; you can redistribute it and/or modify
  5. # it under the terms of the GNU General Public License as published by
  6. # the Free Software Foundation; either version 3, or (at your option)
  7. # any later version.
  8. # This program is distributed in the hope that it will be useful,
  9. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. # GNU General Public License for more details.
  12. # You should have received a copy of the GNU General Public License
  13. # along with this program; if not, write to the Free Software
  14. # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
  15. # 02110-1301, USA.
  16. # Tar 1.16 failed to extract archives that have symlinks
  17. # in read-only directories.
  18. #
  19. # Reported-by: Eelco Dolstra <[email protected]>
  20. # References: <[email protected]>
  21. AT_SETUP([extracting symlinks to a read-only dir])
  22. AT_KEYWORDS([extract extract07 read-only symlink])
  23. AT_TAR_CHECK([
  24. AT_UNPRIVILEGED_PREREQ
  25. echo Prepare the directory
  26. mkdir dir
  27. genfile -f foo
  28. cd dir
  29. ln -s ../foo .
  30. cd ..
  31. chmod a-w dir
  32. echo Create the archive
  33. tar cf archive dir || exit 1
  34. chmod +w dir
  35. echo Extract
  36. mkdir out
  37. tar -C out -xvf archive
  38. ],
  39. [0],
  40. [Prepare the directory
  41. Create the archive
  42. Extract
  43. dir/
  44. dir/foo
  45. ],
  46. [],[],[],[ustar]) # Testing one format is enough
  47. AT_CLEANUP