4
0

rename04.at 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. # Process this file with autom4te to create testsuite. -*- Autotest -*-
  2. # Test suite for GNU tar.
  3. # Copyright (C) 2008 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: Up to version 1.20, when storing a record for renamed
  17. # directory in an incremental archive, tar incorrectly flagged all its
  18. # subdirectories as renamed, which led to problems at archive extraction.
  19. # References: <[email protected]>
  20. # Reported by: Enric Hernandez <[email protected]>
  21. AT_SETUP([renamed directory containing subdirectories])
  22. AT_KEYWORDS([incremental rename04 rename])
  23. AT_TAR_CHECK([
  24. AT_SORT_PREREQ
  25. decho Creating directory structure
  26. mkdir directory
  27. mkdir directory/subdir
  28. genfile --file=directory/file
  29. decho Creating initial archive
  30. tar -cf archive.1 -g db.1 directory
  31. decho Renaming
  32. mv directory dir
  33. decho Creating incremental archive
  34. cp db.1 db.2
  35. tar -cf archive.2 -g db.2 dir
  36. mv dir orig
  37. decho First restore
  38. tar -xf archive.1 -g db.1
  39. find directory | sort
  40. decho Second restore
  41. tar -xf archive.2 -g db.2
  42. find dir | sort
  43. ],
  44. [0],
  45. [Creating directory structure
  46. Creating initial archive
  47. Renaming
  48. Creating incremental archive
  49. First restore
  50. directory
  51. directory/file
  52. directory/subdir
  53. Second restore
  54. dir
  55. dir/subdir
  56. ],
  57. [Creating directory structure
  58. Creating initial archive
  59. Renaming
  60. Creating incremental archive
  61. First restore
  62. Second restore
  63. ],[],[],[gnu, oldgnu, posix])
  64. AT_CLEANUP
  65. # End of rename04.at