incr01.at 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. # Process this file with autom4te to create testsuite. -*- Autotest -*-
  2. # Test suite for GNU tar.
  3. # Copyright 2005, 2007, 2013-2014, 2016-2017 Free Software Foundation,
  4. # Inc.
  5. # This file is part of GNU tar.
  6. # GNU tar 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 of the License, or
  9. # (at your option) any later version.
  10. # GNU tar is distributed in the hope that it will be useful,
  11. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. # GNU General Public License for more details.
  14. # You should have received a copy of the GNU General Public License
  15. # along with this program. If not, see <http://www.gnu.org/licenses/>.
  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. AT_CHECK_TIMESTAMP
  25. mkdir directory
  26. $as_ln_s foo directory/bar
  27. tar -cf archive.0 -g db directory
  28. rm directory/bar
  29. tar -cf archive.1 -g db directory
  30. mv directory orig
  31. tar xvfg archive.0 /dev/null --warning=no-timestamp
  32. echo separator
  33. tar xvfg archive.1 /dev/null --warning=no-timestamp
  34. ],
  35. [0],
  36. [directory/
  37. directory/bar
  38. separator
  39. directory/
  40. tar: Deleting 'directory/bar'
  41. ],
  42. [],[],[],[gnu, oldgnu, posix])
  43. AT_CLEANUP