chtype.at 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. # Process this file with autom4te to create testsuite. -*- Autotest -*-
  2. # Test suite for GNU tar.
  3. # Copyright 2006-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: Incremental restore malfunctions if an archive member
  17. # changes type before restoration, e.g. from directory to file or vice
  18. # versa.
  19. # Reported by: Wolfram Kleff <[email protected]>
  20. # References: <[email protected]>
  21. AT_SETUP([changed file types in incrementals])
  22. AT_KEYWORDS([incremental listed chtype])
  23. AT_TAR_CHECK([
  24. AT_SORT_PREREQ
  25. AT_TAR_MKHIER([directory/b/c],[x])
  26. mkdir directory/a
  27. genfile --file directory/a/a
  28. echo First backup
  29. tar --create --file=archive.1 --listed-incremental=db.1 directory
  30. sleep 2
  31. # Remove directory b and create a file with this name.
  32. # Previous versions were not able to restore over this file.
  33. rm -r directory/b
  34. genfile --file directory/b
  35. genfile --file directory/a/b
  36. echo Second backup
  37. tar --create --file=archive.2 --listed-incremental=db.2 directory
  38. # Delete a
  39. rm -r directory
  40. echo Restore archive.1
  41. tar -xf archive.1 --listed-incremental=/dev/null --warning=no-timestamp
  42. echo Restore archive.2
  43. tar -xf archive.2 --listed-incremental=/dev/null --warning=no-timestamp
  44. find directory | sort
  45. ],
  46. [0],
  47. [First backup
  48. Second backup
  49. Restore archive.1
  50. Restore archive.2
  51. directory
  52. directory/a
  53. directory/a/a
  54. directory/a/b
  55. directory/b
  56. ],[],[],[],[gnu, oldgnu, posix])
  57. AT_CLEANUP
  58. # End of chtype.at