multiv05.at 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. # Process this file with autom4te to create testsuite. -*- Autotest -*-
  2. # Test suite for GNU tar.
  3. # Copyright 2006-2008, 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. # Up to version 1.15.91 tar was unable to recognize all volumes
  17. # given after an out-of-sync volume.
  18. # Reported by: Joerg Weilbier <[email protected]>
  19. # References: <[email protected]>
  20. AT_SETUP([Restoring after an out of sync volume])
  21. AT_KEYWORDS([multivolume multiv multiv05 sync])
  22. m4_pushdef([FILELIST],[jeden,dwa,trzy,cztery,piec,szesc])
  23. AT_TAR_CHECK([
  24. exec <&-
  25. m4_foreach([f],
  26. [FILELIST],
  27. [genfile --length 250k --file f
  28. ])
  29. echo Creating archive
  30. tar -c -M -L 502 -f a.tar -f b.tar -f c.tar m4_foreach([f],[FILELIST],f )
  31. echo separator
  32. mkdir bak
  33. mv m4_foreach([f],[FILELIST],f )bak
  34. tar -vxM -f a.tar -f c.tar -f b.tar -f c.tar
  35. m4_foreach([f],
  36. [FILELIST],
  37. [echo Diffing f
  38. cmp bak/f f || exit 1
  39. ])],
  40. [0],
  41. [Creating archive
  42. separator]
  43. m4_foreach([file],
  44. [FILELIST],
  45. [file
  46. ])dnl
  47. m4_foreach([file],
  48. [FILELIST],
  49. [Diffing file
  50. ])dnl
  51. ,
  52. [tar: 'trzy' is not continued on this volume
  53. ],[],[], [gnu])
  54. m4_popdef([FILELIST])
  55. AT_CLEANUP