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. echo Prepare the directory
  25. mkdir dir
  26. genfile -f foo
  27. cd dir
  28. ln -s ../foo .
  29. cd ..
  30. chmod -w dir
  31. echo Create the archive
  32. tar cf archive dir || exit 1
  33. chmod +w dir
  34. echo Extract
  35. mkdir out
  36. tar -C out -xvf archive
  37. ],
  38. [0],
  39. [Prepare the directory
  40. Create the archive
  41. Extract
  42. dir/
  43. dir/foo
  44. ],
  45. [],[],[ustar]) # Testing one format is enough
  46. AT_CLEANUP