incr01.at 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. # Process this file with autom4te to create testsuite. -*- Autotest -*-
  2. # Test suite for GNU tar.
  3. # Copyright (C) 2005, 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. # Description:
  17. # Check if restore from incremental backups does not choke on dangling
  18. # symlinks.
  19. # References: <[email protected]>
  20. # http://lists.gnu.org/archive/html/bug-tar/2005-08/msg00023.html
  21. AT_SETUP([restore broken symlinks from incremental])
  22. AT_KEYWORDS([incremental incr01])
  23. AT_TAR_CHECK([
  24. mkdir directory
  25. $as_ln_s foo directory/bar
  26. tar -cf archive.0 -g db directory
  27. rm directory/bar
  28. tar -cf archive.1 -g db directory
  29. mv directory orig
  30. tar xvfg archive.0 /dev/null
  31. echo separator
  32. tar xvfg archive.1 /dev/null
  33. ],
  34. [0],
  35. [directory/
  36. directory/bar
  37. separator
  38. directory/
  39. tar: Deleting `directory/bar'
  40. ],
  41. [],[],[],[gnu, oldgnu, posix])
  42. AT_CLEANUP